FOUPDATER
FOUpdater is small application, that can be used as a replacement of original Updater which comes with FOnline SDK. Unlike original version, this one allows to define more than one source of files to update with ability to randomize such list (what makes creating very primitive mirror system possible).
Program was originally written for
NSIS and used only HTTP protocol; it's been rewritten now from scratch, as i couldn't look at this code anymore and wanted to write something
more readable :] Updating game files thru HTTP, and providing additional info about them is still taken as major FOUpdater feature but nothing stop anyone from using it on servers which uses default UpdateServer only - both version of its protocol are supported.
For people who still like command-line tools (hey, it's me), console version is prepared
UPDATE SOURCE TYPES
Each update source is defined as URI-like string which defines how it should be handled and address of end-point (with addtional info in case of STREAM source, see below)
<sourceType>://<sourceAddress>/
STREAMstream://<server>/<port>/<version>/
Traditional source of updates for FOnline serves, since SDK release.
'
port' and '
version' are optional; default values: port = 4040, version = 1
HTTPhttp://<url>/
First, and most supported update type for FOUpdater, using following syntax:
<crc> <size> <filename> [options]
Defines file which should be checked during update. '
options' part is optional, uses same names as SDK UpdateServer, separated by comma.
config <variable> <value>
Any time FOUpdater encounter such line, "
Updater" section of FOnline.cfg (or file defined with /config switch) is automagically updated with given values. That way, adding new mirrors is possible without forcing user to change config every time it's done. Only adding/overwriting entries is possible.
updater <size> <filename> <version>
[TODO]
See also FOUpdater.php included in package, which isn't best php on earth but does its job on creating files list in two ways: used internally by FOUpdater and bit more human-friendly form.
Example:
http://fonline2238.net/update/CONFIG FILE
(required) Source[ID]=<address>
Defines one or more sources which will be used to update files. ID has to start from 0, next sources must have ID greater by one (for example, having only Source0 and Source2 will make Source2 ignored). Maximum ID can be 4294967295.
If for some reason first source is not available (or application failed to download any file from it), next one is checked until list ends.
(optional) RandomSource=<0/1>
If set to '1', randomizes sources list.
(optional) Run=<executable>,<text>
Run=<executable>
If present, after pressing one of buttons <executable> is started.
COMMAND LINE
/autoexit
--autoxeit
Closes FOUpdater after checking all files
/config:<filename>
--config:<filename>
Defines which file should be used to read/save configuration. Default: FOnline.cfg
/source:<address>
--source:<address>
Defines single source address which will be used to check for files, uses same format as Source* in config file. Best if used together with HTTP source, application can serve then as (very) minimalistic installer.
DOWNLOAD
Current version
http://fonline2238.net/~wipe/sdk/FOUpdaterEx-0.2.1.zipKNOWN ISSUES
- Non-english filenames may be saved with wrong name or make application stuck. (found by Sybil, stream://46.165.192.91/4040/1/)
CHANGELOG
v0.2.1 - rewritten to C#, .NET 2.0
v0.1.3 - added translation table
v0.1.2 - first public release
TODO
- Project
- Get rid of bugs
- Prepare/finish additional tools.
- Clean and release source.
- Core
- FTP as possible source. (HTTP fork)
- ??? Custom UpdateServer, merging functionality of Stream and HTTP sources.
- ??? Allow to translate any text used without need of recompilation (stored in .cfg file?)
- Application
- Prevent possible problems when total size of files to update is >= 2GB.
- HTTP/FTP:
- Inform user when new version of updater is available; check done locally (per server) instead global one.