Mingw compilationFrom Globulation2This page explains how to compile Globulation 2 on windows using mingw. ContentsInstalling required software for tutorialSetting up Python, Scons, Mercurial, and NSIS
(To create a windows installer)
Setting up MinGW and MSYS
echo "c:/mingw /mingw" > /etc/fstab Compiling Prerequisites
tar jxf glob2_required_libs_mingw-scons.tar.bz2 -C / Compiling Globulation 2Step 1: Preparing for a compileCompiling from Released source code
mv glob2-x.x.xx glob2_source Compiling from Mercurial source files
hg clone http://hg.globulation2.org/glob2-new glob2
cd glob2 hg branches hg tags
hg update -C \[branch name or tag name you picked above\] Step 2: actually compiling
scons
cp -a /local/bin/SDL.dll /local/lib/*.dll . cp -a ./src/glob2.exe .
Building a Globulation 2 NSIS installer
cd glob2_source cd windows glob2_make_win32.sh
Possible IssuesISSUE #1.Make sure you have no hidden GNU-GCC installed somewhere. GCC is for example included in the FreePascal-Compiler. (You won't find any Lib anymore if another GCC is activ.) ISSUE #2.Make sure path to GCC is set in Path Enviroment Variable. The Scons-Script just aborts (can't find libSDL) if it is not. ISSUE #3. scons: No such file or directory TroubleI got this trouble as many other people (http://globulation2.org/forums/viewtopic.php?t=210). It is not quite easy to explain how to make-it-works,The solution could be fixed easily but have to be dynamic with ever new python & scons product version . So this Trouble could come over again later.
This comes from a "linux-kind-link" who has been designed for Python 2.6 AND scons-1.1.0 Versions, Guess what this link is (OUT TO DATE) due to the fact that the Python today version and scons have evolve their name, their path could too ! That said, as you see The Trouble will come over and over if the way to bond the scoms path to the mingw sh (linux command bash, & emulated environment) will stay like that.
Here some ideas: We might need to keep up-to-date either this Wiki page and the scoms file provided in the tarball file call 'Prerequisites' (http://dl.sv.nongnu.org/releases/glob2/mingw/glob2_required_libs_mingw-scons.tar.bz2). Yes, telling people what Python & scoms version STRICTLY to use and keeping this up to date with news release (because their release will getting old and might not stay available for download).
The LAZY WAY: Try to download the old python2.6 **AND** scons1.1.0 version for windows if they are still available for download. OR THE MOST COMPLICATED WAY: Editing the scoms file. File with no Extension and normaly "located" at "c:\msys\1.0\bin\" or might also work or be found there at "c:\mingw\bin\" you should use a proper Text Editor , do not even think to use the MS notepad because it does sometime files coruption, at least you may use MS WORDPAD at your own files risk !,Better to use the Free Notepad++ who really edit well available as portable application also. For Editing the ORIGINAL scoms file : Replace the line: #! C:/Python26/python , by your real information and software version and path location: #! Drive:/Python_version_location/python AND the two next occurrences of the expression or chart: 'scons-1.1.0' by your actual 'scons-version.x.x.x.' Try to launch again 'scoms' in the 'glob2_source' folder from MSYS application (the emulated *NIX environment & prompt) , in fact the STEP 2 of this Wiki page, If 'scoms' start compiling - a lot of information will be writting in the MSYS application windows, you 'r done !
you might need to check and found if your scons is on the right path as for the scons v1 it is like C:\Python27\Lib\site-packages\scons-1.3.0\SCons\Script\SConscript.pyc IF the path Drive:\Python_version_path\Lib\site-packages\scons-version.x.x.x\SCons\" is not , you may need also to modified some other chart or expression in quotation mark e.g 'scons-1.1.0' to 'scons-2.0.0' You should found anyway on your computer somewhere the file 'SConscript.pyc' if the scons is correctly installed.
ISSUE #4.Some other little trouble occurred with .dll location after a correct compilation ,but this could be handle quickly and I will explain it latter. ConclusionThat concludes this Mingw compilation tutorial. Well it does have again some correction to bring to this tutorial,like the use of Windows GUI for un-tarballing archives and copy and past more than the use of command line, after all we are under windows and this is a windows topic so we will try to clear code line who can be done by GUI application such as 7zip or Winrar, and many else page-improvement. Also to give you and idea on a 4 cores pentium cpu @ 2.33GHZ the compilation of the RC beta5 got 12 minutes and the binary (Glob2.exe file) "pound" 133MB !! well the other geek guys made one at 98MB so we are 1.32 time more weighty with this type of compilation. But clearly as today the comparison between Beta4 & Beta 5 is amazing by the Glob2 binary file size ! from 4.8kb to 100Mb .
If you have any problems, please write a bug report and one of the Windows maintainers should be able to help you. More information on bug reports can be found at the Bug Reports page. Also think about the IRC , easy connexion via YOG. Happy compiling. | ||