in order for you (and your players) to run the executable, you will need the vs2008 sp1 runtime
if you dont have it, just install this http://www.microsoft.com/downloads/details.aspx?familyid=a5c84275-3b97-4ab7-a40d-3802b2af5fc2&displaylang=en
the application is compressed, so some antivirus might detect it as a possible risk, just ignore them and add to safe list (and report to their servers if possible)
the application can be named anything, and can be placed in any folder
it reads a mandatory .config file (named the same as the application, just replaced .exe with .config)
a sample config file is supplied
the options are as follows:
GameDir: this should never be set in the package supplied by the server, the application will ask the user on first start where their mxo install is (unless it's in the same folder as the launcher)
UpdateNewsURL (default http://localhost): set it to whatever page you want the launcher to display, it uses the WebKit engine, and will show any page that normal chrome/safari can
HeaderImg (default topbanner.png): name of a jpg or png or gif or svg image that appears on the top of the launcher. it's width should be bigger than 500 pixels so that you dont get banners on the sides. transparent png is supported, however the background of that is the default windows dialog background color
ServerXmlURL (default http://localhost/server.xml): url to the xml description file that contains the server's info (sample file is included)
WindowWidth (default none): override the window width, you really should not do this, as it will take the width as either 500, or the width of your header image, depending on which one is larger. if you override the window width to higher than the width of your header image, you will get banners of the sides of the header image. it will have no effect if its smaller than 500 or smaller than your header image width.
WebHeight (default 295): height of the web page embedded into the application, recommended value is 500ish...
what the application will first do, is try to retrieve the serverXML file from the URL you specified.
inside it are a few parameters:
name of server (name attribute of root tag) : this is what the patched application's name will be, aka TestServer.exe
patchinfo url (url attribute of PatchInfo node) : url of the patch xml file, details later
signpubkey url (url attribute of SignPubKey node) : url of signpub.dat (does not have to be named that), the contents of this 2048bit file will be patched into the target exe at the locations required.
pubkey url (url attribute of PubKey node) : url of pubkey.dat (does not have to be named that), the launcher will compare the contents of this file with the pubkey.dat in mxo's dir. if they are different, the launcher will delete the pubkey.dat in mxo's dir so that they can be resynchronized.
useropts node:
each TAG in this node, is the variable you are setting, and the TAG's data, is the value you are setting the variable to
the launcher will intelligently modify and add entries to the player's useropts.cfg, preserving their own configuration and comments, and even adding comments indicating what was the original value etc...it will also comment out any invalid lines the player might have in useropts.cfg (things that would make the game crash, like no value or variable name on an uncommented line, etc)
then it will try to retrieve the patchinfo xml from the url you specified.
the format is as follows:
root URL (baseURL attribute of root node) : this will be prepended to every file name that the launcher will try to download when patching
tags as children of this node can have 2 types : File or Dir
File type nodes have 3 required attributes:
name : the path that will be checked relative to mxo's folder, for the md5 hash or existence
action : can be either mustExist or mustNotExist , files that have action of mustExist will be redownloaded if they dont exist, or if they exist and their md5 hash doesnt match with the md5 specified in this file, they will also be redownloaded by the patcher. if it's mustNotExist, the patcher will delete those paths from the mxo's folder if they exist.
md5 : hexadecimal encoding of the server's copy of the file's md5 hash. this has to be correct. can be either lowercase or uppercase. the patcher will check this on the client's files to see if they have to be redownloaded. must not be set for files that have action mustNotExist or for dirs
directories must not have the md5 attribute, the other behaviour is the same (except that instead of checking md5 and redownloading, directories are just created on mustExist action, and recursively deleted on mustNotExist)
patching is done before any of the other actions (pubkey verification, useropts modification, making a new exe with patched sign key...), so, if you are going to include launcher.exe in your patch system, make sure it's a version with the ORIGINAL signing key, as the launcher will patch your own server's key into it anyway
all the URLs you put in the xml files and in the .config file do not need to be on the same server or anything like that, they are just URLs
a sample webhost root and configuration is included with this launcher here, paths set up as localhost being the server, and every file on the same server and in the same dir
all you redistribute to players is the .exe name, and the matching .config file with the parameters for your server, you can name the .exe anything, and the players can place it anywhere. the servername directive in the server xml is important, because it defines what the .exe name of the modified launcher will be. please keep it unique.