Windows with MinGW-w64 and GCC
Download the latest binary release from here and install it.
- While installing check the option to "add CMake to the system PATH"
MSYS2 and MinGW-w64
Download and install MSYS2 according to the the installation guide on this page: MSYS2 installer.
- Open the MSYS2 console and type "pacman -S make" to install make
- Install MinGW-w64:
- For 32bit-builds type "pacman -S mingw-w64-i686-gcc" in the MSYS2 console
- For 64bit-builds type "pacman -S mingw-w64-x86_64-gcc" in the MSYS2 console
- Close MSYS2 and open it again by using the correct shortcut (see the note below). Type "gcc --version" to find the version of gcc. Use this version later on to chose the correction dependency-package.
Note: MSYS2 installs three shortcuts:
- msys2_shell.bat: a neutral version that does not contain MinGW-w64 (not important for us)
- mingw32_shell.bat: adds the 32bit-installation of MinGW-w64 to $PATH (if installed) → use this for 32bit-builds
- mingw64_shell.bat: adds the 64bit-installation of MinGW-w64 to $PATH (if installed) → use this for 64bit-builds
You can install both versions of MinGW-w64 (32bit and 64bit) at the same time. You can determine which version to use by starting MSYS2 with the corresponding shortcut.
Switch to the home-directory of your MSYS2 installation: c:\<msys2-install-path>\home\<username>\
This is your homedirectory in MSYS2, this is where the action takes place.
In the following, we'll call this directory c:\<msys2-homedir>\ to make things shorter.
Note: It's also possible to install different versions of GCC. Follow the link on this page and install an independent version of MinGW-w64. Next go to /etc/fstab in MSYS2 and map the installation either to mingw32 or mingw64.
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:\<msys2-homedir>\trunk\. It's very important to use a directory inside your MSYS2 homedirectory, otherwise you can't compile.
- URL: https://svn.orxonox.net/game/code/trunk/
- Checkout directory: c:\<msys2-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:\<msys2-homedir>\data_extern
Now you should have the following directories in your home:
Go to the Download page and download the dependency package for MinGW-w64 that fits your version of GCC (type "gcc --version" in the MSYS2 console to find the installed version of GCC).
Extract the archive into c:\<msys2-homedir>\ (get 7-Zip here)
c:\<msys2-homedir>\data_extern c:\<msys2-homedir>\dependencies c:\<msys2-homedir>\trunk
Note: If someone is interested in building the dependencies on his own, the current build-scripts can be found here.
Make sure you have installed OpenAL, which might not be shipped with Windows. Download and install it from here.
First we add an alias to the profile of MSYS2 which helps us creating make-files with CMake. Open the MSYS2 console and type the following lines:
echo alias cm=\'cmake .. -G \"MSYS Makefiles\"\' >> ~/.profile source ~/.profile
Change into the trunk folder and create a build directory:
cd trunk mkdir build cd build
Now we use the alias "cm" we created before. This shortcut will invoke CMake and create the Makefiles. Type the following into the MSYS2 console:
cm make -j8
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 command (make) builds Orxonox (-j8 will spawn 8 threads).
Compiling will take some time (CMake shows you the percentage). Be patient.
See some pictures of this:
If everything worked fine, start Orxonox with c:\<msys2-homedir>\trunk\build\run.bat (you can't execute orxonox.exe directly).