Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Initial Version and Version 1 of dev/WindowsMinGW/current


Ignore:
Timestamp:
Sep 21, 2010, 5:46:37 PM (14 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • dev/WindowsMinGW/current

    v1 v1  
     1= Windows with MingW =
     2
     3== MinGW ==
     4
     5{{{
     6#!div style="background-color: #D0D0F0; border: solid 1px #000000; margin-right: 200px;"
     7''Info: MinGW is a collection of tools (like GCC and more), used to compile source code on Windows.''
     8}}}
     9
     10Download and install [http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/mingw-get-inst-20100909/mingw-get-inst-20100909.exe/download MinGW].
     11 1. Select "Use pre-packaged repository catalogues"
     12 1. Chose an install path, default is {{{c:\mingw}}} but every other '''path without whitespaces''' works
     13 1. Select "C Compiler" and "C++ Compiler"
     14 1. Wait until the installer downloaded and installed all packages
     15
     16== MSYS ==
     17
     18{{{
     19#!div style="background-color: #D0D0F0; border: solid 1px #000000; margin-right: 200px;"
     20''Info: MSYS is a command shell, used to execute build scripts and more.''
     21}}}
     22
     23Download and install [http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe MSYS].
     24 1. Chose an install '''path without whitespaces''' and install MSYS
     25 1. (On some systems the post installation doesn't start (cmd.exe shows up with an error)[[br]]In this case execute {{{c:\<msys-install-path>\postinstall\pi.bat}}})
     26 1. A command shell opens, answer yes (y) twice
     27 1. Specify the path to your MinGW directory (by default this is {{{c:/mingw}}}).
     28
     29Switch to the home-directory of your MSYS installation: {{{c:\<msys-install-path>\home\<username>\}}}[[br]]
     30This is your homedirectory in MSYS, this is where the action takes place.
     31
     32'''In the following, we'll call this directory {{{c:\<msys-homedir>\}}} to make things shorter.'''
     33
     34Note: MSYS installs two shortcuts (by default in {{{Start/Programs/MinGW/MSYS/}}}): 1. "MSYS" (black background; an extension of window's cmd.exe) and 2. "MSYS (rxvt)" (yellow background; a more elaborate shell). We recommend the rxvt version, because it can be resized to full-screen, but Orxonox works with both. (Additional note: The sortcut on the desktop links to the worse version.)
     35
     36
     37== SVN ==
     38
     39{{{
     40#!div style="background-color: #D0D0F0; border: solid 1px #000000; margin-right: 200px;"
     41''Info: We use SVN to upload code to the server and to manage different versions (branches).''
     42}}}
     43
     44==== Get SVN: ====
     45To use [wiki:SVN] on your system we recommend TortoiseSVN, a very useful GUI-client. [http://tortoisesvn.net/downloads Download]
     46
     47TortoiseSVN is a shell extension. You can use it within Windows Explorer, which is very practical. Most options are available through the context menu (right mouse button).
     48
     49
     50==== Get the source: ====
     51Check out the Orxonox-repository into a folder named "trunk", for example {{{c:\<msys-homedir>\trunk\}}}. '''It's very important to use a directory inside your MSYS homedirectory, otherwise you can't compile.'''
     52 * URL: {{{https://svn.orxonox.net/game/code/trunk/}}}
     53 * Checkout directory: {{{c:\<msys-homedir>\trunk\}}}
     54
     55Now do the same with the data repository and store it in a directoy called "data_extern":
     56 * URL: {{{https://svn.orxonox.net/game/data/trunk}}}
     57 * Checkout directory: {{{c:\<msys-homedir>\data_extern}}}
     58
     59Now you should have the following directories in your home:
     60{{{
     61c:\<msys-homedir>\data_extern
     62c:\<msys-homedir>\trunk
     63}}}
     64
     65{{{
     66#!div style="background-color: #D0F0D0; border: solid 1px #000000;"
     67In TortoiseSVN this is done by right clicking into {{{c:\<msys-homedir>\}}} and chosing "SVN Checkout...". ([attachment:wiki:WindowsMinGW:orxonox_svn_checkout.gif see this picture])
     68
     69Then set the URL of the repository to {{{https://svn.orxonox.net/game/code/trunk/}}} and the checkout directory to {{{c:\<msys-homedir>\trunk\}}} (checkout depth should be "Fully recursive" and revision "HEAD").
     70Accept the certificate and enter your username and password in the authentication form (only if it's the first time you check out code from our server). ([attachment:wiki:WindowsMinGW:orxonox_svn_checkout_trunk.gif see this picture])
     71}}}
     72{{{
     73#!div style="background-color: #D0F0D0; border: solid 1px #000000; margin-top: 10px;"
     74If you're not using TortoiseSVN, use the "svn co <repository> <directory>" command. See [wiki:SVN] for more information.
     75}}}
     76
     77== Dependencies ==
     78
     79{{{
     80#!div style="background-color: #D0D0F0; border: solid 1px #000000; margin-right: 200px;"
     81''Info: Dependencies are external libraries that aren't included in the orxonox source.''
     82}}}
     83
     84Download the Orxonox dependencies: [http://svn.orxonox.net/downloads/windows/precompiled_dependencies/OrxonoxDeps_100921_5.0_MinGW.7z Download] (get 7-Zip [http://www.7-zip.org/ here]).[[br]]
     85Extract the archive into {{{c:\<msys-homedir>\}}}
     86
     87Now you should have the following directories in your home: ([attachment:wiki:WindowsMinGW:orxonox_directories.gif see this picture])
     88{{{
     89c:\<msys-homedir>\data_extern
     90c:\<msys-homedir>\dependencies
     91c:\<msys-homedir>\trunk
     92}}}
     93
     94==== OpenAL: ====
     95Make sure you have installed OpenAL, which might not be shipped with Windows. Download and install it from [http://connect.creativelabs.com/openal/Downloads/oalinst.zip here]. You can compile and run Orxonox without OpenAL, but no sound will be played.
     96
     97== CMake ==
     98
     99{{{
     100#!div style="background-color: #D0D0F0; border: solid 1px #000000; margin-right: 200px;"
     101''Info: CMake is a build-system. It is used to generate make-files or project-files for IDEs''
     102}}}
     103
     104Download the latest binary release from [http://www.cmake.org/cmake/resources/software.html here] and install it.
     105 * '''While installing check the option to "add CMake to the system PATH"'''
     106
     107== Build Orxonox ==
     108First we add an alias to the profile of MSYS which helps us creating make-files with CMake. Open the MSYS console and type the following lines:
     109{{{
     110echo alias cm=\'cmake .. -G \"MSYS Makefiles\"\' >> ~/.profile
     111source ~/.profile
     112}}}
     113
     114Change into the trunk folder and create a build directory:
     115{{{
     116cd trunk
     117mkdir build
     118cd build
     119}}}
     120
     121Now we use the alias "cm" we created before. This shortcut will invoke CMake and create the Makefiles. Type the following into the MSYS console:
     122{{{
     123cm
     124make
     125}}}
     126The first command ({{{cm}}}) will check your system (and the dependency directory) for all needed libraries, create the configuration and generate the makefiles. The second command ({{{make}}}) builds Orxonox.
     127
     128If you have a multicore CPU, use the {{{-j [arg]}}} option for {{{make}}} (where {{{[arg]}}} is the number of parallel build threads). For example {{{make -j3}}} will spawn 3 threads, which is a reasonable number for a dual-core CPU.
     129
     130If you get an error while executing one of those steps, report it in the [http://forum.orxonox.net/ Forum] or ask us in [irc://irc.orxonox.net/orxonox IRC].
     131
     132Compiling will take some time (CMake shows you the percentage). Be patient.[[br]]
     133
     134See some pictures of this:
     135 - [attachment:wiki:WindowsMinGW:orxonox_build1.gif Step 1]
     136 - [attachment:wiki:WindowsMinGW:orxonox_build2.gif Step 2]
     137 - [attachment:wiki:WindowsMinGW:orxonox_build3.gif Step 3]
     138
     139== Run Orxonox ==
     140If everything worked fine, start Orxonox with {{{c:\<msys-homedir>\trunk\build\run.bat}}} (you can't execute orxonox.exe directly).