celestia networking-patch (http/ftp)
Posted: 30.08.2006, 18:08
hi all,
I have made a patch for celestia that allows the program to download and update remote sources like scripts, models, textures etc. automatically.
this patch also includes the modified gzip-patch.
client-section:
So what does it change?
+ adds 4 new options for celestia.cfg:
EnableNetworking (can be either 0 to disable or 1 to enable the networking code)
BindIP (can be an interface name, an IP address or a host name of the outgoing network interface celestia will be using)
DownloadFileTypes (a list of allowed filetype-extensions celestia will download, anything else will be ignored)
RemoteURL (a list of remote URLs to file-hash-lists - see server-section below for more information)
+ modified the splash-screen to display download speed and status
+ adds gzip support for stars.dat, cmod-files, dds-files and 3ds-files (extension .gz)
+ new win32 dlls libpng (1.2.8) and zlib (1.2.3)
What does it do if I run the exec?
If you don't change anything in the provided example celestia.cfg it will contact my test-server containing ~45 MB of data
including all necessary celestia-data, models and textures plus some randomly chosen addons.
People with slow connections (e.g. analog-modems) really should edit the celestia.cfg and change RemoteURL to another server containing less data or disable networking completely!
If you run the program a second time it will only check for changes between the local and remote files using md5-hashes.
Changed files will be downloaded and replaced automatically meaning any local changes will be overwritten too.
server-section:
The RemoteURL points to a server-stored text-file containing md5-hashes and filenames.
for example:
http://www.purebytes.de/stuff/celestia/ ... lestia.md5
The "*" sign preceding all filenames describes the file-type where * stands for binary.
To successfully create and compare cross-platform md5-hashes we need to treat all files as binary.
As you can see here the server stores all files in the same way celestia stores its data (e.g. data, models, scripts, extras).
This is essential because celestia won't create these directorys for you except for everything under the "extras" directory!
The script to create this "celestia.md5" can be found here (also see makemd5).
You don't have to call it "celestia.md5", call it whatever you want as long as you update your celestia.cfg to the exact filename.
Limitations
Currently you cannot abort the loading-process, so if have problems with your connection to the server or the download-stops
you either have to wait for the 30 sec timeout (per file!) or kill the application.
Also linux-users must have write access to the directory where celestia stores its data (e.g. /usr/local/share/celestia) otherwise you may get unexpected errors.
Bugs
None that i know of but since this hasn't been tested by many people there could still be some serious bugs hiding in the code.
Use this at your own risk! ;)
------------------------------------------------------------------
Current version is alpha7 - grab it here (11/09/2006)
this includes:
- a celestia-win32-binary from latest CVS
- a basic directory-structure
- a sample celestia.cfg
- the makemd5-script to create the server-side hashlist
- all necessary win32-libs to run the program.
download the sources here.
have fun testing
phoenix
I have made a patch for celestia that allows the program to download and update remote sources like scripts, models, textures etc. automatically.
this patch also includes the modified gzip-patch.
client-section:
So what does it change?
+ adds 4 new options for celestia.cfg:
EnableNetworking (can be either 0 to disable or 1 to enable the networking code)
BindIP (can be an interface name, an IP address or a host name of the outgoing network interface celestia will be using)
DownloadFileTypes (a list of allowed filetype-extensions celestia will download, anything else will be ignored)
RemoteURL (a list of remote URLs to file-hash-lists - see server-section below for more information)
+ modified the splash-screen to display download speed and status
+ adds gzip support for stars.dat, cmod-files, dds-files and 3ds-files (extension .gz)
+ new win32 dlls libpng (1.2.8) and zlib (1.2.3)
What does it do if I run the exec?
If you don't change anything in the provided example celestia.cfg it will contact my test-server containing ~45 MB of data
including all necessary celestia-data, models and textures plus some randomly chosen addons.
People with slow connections (e.g. analog-modems) really should edit the celestia.cfg and change RemoteURL to another server containing less data or disable networking completely!
If you run the program a second time it will only check for changes between the local and remote files using md5-hashes.
Changed files will be downloaded and replaced automatically meaning any local changes will be overwritten too.
server-section:
The RemoteURL points to a server-stored text-file containing md5-hashes and filenames.
for example:
http://www.purebytes.de/stuff/celestia/ ... lestia.md5
The "*" sign preceding all filenames describes the file-type where * stands for binary.
To successfully create and compare cross-platform md5-hashes we need to treat all files as binary.
As you can see here the server stores all files in the same way celestia stores its data (e.g. data, models, scripts, extras).
This is essential because celestia won't create these directorys for you except for everything under the "extras" directory!
The script to create this "celestia.md5" can be found here (also see makemd5).
You don't have to call it "celestia.md5", call it whatever you want as long as you update your celestia.cfg to the exact filename.
Limitations
Currently you cannot abort the loading-process, so if have problems with your connection to the server or the download-stops
you either have to wait for the 30 sec timeout (per file!) or kill the application.
Also linux-users must have write access to the directory where celestia stores its data (e.g. /usr/local/share/celestia) otherwise you may get unexpected errors.
Bugs
None that i know of but since this hasn't been tested by many people there could still be some serious bugs hiding in the code.
Use this at your own risk! ;)
------------------------------------------------------------------
Current version is alpha7 - grab it here (11/09/2006)
this includes:
- a celestia-win32-binary from latest CVS
- a basic directory-structure
- a sample celestia.cfg
- the makemd5-script to create the server-side hashlist
- all necessary win32-libs to run the program.
download the sources here.
have fun testing
phoenix