|
|
Line 1: |
Line 1: |
|
⚫ |
{{Warning #1|Caution|This guide wont be effective until July 20th when the files are garenteed to be uploaded and everything working. Till then, see an old revision of this page.}} |
|
=Warning= |
|
|
|
{{Warning #2|Avoidable bug but stops glob2 from running|A bug in the new translations means that when you start up glob2 with all translations, it will not load (error in StringTable). This will hopefully be fixed soon, but in the mean time, open up texts.list.txt and delete all BUT the top two lines (leave keys.txt and en.txt)}} |
⚫ |
{{Warning|Caution|This guide wont be effective until July 20th when the files are garenteed to be uploaded and everything working. Till then, see an old revision of this page.}} |
|
|
|
|
|
|
__TOC__ |
|
__TOC__ |
|
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]. |
|
|
|
|
|
|
|
|
==Setting up Python/Scons, and Mercurial== |
|
==Setting up Python/Scons, and Mercurial== |
|
:* 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:\python\ (lowercase "python", default install is Python25, don't use 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:\python\ (lowercase "python", default install is Python25, don't use 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:\python\) |
|
:* 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:\python\) |
|
|
|
|
:* Download and install [http://mercurial.berkwood.com/binaries/Mercurial-0.9.4-f48290864625.exe Mercurial-0.9.4-f48290864625.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.4-f48290864625.exe Mercurial-0.9.4-f48290864625.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. |
|
|
|
|
Line 15: |
Line 14: |
|
==Setting up mingw== |
|
==Setting up mingw== |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">(Warning! For the first 3 steps, all install directories must be the exact same. Do not use spaces or capitals for the installation directory. For this guide, we will use the default c:\mingw)</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">(Warning! For the first 3 steps, all install directories must be the exact same. Do not use spaces or capitals for the installation directory. For this guide, we will use the default c:\mingw)</td></tr></table> |
|
|
|
|
:*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 package 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 package only during the installation selection process. |
|
|
|
|
:*Next, download and install [http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe MSYS-1.0.10.exe] in the same directory as MinGW (c:\mingw). 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). |
|
:*Next, download and install [http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe MSYS-1.0.10.exe] in the same directory as MinGW (c:\mingw). 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 mingw and msys (c:\mingw) |
|
:*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 mingw and msys (c:\mingw) |
|
|
|
|
|
|
|
|
|
==Compiling Prerequisites== |
|
==Compiling Prerequisites== |
|
:*Download [http://dl.sv.nongnu.org/releases/glob2/glob2_required_libs_mingw.tar.bz2 glob2_required_libs_mingw.tar.bz2] and put it in the home directory of mingw (c:\mingw\home\XXX\ where XXX is the username) |
|
:*Download [http://dl.sv.nongnu.org/releases/glob2/mingw/glob2_required_libs_mingw.tar.bz2 glob2_required_libs_mingw.tar.bz2] and put it in the home directory of mingw (c:\mingw\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. |
|
|
|
|
:*Go in the directory where you put the glob2_required_libs_mingw.tar.bz2 (for example cd ~) and untar the libraries using the command below. This process could take a while: |
|
:*Go in the directory where you put the glob2_required_libs_mingw.tar.bz2 (for example cd ~) and untar the libraries using the command below. This process could take a while: |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">tar jxf glob2_required_libs_mingw.tar.bz2 -C /</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">tar jxf glob2_required_libs_mingw.tar.bz2 -C /</td></tr></table> |
|
|
|
|
:*Finally, to allow the important command "make" to run, use the following command: |
|
:*Finally, to allow the important command "make" to run, use the following command: |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">cp -a /bin/mingw32-make.exe /bin/make.exe</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">cp -a /bin/mingw32-make.exe /bin/make.exe</td></tr></table> |
Line 36: |
Line 29: |
|
|
|
|
|
==Compiling Globulation 2== |
|
==Compiling Globulation 2== |
|
===Compiling from released source code=== |
|
===Step 1: Preparing for a compile=== |
|
⚫ |
====Compiling from Released source code==== |
|
:*Download and extract the release to c:\mingw\home\XXX\ (where XXX is the username), then run: |
|
:*Download and extract the release to c:\mingw\home\XXX\ (where XXX is the username), then run (changing the version numbers): |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">mv glob2-0.8.xx glob2_release</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">mv glob2-x.x.xx glob2_source</td></tr></table> |
|
|
|
|
|
====Compiling from Mercurial source files==== |
⚫ |
:*Open glob2_release/configure.in and find: |
|
⚫ |
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700"> CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"</td></tr></table> |
|
|
::and replace with: |
|
⚫ |
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700"> CPPFLAGS="$CPPFLAGS $SDL_CFLAGS -I/ usr/include/freetype2"<br />LDFLAGS="$LDFLAGS `sdl-config --libs` -lSDL_ttf"</td></tr></table> |
|
|
|
|
|
:*In the same file, find: |
|
⚫ |
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700"> LIBS="$LIBS -logg -lwsock32"</td></tr></table> |
|
|
::and replace with: |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">LIBS="$LIBS -logg -lwsock32 /lib/libvorbisfile.a /lib/libvorbis.a /lib/libogg.a"</td></tr></table> |
|
|
|
|
|
:*In order for compiling to work properly, open the mingw console, and run the following commands: |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">cd glob2_release</td></tr></table> |
|
|
: (note there is a . at the end of the following command) |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">cp /usr/bin/SDL.dll /usr/bin/libvorbis-0.dll /usr/bin/libogg-0.dll /usr/bin/libvorbisenc-2.dll /usr/bin/libfreetype-6.dll .</td></tr></table> |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">cp -a ./libgag/include/*.h ./libgag/src/</td></tr></table> |
|
|
|
|
|
:*Go to [http://hg.globulation2.org/glob2/?f=68b9b78ea4fa;file=bootstrap;style=raw the bootstrap file], right click, hit save page as, save it to your computer, the move it to the folder glob2_release (in c:\mingw\home\xxx\glob2_release) |
|
|
|
|
|
:*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: |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">./bootstrap && ./configure && make</td></tr></table> |
|
|
|
|
|
:*To make the executable smaller in size, run the following command: |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">strip ./src/glob2.exe</td></tr></table> |
|
|
|
|
⚫ |
===Compiling from Mercurial=== |
|
|
:*Download Globulation 2 from mercurial: |
|
:*Download Globulation 2 from mercurial: |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">hg clone http://hg.globulation2.org/glob2/</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">hg clone http://hg.globulation2.org/glob2/</td></tr></table> |
|
|
|
|
:*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): |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">hg clone -r master glob2 glob2-master</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">hg clone -r master glob2 glob2_source</td></tr></table> |
|
⚫ |
:* To get the data, maps, and campaigns needed to play the game, run the following commands: |
|
|
|
|
⚫ |
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700"> cd glob2_source</td></tr></table> |
|
:*Open glob2-master/configure.in and find: |
|
|
⚫ |
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700"> ./ syncdata</td></tr></table> |
|
⚫ |
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700"> ./syncmaps</td></tr></table> |
|
|
===Step 2: Continue compiling=== |
|
⚫ |
:*Open glob2_source/configure.in and find: |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"</td></tr></table> |
|
::and replace with: |
|
::and replace with: |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">CPPFLAGS="$CPPFLAGS $SDL_CFLAGS -I/usr/include/freetype2"<br />LDFLAGS="$LDFLAGS `sdl-config --libs` -lSDL_ttf"</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">CPPFLAGS="$CPPFLAGS $SDL_CFLAGS -I/usr/include/freetype2"<br />LDFLAGS="$LDFLAGS `sdl-config --libs` -lSDL_ttf"</td></tr></table> |
|
|
|
|
:*In the same file, find: |
|
:*In the same file, find: |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">LIBS="$LIBS -logg -lwsock32"</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">LIBS="$LIBS -logg -lwsock32"</td></tr></table> |
|
::and replace with: |
|
::and replace with: |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">LIBS="$LIBS -logg -lwsock32 /lib/libvorbisfile.a /lib/libvorbis.a /lib/libogg.a"</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">LIBS="$LIBS -logg -lwsock32 /lib/libvorbisfile.a /lib/libvorbis.a /lib/libogg.a"</td></tr></table> |
|
|
|
|
:*Before compiling glob2, run these commands from the mingw console: |
|
:*Before compiling glob2, run these commands from the mingw console: |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">cd glob2-master</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">cd glob2_source</td></tr></table> |
|
: (note there is a . at the end of the following command) |
|
: (note there is a . at the end of the following command) |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">cp /usr/bin/SDL.dll /usr/bin/libvorbis-0.dll /usr/bin/libogg-0.dll /usr/bin/libvorbisenc-2.dll /usr/bin/libfreetype-6.dll .</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">cp /usr/bin/SDL.dll /usr/bin/libvorbis-0.dll /usr/bin/libogg-0.dll /usr/bin/libvorbisenc-2.dll /usr/bin/libfreetype-6.dll .</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">cp -a ./libgag/include/*.h ./libgag/src/</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">cp -a ./libgag/include/*.h ./libgag/src/</td></tr></table> |
|
|
|
|
:*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: |
|
:*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: |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">./bootstrap && ./configure && make</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">./bootstrap && ./configure && make</td></tr></table> |
|
|
|
|
:*To make the executable smaller in size, run the following command: |
|
:*To make the executable smaller in size, run the following command: |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">strip ./src/glob2.exe</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">strip ./src/glob2.exe</td></tr></table> |
|
|
|
⚫ |
:* Finally, to get the data, maps, and campaigns needed to play the game, run the following commands: |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">./syncdata</td></tr></table> |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">./syncmaps</td></tr></table> |
|
|
|
|
|
|
|
|
|
|
==Testing Globulation 2 on windows== |
|
==Testing Globulation 2 on windows== |
|
:*Download glob2_windows_runtime.tar.bz2 |
|
:*Download glob2_windows_runtime.tar.bz2 |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">wget http://globulation2.org/dev/glob2_windows_runtime.tar.bz2</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">wget http://dl.sv.nongnu.org/releases/glob2/mingw/glob2_windows_runtime.tar.bz2</td></tr></table> |
|
|
|
|
:*Extract it with : |
|
:*Extract it with : |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">tar jxf glob2_windows_runtime.tar.bz2</td></tr></table> |
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #FFFFFF; padding: .3em .9em .3em; color: #FFFFFF; background-color: #114700">tar jxf glob2_windows_runtime.tar.bz2</td></tr></table> |
|
|
|
|
:*Copy the folders data/, maps/, and campaigns/ and the files AUTHORS and COPYING to glob2_runtime/, overwriting any existing files |
|
:*Copy the folders data/, maps/, and campaigns/ and the files AUTHORS and COPYING to glob2_runtime/, overwriting any existing files |
|
|
|
|
:*Copy glob2.exe which is in the src directory (glob2/src/) to glob2_runtime/ |
|
:*Copy glob2.exe which is in the src directory (glob2/src/) to glob2_runtime/ |
|
⚫ |
:*Run glob2.exe from the glob2_runtime directory and play :) |
|
|
|
|
⚫ |
:*Run glob2.exe from the glob2_runtime directory and play :) |
|
|
|
|
|
|
[[Category:Developer Resources]] |
|
[[Category:Developer Resources]] |