w3dlauncher is a file patching program, responsible for keeping the browser program files up to the most current release. Because of the small number of files to update (as there are almost no media files), it uses a very simple scheme:
- The "as is" patch.cfg file is retrieved from the current directory, specifying which browser files have already been downloaded (and the version of each).
- Similarly, the "to be" patch.cfg is retrieved from the Web3D server, indicating the most current versions of all browser files.
- Every outdated local browser files is replaced by the most current version, downloaded from the server. In some cases, this may mean deleting a file that is no longer needed. The local patch.cfg file is replaced after each change to show the updated status of the file.
- The browser is launched.
Note: The patcher is a separate program from the browser, so that it can update all the browser's program files before running the browser. For this same reason, the browser is responsible for updating the patcher program, if needed.
patch.cfg This file format specifies both the as-is patch state (local) and to-be patch state (server).
- Package lines specify the package name and version number. All indented lines that follow are files belonging to that package. The "w3dpatch" and "w3dbrowser" packages must always be present, representing the patch and browser respectively. All other packages are for optionally downloaded plug-ins.
- File lines are indented, specifying the file's path name and version number. If the file name begins with '-', the file is to be deleted.
- Version number is version.release.mod, where release and mod numbers do not exceed 99.
Here is a sample patch.cfg on a server
w3dpatch 0.1.0 w3dpath.exe 0.1.0 w3dbrowser 0.1.4 w3dbrowser.exe 0.1.3 boost.dll 0.1.3 -wonkers.dll 0.1.3