Difference between revisions of "Compiling"
From VDrift
(→Ubuntu) |
|||
(5 intermediate revisions by the same user not shown) | |||
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 | + | * 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 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</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"> | ||
Line 51: | Line 53: | ||
The required libraries include: | The required libraries include: | ||
− | + | * [http://bulletphysics.org/wordpress/ Bullet] - Open Source Physics Library (minimum version 2.83). Only the following libraries are required: | |
− | * [http://bulletphysics.org/wordpress/ Bullet] - Open Source Physics Library (minimum version 2. | ||
** BulletCollision | ** BulletCollision | ||
** BulletDynamics | ** BulletDynamics | ||
** LinearMath | ** LinearMath | ||
− | |||
− | |||
* [http://curl.haxx.se/ libcurl] - Multiprotocol file transfer library (minimum version 7.21.6) | * [http://curl.haxx.se/ libcurl] - Multiprotocol file transfer library (minimum version 7.21.6) | ||
* [http://xiph.org/vorbis/ libvorbis] - The Vorbis General Audio Compression Codec Library (minimum version 1.2.0) | * [http://xiph.org/vorbis/ libvorbis] - The Vorbis General Audio Compression Codec Library (minimum version 1.2.0) | ||
− | + | * [http://www.libsdl.org/ SDL] - Simple DirectMedia Layer Library (minimum version 2.0.0) | |
− | * [http://www.libsdl.org/ SDL] - Simple DirectMedia Layer Library (minimum version | + | * [http://www.libsdl.org/projects/SDL_image/ SDL_image] - Image file loading library (minimum version 2.0.0) |
− | |||
− | * [http://www.libsdl.org/projects/SDL_image/ SDL_image] - Image file loading library (minimum version | ||
Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. | Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. | ||
Line 69: | Line 66: | ||
====Fedora==== | ====Fedora==== | ||
All required packages can be installed using this command: | All required packages can be installed using this command: | ||
− | sudo yum install bullet-devel gcc-c++ | + | sudo yum install bullet-devel gcc-c++ libvorbis-devel scons SDL2-devel SDL2_image-devel curl-devel |
====Ubuntu==== | ====Ubuntu==== | ||
− | Ubuntu does not include | + | Ubuntu 12.04 does not include libbullet and SDL2 packages. They are available in following ppas though: |
− | |||
− | |||
− | |||
− | + | sudo add-apt-repository ppa:roblib/ppa | |
− | + | sudo add-apt-repository ppa:zoogie/sdl2-snapshots | |
− | |||
− | |||
− | + | All required packages can be installed using this command: | |
− | |||
− | |||
− | + | sudo apt-get install g++ scons libsdl2-dev libsdl2-image-dev libbullet-dev libvorbis-dev libcurl4-gnutls-dev | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===Compiling=== | ===Compiling=== |
Latest revision as of 12:22, 24 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.
Expand
Windows
Expand
OS X
Expand
Linux
Expand