= Windows with MingW = [[TOC(heading=Platforms, depth=1, WindowsMinGW, VisualStudio, LinuxGentoo, LinuxDebian, LinuxUbuntu, LinuxTardis)]] == MinGW == {{{ #!div style="background-color: #D0D0F0; border: solid 1px #000000; margin-right: 200px;" ''MinGW, a contraction of "Minimalist GNU for Windows", is a port of the GNU Compiler Collection (GCC), and GNU Binutils, for use in the development of native Microsoft Windows applications.'' }}} Download and install [http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/ MinGW]. 1. Select "Download and install" 1. Select "Current" 1. Select "MinGW base tools", "g++ compiler", and "MinGW Make" 1. Chose an install path, default is {{{c:\mingw}}} but every other '''path without whitespaces''' works == MSYS == {{{ #!div style="background-color: #D0D0F0; border: solid 1px #000000; margin-right: 200px;" ''MSYS, a contraction of "Minimal SYStem", is a Bourne Shell command line interpreter system. Offered as an alternative to Microsoft's cmd.exe, this provides a general purpose command line environment, which is particularly suited to use with MinGW, for porting of many Open Source applications to the MS-Windows platform.'' }}} Download and install [http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe MSYS]. 1. Chose an install path without whitespaces 1. On some systems: If the post installation doesn't start (cmd.exe shows up with an error), execute {{{c:\\postinstall\pi.bat}}} 1. Answer yes (y) twice 1. Specify the path to your MinGW directory (by default this is {{{c:/mingw}}}). Switch to the home-directory of your MSYS installation: {{{c:\\home\\}}}[[br]] This is your homedirectory in MSYS, this is where the action takes place. '''In the following, we'll call this directory {{{c:\\}}} to make things shorter.''' == SVN == To use [wiki:SVN] on your system we recommend TortoiseSVN, a very useful GUI-client. [http://tortoisesvn.net/downloads Download] TortoiseSVN 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). == Get the source == Check out the Orxonox-repository into a folder named "trunk", for example {{{c:\\trunk\}}}. '''It's very important to use a directory inside your MSYS homedirectory, otherwise you can't compile.''' * URL: {{{https://svn.orxonox.net/game/code/trunk/}}} * Checkout directory: {{{c:\\trunk\}}} {{{ #!div style="background-color: #D0F0D0; border: solid 1px #000000;" In TortoiseSVN this is done by right clicking into {{{c:\\}}} and chosing "SVN checkout...". Then set the URL of the repository to {{{https://svn.orxonox.net/game/code/trunk/}}} and the checkout directory to {{{c:\\trunk\}}} (checkout depth should be "Fully recursive" and revision "HEAD"). Accept 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). If you're not using TortoiseSVN, use the "svn co " command. See [wiki:SVN] for more information. }}} Now do the same with the data repository and store it in a directoy called "data_extern": * URL: {{{https://svn.orxonox.net/game/data/trunk}}} * Checkout directory: {{{c:\\data_extern}}} Now you should have the following directories in your home: {{{ c:\\data_extern c:\\trunk }}} == Dependencies == Download the Orxonox dependencies: [http://svn.orxonox.net/downloads/windows/precompiled_dependencies/OrxonoxDeps_091009_4.0_MinGW.7z Download] (get 7-Zip [http://www.7-zip.org/ here]).[[br]] Extract the archive into {{{c:\\}}} Now you should have the following directories in your home: {{{ c:\\data_extern c:\\dependencies c:\\trunk }}} == OpenAL == Make sure you have installed OpenAL (might not be shipped with Windows 7). Otherwise you can compile and run everything but no sound will be played. == CMake == Now we can build Orxonox. To do so, we need CMake. CMake is a cross-platform system for build automation. Download the latest binary release ('''at least version 2.6''') from [http://cmake.org/HTML/Download.html here] and install it. * '''While installing check the option to "add CMake to the system PATH"''' Open {{{c:\\etc\profile}}} and add the following line at the bottom of the file: {{{ alias cm='cmake .. -G "MSYS Makefiles"' }}} == Building Orxonox == Open the MSYS console, change into your trunk folder and create an output directory for the binaries: {{{ $ cd trunk $ mkdir build $ cd build }}} Now we use the alias "cm" from the previous section. This shortcut will invoke CMake and create the Makefiles. Type the following into the MSYS console: {{{ $ cm $ make }}} The first command "cm" will check your system (and the dependency directory) for all needed libraries, create the configuration and generate the makefiles. The second "make" command builds Orxonox. If you have a multicore CPU, use "make -j3" instead of just "make". If 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]. Compiling will take some time (CMake shows you the percentage). Be patient.[[br]] If everything worked fine, start Orxonox with {{{c:\\trunk\build\run.bat}}} (you can't execute orxonox.exe directly).