|
|
Line 1: |
Line 1: |
|
This page explains how to compile Globulation 2 on windows using [http://www.mingw.org/ mingw]. |
|
This page explains how to compile Globulation 2 on windows using [http://www.mingw.org/ mingw]. |
|
|
|
|
|
|
== Installing required software for tutorial == |
|
==Setting up Python, Scons, and Mercurial== |
|
=== Setting up Python, Scons, Mercurial, and NSIS === |
|
:* Download and install [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi python-2.5.1.msi] into the directory "C:\Python25" (default install is Python25, don't change this) |
|
:* Download and install [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi python-2.5.1.msi] into the directory "C:\Python25" (default install is Python25, don't change this) |
|
:* Download and install [http://prdownloads.sourceforge.net/scons/scons-0.97.win32.exe scons-0.97.win32.exe] into the same directory as the python install (C:\Python25\) |
|
:* Download and install [http://prdownloads.sourceforge.net/scons/scons-0.97.win32.exe scons-0.97.win32.exe] into the same directory as the python install (C:\Python25\) |
|
:* Download and install [http://mercurial.berkwood.com/binaries/Mercurial-0.9.5-f2335246e5c7.exe Mercurial-0.9.5-f2335246e5c7.exe] locally (to any directory, preferably default C:\Mercurial though) so the command hg will work. When you get to the end of the install, make sure you check "add mercurial to your computers search path" or something similar. And now you are ready to go. |
|
:* Download and install [http://mercurial.berkwood.com/binaries/Mercurial-0.9.5-f2335246e5c7.exe Mercurial-0.9.5-f2335246e5c7.exe] locally (to any directory, preferably default C:\Mercurial though) so the command hg will work. When you get to the end of the install, make sure you check "add mercurial to your computers search path" or something similar. |
|
⚫ |
:*Download and install [http://prdownloads.sourceforge.net/nsis/nsis-2.34-setup.exe nsis-2.34-setup.exe] into all its default installation folder "C:\Program Files\NSIS\". |
|
|
|
|
==Setting up MinGW and MSYS== |
|
=== Setting up MinGW and MSYS === |
|
:*Download and install [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe MinGW-5.1.3.exe] into the directory c:\mingw (lower case) and select the MinGW base tools and g++ compiler packages only during the installation selection process |
|
:*Download and install [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe MinGW-5.1.3.exe] into the directory c:\mingw (lower case) and select the MinGW base tools and g++ compiler packages only during the installation selection process |
|
:*And, download and install [http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe MSYS-1.0.10.exe] into the directory c:\msys\1.0\ (lower case). At the end of the installation, it will ask you if you want to continue with the post-install. Select yes, and yes again when it ask if you have mingw installed. When it ask you to indicate the directory where it is installed, type in c:/mingw (yes, with a forward slash as the program prefers it that way). |
|
:*And, download and install [http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe MSYS-1.0.10.exe] into the directory c:\msys\1.0\ (lower case). At the end of the installation, it will ask you if you want to continue with the post-install. Select yes, and yes again when it ask if you have mingw installed. When it ask you to indicate the directory where it is installed, type in c:/mingw (yes, with a forward slash as the program prefers it that way). |
|
<!-- :*And lastly, download and install [http://prdownloads.sf.net/mingw/msysDTK-1.0.1.exe msysDTK-1.0.1.exe] in the same directory as msys (c:\msys\1.0\) --> |
|
<!-- :*And lastly, download and install [http://prdownloads.sf.net/mingw/msysDTK-1.0.1.exe msysDTK-1.0.1.exe] in the same directory as msys (c:\msys\1.0\) --> |
|
⚫ |
== = Compiling Prerequisites === |
|
|
|
⚫ |
==Compiling Prerequisites== |
|
|
:*Download [http://dl.sv.nongnu.org/releases/glob2/mingw/glob2_required_libs_mingw-scons.tar.bz2 glob2_required_libs_mingw-scons.tar.bz2] and put it in the home directory of msys (c:\msys\1.0\home\XXX\ where XXX is the username) |
|
:*Download [http://dl.sv.nongnu.org/releases/glob2/mingw/glob2_required_libs_mingw-scons.tar.bz2 glob2_required_libs_mingw-scons.tar.bz2] and put it in the home directory of msys (c:\msys\1.0\home\XXX\ where XXX is the username) |
|
:*Double click the MSYS icon that has been placed on your desktop during MSYS's installation. |
|
:*Double click the MSYS icon that has been placed on your desktop during MSYS's installation. |
Line 26: |
Line 26: |
|
hg clone http://hg.globulation2.org/glob2/ |
|
hg clone http://hg.globulation2.org/glob2/ |
|
:*Extract the master (the stable branch) from the mercurial download (this can also be used to extract other branches, such as core_rewrite_2007): |
|
:*Extract the master (the stable branch) from the mercurial download (this can also be used to extract other branches, such as core_rewrite_2007): |
|
hg clone -r master glob2 glob2_source |
|
hg clone -r default glob2 glob2_source |
|
|
:*To compile the latest code, run: |
|
:*To get the data, maps, and campaigns needed to play the game, run the following commands: |
|
|
cd glob2_source |
|
cd glob2_source |
|
hg update tip |
|
hg update -C tip |
|
./syncdata |
|
|
./syncmaps |
|
|
===Step 2: Continue compiling=== |
|
===Step 2: Continue compiling=== |
|
⚫ |
:* Start compiling Globulation 2. Don't worry about the warnings. If something is wrong, it will grind to a halt and it will let you know why. To compile, run (inside glob2_source): |
|
:*Before compiling glob2, run these commands from the mingw console: |
|
|
⚫ |
|
⚫ |
|
|
|
|
:*Once compiling has finished, run the following to prepare Globulation 2 for testing: |
⚫ |
:* Now to start compiling globulation 2. Don't worry about the warnings. If something is wrong, it will grind to a halt and it will let you know why. |
|
|
scons |
|
|
:::If there are any problems, run it one more time using the following line. If problems persist, write a bug report. |
|
⚫ |
scons --no-cache mingw -true |
|
|
:*To make the executable smaller in size, run the following command: |
|
|
strip ./src/glob2.exe |
|
strip ./src/glob2.exe |
|
|
|
|
==Testing Globulation 2 on windows== |
|
|
:*Drag the required dll's into the root source folder: |
|
|
cd glob2_source |
|
|
cp -a /local/bin/SDL.dll /local/lib/*.dll . |
|
cp -a /local/bin/SDL.dll /local/lib/*.dll . |
|
===Running Globulation from compiled source=== |
|
|
:*Drag the glob2 executable into the root source folder: |
|
|
cp -a ./src/glob2.exe . |
|
cp -a ./src/glob2.exe . |
|
:*Run glob2.exe from the glob2_source directory and play :) |
|
:*Run glob2.exe from the glob2_source directory and play :) |
|
===Building a Globulation 2 NSIS installer=== |
|
===Building a Globulation 2 NSIS installer=== |
|
|
:*In MSYS, run the following codes to compile a windows installable exe file: |
⚫ |
:*Download and install [http://prdownloads.sourceforge.net/nsis/nsis-2.34-setup.exe nsis-2.34-setup.exe] into all its default installation folders (just keep clicking Next). |
|
|
⚫ |
|
|
:*Go to (using windows explorer) the windows folder, located inside the glob2_source directory and drag and drop win32_installer.nsi onto the NSIS icon to initialize the build process. |
|
|
|
cd windows |
|
|
glob2_make_win32.sh |
|
:*If all things go well, an exe ready for installation on windows computers is now ready within the windows folder. Test it (install and play), and if it works, send it to your friends ;) |
|
:*If all things go well, an exe ready for installation on windows computers is now ready within the windows folder. Test it (install and play), and if it works, send it to your friends ;) |
|
|
|
|