Version 10 (modified by Philip Taylor, 15 years ago) ( diff )

update Windows build instructions

The current release of the game is aimed at developers and not at 'normal' users. As such, the following instructions assume a reasonable level of technical proficiency. If you encounter difficulties, please post on the forum.

General prerequisites

You'll need:

  • An adequately high-spec computer - several gigabytes of free disk space, preferably at least 1GB of RAM for compiling, a fast CPU unless you want to spend ages waiting for the compiler, etc. Modern graphics hardware is also recommended, though the game can run (slowly) on fairly old devices (GeForce 4, Intel 945GM, etc).
  • Up-to-date system software (Windows service packs, graphics driver updates, etc).
  • Some technical proficiency. We try to make the build process as smooth and painless as possible, but it's designed to be followed by programmers - if you just want to play the game, wait for a pre-packaged installer instead.

Windows

Windows XP and Vista are the main supported versions; 2000 and 7 may work too.

Acquiring the code

The game's code, data and build environment are stored on a Subversion server. The recommended way to get an up-to-date copy is with TortoiseSVN:

  • Download and install TortoiseSVN. (Make sure you reboot when it asks you to.)
  • Use TortoiseSVN to check out http://svn.wildfiregames.com/public/ps/trunk/. This may take a while, and will use around 700MB of disk space.

(This is the read-only public SVN URL. If you have commit access, you need to use http://svn.wildfiregames.com/svn/ps/trunk/ instead.)

The TortoiseSVN manual has information on checking out, as well as updating and creating patches.

Setting up the build environment

The game must be compiled with Microsoft Visual C++. If you already have Visual C++ 2005 or 2008 installed, make sure you have SP1 and then continue. Otherwise, you can get the free Express edition:

(If you have the old VC++ 2005 Express, you need to install the separate Platform SDK (steps 1-3).)

The Visual Studio project/solution files are automatically generated using Premake:

  • Run build/workspaces/update-workspaces.bat.
  • Open build/workspaces/vc2008/pyrogenesis.sln. (If you have VC++ 2005, use the vc2005 directory instead.)

Now you should be able to build the code from within Visual Studio, using "Build Solution" (F7).

Running

Run the game with F5 inside Visual Studio (assuming "pyrogenesis" is set as the startup project, which is default). If you want to run it outside the debugger, run binaries/system/pyrogenesis_dbg.exe.

To run the (currently quite minimal) automated tests, run the "test" project. (Right click on "test" and "set as StartUp Project" and F5; or right click, "Debug", "Start new instance"). In VS's debug output window, ignore any "first-chance exception" messages; it should say ".......OK!" if it succeeded.

Keeping up to date

After you've set everything up, the process for staying up to date is:

  • Update the root directory of the checkout.
  • Close the solution in Visual Studio if you've got it open. Run update-workspaces.bat again. (This is only needed if any source files have been added or removed. If you forget to run this, you'll probably get build errors about missing symbols.)
  • Build again.

Linux, OS X

This is much less streamlined than the process for Windows. But you're cooler than a Windows developer, so you should be able to cope.

  • Install various standard tools and development libraries:
    • GCC
    • Subversion
    • NASM
    • SDL
    • Boost
    • zlib
    • libpng
    • libxml2
    • OpenAL
    • libogg
    • libvorbis
    • cryptopp
    • SpiderMonkey
    • wxWidgets (probably called wxgtk on Linux) (optional, but required for the editor tools)
    • gamin (Linux only)
    • BFD (typically called something like binutils-dev) (Linux only)
    • and maybe some other things?
  • For Ubuntu the following might help: sudo apt-get install build-essential libsdl1.2-dev zlib1g-dev libpng12-dev libjpeg62-dev libgamin-dev nasm libwxgtk2.8-dev libboost-dev libboost-signals-dev libopenal-dev libalut-dev libvorbis-dev libogg-dev libcrypto++-dev binutils-dev libnspr4-dev libdevil-dev
  • For OS X you'll need MacPorts first. Then the following might help: sudo port install boost libsdl spidermonkey wxWidgets
  • You'll need a multi-threaded build of SpiderMonkey. If you have a single-threaded version instead, you should get some compiler errors and you might need to compile the right version yourself.
  • svn co http://svn.wildfiregames.com/svn/ps/trunk/
  • ( cd trunk/build/premake/src && make && cp bin/premake .. )
  • cd trunk/build/workspaces
  • ./update-workspaces.sh (you'll have to repeat this step each time a source file is added or removed)
  • cd gcc
  • make -j3 (where 3 is the number of parallel builds to run, and could perhaps be one plus the number of CPU cores available)
  • Fix all the compiler errors somehow.
  • ( cd ../../binaries/system && ./pyrogenesis_dbg )

Installing SpiderMonkey on *nix system

To Install SpiderMonkey Libraries on *nix systems:

  • Download the source code, either from mozilla site or from our site
  • Unpack in a temporary directory (let's call it $temp)
  • Change the directory into $temp/js/src/ cd $temp/js/src
  • Build the source using make -f Makefile.ref all followed by make -f Makefile.ref export
  • This last step will have put all the built binaries, libraries and headers in either $temp/dist/Linux_All_DBG.OBJ for linux systems, or $temp/dist/Darwin_DBG.OBJ for mac os x
  • Change directory into $temp/dist/Linux_All_DBG.OBJ (or Darwin_DBG_OBJ) cd $temp/dist/Linux_All_DBG.OBJ
  • Copy everything under include/ into the place where the compiler usually looks for header files (usually /usr/include) into a new directory called js, ie: cd include followed cp * /usr/include/js (Note: you might need to use su or sudo to get permission to copy these files)
  • Copy everything under lib/ into the directory where the runtime directories are located (usually /usr/lib) cd ../lib followed by cp * /usr/lib (Note: you might need to use su or sudo to get permission to copy these files)
  • Run ldconfig (if you don't, the library might not be found at runtime)
  • You are free to copy the binaries under bin/ into your system binary path as well (usuall /usr/bin), but it won't be necessary to build the engine
Note: See TracWiki for help on using the wiki.