Mingw compilationFrom Globulation2Revision as of 07:58, 29 July 2010 by FoxyBurner (talk | contribs) (→B.1] The "Project source files" (known formerly as ''Mercurial Source'') [NO TURTOISE API]) This page explains how to compile Globulation 2 on windows using mingw. Contents
Installing required software for tutorialSetting up Python, Scons, Mercurial, and NSISNOTE: For Windows VISTA and above Users: You need to run as an administrator to install those packages, The Msi installer are perfect , some other got to have warnings some because no Valid or missing The Digital windows OS certificate (Xp, Vista,7 :logo ) accept to install it anyways, and another may ask for an authorization to install some other dependence files , do accept. For some "setup.exe" you might need to run them as administrator by right-clicking on it and select run as an administrators (specially for scons & MinGW)
TortoiseHg is a set of graphical tools and a shell extension for the Mercurial distributed revision control system. On Windows, TortoiseHg consists of a shell extension, which provides overlay icons and context menus in your file explorer, and a command line program named hgtk.exe which can launch the TortoiseHg tools. Binary packages of TortoiseHg for Windows come with Mercurial and a merge tool and are thus completely ready for use “Out of the Box”.
OPTIONAL DOWNLOAD: (To create a windows installer)
(To be proud of using MS WINDOWS GUI for tarballing archives matter) (In case of Bug or Issues, who knows ? )
Setting up MinGW and MSYS
Compiling Prerequisites
NOTE: On Windows VISTA and Above you might need the Administrators Right to access copy or drag and drop files into the C Drive trees. an inheritance from linux chmod :( ONCE Done, close the Archiver, and Windows that we opened for the drag and drop.
OLD_METHODE , 'command line geek' -This will be cleared soon- :
tar jxf glob2_required_libs_mingw-scons.tar.bz2 -C / Compiling Globulation 2Step 1: Choosing from What Source Code to compileINFO: 'Mercurial source' is a well known expression but at my sens are an Idiom abuse, What People called here mercurial Sources,is designing in reality the Globulation Source Development Pool using Mercurial, and that is the way I would prefer to name it "Project source files".Mercurial is indeed a Sotfware who organized the Globulation project development and not The project name itself, but I will sometime refer to "mercurial sources" idiom inside this wiki, since this is a pretty common well-known-expression.
A ] Official Web site Released source code
B.1] The "Project source files" (known formerly as Mercurial Source) [NO TURTOISE API]Hint: If you got the TortoiseHG (is friendly Windows software appearance using Mercurial ) you can USE IT, by going down now to the B.2 Section!
hg clone http://hg.globulation2.org/glob2-new glob2-local-repository
DESCRIPTION:
hg clone -r [branch name you picked above e.g beta5-rc] glob2-local-repository glob2_source_building cd glob2_source_building Hg clone HELP here.
The [OPTION] -C will assure you that no Hybrid code will be made by any merge branching uncommitted 'revision'. if the update tag chosen is an no consequent one like you choose to apply a Revision design for Beta3-series on your chosen branch beta5-rc , The updater will abort with no modification -If I correctly get the meaning in the manual see: Hg manual. Hint: Branch name could be alias as 'Feature-pool' and tag as 'Revision' ,both are proper called 'changeset' in the Hg manual. hg update -C [tag 'revision' name you'd like to have e.g tip or beta4.5 ] Hints: The list of tags are listed with the command "hg tags" To get more information about How Mercurial Work have look there :Mercurial. B.2] The "Project source files" -formerly called "Mercurial-sources"- using HgTortoise (is a Mercurial graphical tools set )[USING TURTOISE API]WARNINGS: THIS SECTION IS EXPERIMENTAL AND YET UNDER CONSTRUCTION and NOT VERIFY ! Step 2: actually compiling
cd glob2_source_building scons
YOU NEED to have installed as an Administrator "scons-1.1.0" this exact version IF not the Issue#3 will occur [Error should be like : "../bin/scons", line 7, in <module> import SCons.Script ImportError: No module named SCons.Script and then a painful debugging process will be engage :(
Also the Python SHOULD BE a V2.x.x release not The V3.x.x.x who break compatibility with scons ! Error code will like : File "c:\Python26\Lib\site-packages\scons-2.0.0.final.0\SCons\__init__.py", line 43, <in module> import SCons.compat ImportError: No module named SCons.compat (same things with) _scons_builtins The Python Website -official- clearly show that even the __init__.py file, line 42 !
At first start the application, the game, is freezing , because it is setting many parameters, so on a slow/busy machine this could take a while.
Another old_school Method for testing ( Did not work on Windows, at least mine :( ! -Once compiling has finished, run (if you 'r ,kamikaze, the following to prepare Globulation 2 for testing: cp -a /local/bin/SDL.dll /local/lib/*.dll . cp -a ./src/glob2.exe . -Run glob2.exe from the glob2_source_building directory and play :) [this stage too might lead to lack of dll,bond ! who said that command line are better .... Building a Globulation 2 NSIS installer
cd glob2_source_building 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. sh: /bin/scons: No such file or directory(Wrote in Summer-2010)
I 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 FIRST LAZY WAY: Remove the actual Python and scons program from your computer, then download and install the old python2.6 **AND** scons1.1.0 version for windows if they are still available for download. The SECOND LAZY WAY: (has not been test yet and may not solve the trouble) Download the latest python and install it on c:\python26 and the latest scons on c:\python26\lib\site-packages\scons-1.1.0\ 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 'gSConscript.pylob2_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 #3.1 scons line 7 ImportError: No module named SCons.ScriptIts more likely you got the right python26 but the scons is not the scons-1.1.0 version, if this version is not any longer available to download, try to EDIT the scons file with the your exact scons version. you can know it by looking for the file SConscript.py in your computer and look closely the path the name you look for is right after the "....site-packages\scons-1.3.0\SCons\Script\SConscript.pyc" . More details on the Issue#3 who is related to.
ISSUE #3.2 ImportError: No module named SCons.compat or/and _scons_builtinsYour Python Version installed in your Windows is not compatible with scons , ALL Python v3.x.x.x Are NOT COMPATIBLE with Scons v1.1.0 or v2.0.0.final.0 (as I am typing this help august-2010), please consider to un-install it and get the python26 and scons-1.1.0 who is the best bet ! (related to Issue#3) ISSUE #4. No SConstruct file found( users made mistake ) This is because your are not in the working source directoring to compile or The Source code has been altered or missing ! re-do step by step the wiki skipping the Download & settings stages. a cd glob2_source_building scons might help thoough ! ISSUE #Final. Glob2.exe *.dll missing (SDL or else)This is happenning because you use the old_method by command line at after the compilation was done. Fixed it by doing the new method using mouse&keyboard along with Windows GUI, remember the 'test' folder on your desktop :) ConclusionThat concludes this Mingw compilation tutorial. When I will know How to use friendly the GUI Hgturtoise , I will Update this Tutorial, that mean it will have less command line ever, in fact command line will be limited to the ONLY Source code compilation , up to this comming day , take this Wiki has a reliable and Stable one , since I made effort to correct the main errors people got while folllowing it. Surely, Section designing need yet to be perform, and it will be -especialy the ISSUES Section, I do not like the way it is shown ! Other improvement will follow soon, as Clearing messing Command line who are confusing MS_windows user.
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 NEW Trouble, 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. | ||