Difference between revisions of "Compiling"

From VDrift
Jump to: navigation, search
Line 5: Line 5:
 
==Windows==
 
==Windows==
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
 +
===Building with MSYS2===
 +
* This is the recommended method to build VDrift. It does not require vdrift-win.
 +
* Install [http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/ MSYS2] and update local packages.
 +
* Install build tools.
 +
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-pkgconf scons
 +
* Install VDrift dependencies.
 +
pacman -S mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-bullet mingw-w64-x86_64-curl mingw-w64-x86_64-libvorbis
 +
* Build VDrift using MinGW-w64 Win64 Shell.
 +
scons
 +
* For more build options run
 +
scons --help
 +
 
===Building with Code::Blocks/MinGW (obsolete)===
 
===Building with Code::Blocks/MinGW (obsolete)===
 
* Download the [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler.
 
* Download the [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler.
Line 13: Line 25:
  
 
===Building with MSVC (obsolete)===
 
===Building with MSVC (obsolete)===
* Run the appropriate command from the '''vdrift''' folder to generate the build files.
+
* Run the appropriate command from the '''vdrift''' folder to generate the project files.
 
** Microsoft Visual C++ 2008:
 
** Microsoft Visual C++ 2008:
 
  vdrift-win\premake4 vs2008
 
  vdrift-win\premake4 vs2008
Line 19: Line 31:
 
  vdrift-win\premake4 vs2010
 
  vdrift-win\premake4 vs2010
  
===Building with Scons(broken)===
 
{{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}}
 
* Download the [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler.
 
* Your PATH environment variable should contain the MinGW bin path (e.g. C:\MinGW\bin;).
 
* Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4].
 
* Run the installer and accept all the defaults.
 
* Download [http://www.scons.org/ SCons 1.20].
 
* Run the installer. It should find your Python installation, accept all defaults.
 
* Your PATH environment variable should contain the Python and Python scripts paths (e.g. C:\Python26;C:\Python26\Scripts;).
 
* Run the following command from within the '''vdrift''' folder:
 
tools/win/bin/build_vdrift.bat
 
 
</div></div>
 
</div></div>
  
 
<div class="mw-collapsible mw-collapsed">
 
<div class="mw-collapsible mw-collapsed">
 +
 
==OS X==
 
==OS X==
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">

Revision as of 08:40, 2 June 2015

This page shows how to compile VDrift from source. It assumes you have downloaded the source code either by getting the source package from the latest release, or by getting the development version.

Windows

OS X

Linux

FreeBSD