This is the group of AvP2 modders responsible for developing the AvP2Fortress mod. If you whish to join us, please send us an e-mail.
Continuing with our launcher & update module, the second part brings the finished product. And yes, there is also a third part in the works.
Posted by Herr_Alien on Dec 27th, 2009
I know, the original deal was that you'll get the mod launcher 4 - 5 days later. But it is Christmas, so here we go:
The archive you just downloaded contains both the compiled launcher and the NSIS script. This way you can make any alterations you want and personalize the launcher further.
If your mod is for a game that has a rich modding community, it is likely that other mods also use this launcher. This however might cause issues, because each mod would end up overwritting the same .ini file (assuming all launchers are placed in the same folder).
To counter that, the launcher is designed so that a launcher renamed to "Jailbreak.exe" will try to open the .ini file called "Jailbreak.ini". This way all launchers end up having sepparate ini files.
This means that before distributing the mod, make sure that the launcher.exe file and the launcher.ini file are renamed appropriately.
In this second part, we'll disect the NSIS script and try to identify the pieces of code responsable for the following:
Open up the launcher.nsi file into a text editor; you'll find it in the "src/" subfolder of the archive. Keep the text editor handy 'cause we'll ALT-TAB to it a lot.
Now, until you do open up the .nsi file, a couple of words about what the launcher does (available also in the archive, in the readme.txt file):
(1) Version checking (Function CheckVersions)
This step can be further broken down as follow:
(3) Launching the mod (Function OnPageExit)
This step consists in reading the "commandline" value from the "[launcher]"
section. A simple "Exec" call is then performed with that command line.
This concludes the second part of the article. In our next (and final) part, we'll cover some best practices on using the launcher and we'll prepare some example files.