Version 3 (modified by landauf, 14 years ago) (diff) |
---|
Windows with MingW with GCC v3.4.5 (outdated)
MinGW
Info: MinGW is a collection of tools (like GCC and more), used to compile source code on Windows.
Download and install MinGW.
- Select "Download and install"
- Select "Current"
- Select "MinGW base tools", "g++ compiler", and "MinGW Make"
- Chose an install path, default is c:\mingw but every other path without whitespaces works
MSYS
Info: MSYS is a command shell, used to execute build scripts and more.
Download and install MSYS.
- Chose an install path without whitespaces and install MSYS
- (On some systems the post installation doesn't start (cmd.exe shows up with an error)
In this case execute c:\<msys-install-path>\postinstall\pi.bat) - A command shell opens, answer yes (y) twice
- Specify the path to your MinGW directory (by default this is c:/mingw).
Switch to the home-directory of your MSYS installation: c:\<msys-install-path>\home\<username>\
This is your homedirectory in MSYS, this is where the action takes place.
In the following, we'll call this directory c:\<msys-homedir>\ to make things shorter.
Note: 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.)
SVN
Info: We use SVN to upload code to the server and to manage different versions (branches).
Get SVN:
To use SVN? on your system we recommend TortoiseSVN, a very useful GUI-client. 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:\<msys-homedir>\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:\<msys-homedir>\trunk\
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:\<msys-homedir>\data_extern
Now you should have the following directories in your home:
c:\<msys-homedir>\data_extern c:\<msys-homedir>\trunk
In TortoiseSVN this is done by right clicking into c:\<msys-homedir>\ and chosing "SVN checkout…". (see this picture)
Then 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"). 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). (see this picture)
If you're not using TortoiseSVN, use the "svn co <repository> <directory>" command. See SVN? for more information.
Dependencies
Info: Dependencies are external libraries that aren't included in the orxonox source.
Download the Orxonox dependencies: Download (get 7-Zip here).
Extract the archive into c:\<msys-homedir>\
Now you should have the following directories in your home: (see this picture)
c:\<msys-homedir>\data_extern c:\<msys-homedir>\dependencies c:\<msys-homedir>\trunk
OpenAL:
Make sure you have installed OpenAL, which might not be shipped with Windows. Download and install it from here. You can compile and run Orxonox without OpenAL, but no sound will be played.
CMake
Info: CMake is a build-system. It is used to generate make-files or project-files for IDEs
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 here and install it.
- While installing check the option to "add CMake to the system PATH"
Open c:\<msys-install-path>\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 Forum or ask us in IRC.
Compiling will take some time (CMake shows you the percentage). Be patient.
If everything worked fine, start Orxonox with c:\<msys-homedir>\trunk\build\run.bat (you can't execute orxonox.exe directly).