Packaging
From Post-Apocalyptic RPG wiki
This article explains how to package official PARPG releases on the platforms that we target.
Contents |
Linux
Mac
Win32
Tools Used
Windows packaging is done with the NSIS scripting language. To compile the NSIS script you will need to download the NSIS program from http://nsis.sourceforge.net/Main_Page. It is also helpful to have an editor for syntax highlighting. Many are available from links on the NSIS site. Currently we have been using this one: http://hmne.sourceforge.net/.
Preparation steps
- Update your FIFE and PARPG SVN checkouts to the versions that you would like to ship with the installer. In general we assume that both the latest FIFE and PARPG trunk is used for the purpose. We might want to resort to tagged PARPG releases or specific FIFE revisions in case there are known issues with newer revisions of PARPG or FIFE.
- Build FIFE via mingw as described here: http://wiki.parpg.net/Download#Win32_4
Gathering Dependencies
There is an empty directory in SVN called trunk/game/packaging/dependencies. This directory is reserved for any 3rd party files and executables we may wish to include in our installer. It is the packagers responsibility to gather any such files and place them in the dependencies directory before compiling the script. One such example is the OpenAL sound libraries we use (oalinst.exe). If the NSIS compiler cannot find all dependency files it will generate an error and the installer will not be created. Dependencies should NOT be commited into our SVN repository!
FIFE
After FIFE has been built from source, we'll still have to turn it into a standards-compliant installable Python module. To do so:
- cd into FIFE\trunk
- Run: setup.py bdist_wininst
- cd into FIFE\trunk\dist and copy fife-0.3.0.win32.exe into PARPG\trunk\game\packaging\dependencies
OpenAL
To download the latest version of OpenAL for Win32, grab this package: http://connect.creativelabs.com/openal/Downloads/oalinst.zip
Unpack the content of the zip package (oalinst.exe) into PARPG\trunk\game\packaging\dependencies to ensure that OpenAL gets correctly shipped with the PARPG installer.
Compiling the Installer
The installer script is compiled with the MakeNSISW command. This command can be run from the windows explorer right click menu (it will be named "Compile NSIS Script") or there may also be a corresponding command in the NSIS editor you are using (for HM NIS there is a compile command).
The installer script is meant to be compiled from its current location which is trunk/game/packaging. It must be run from this location because it uses relative paths in order to find all the files that must be included in the installer. The script will write the created executable to PARPG\trunk\game\packaging