-
Notifications
You must be signed in to change notification settings - Fork 26
Build Instructions
It is assumed you have a working development environment including C compiler which will work with CMake. It is also assumed that you have a working git installation and know how to use it.
For all platforms, you must first clone the repository and create a "build/" directory in the repository:
git clone https://github.com/OpenSWE1R/openswe1r.git
cd openswe1r
mkdir build
cd build
All of the following instructions should be ran from the newly created "build/" directory, unless noted otherwise.
After following the instructions for your platform below, you can try some of the more advanced Build Options.
Only compilation for x86 and x64 are officially supported.
Platform requirements
Make sure you have installed a full version of Visual Studio 2017. The Community Edition is available for free, but will require a free registration at Microsoft after a short period of time. Additionally, you need Microsofts vcpkg, a package manager for Windows. Please follow the vcpkg quick-start guide on its repository if you don't have it installed already. Optionally, you can also install an external installation of CMake.
Install dependencies
You also need to install the following vcpkg packages. If vcpkg
is not in your PATH
variable, you should run the following command from your vcpkg directory:
x86:
vcpkg install sdl2:x86-windows unicorn:x86-windows glew:x86-windows openal-soft:x86-windows enet:x86-windows
x64:
vcpkg install sdl2:x64-windows unicorn:x64-windows glew:x64-windows openal-soft:x64-windows enet:x64-windows
You don't need a "build/" folder for this platform
Generate build files
In order to generate build files, you'll first have to create a settings file for CMake.
FIXME
Building
FIXME
Generate build files
x86:
cmake -G "Visual Studio 15 2017" -DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake ..
x64:
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake ..
Building
msbuild msvc_build/openswe1r.sln
Only compilation for x86 and x64 are officially supported.
Platform requirements
Make sure you have MSYS2 installed as explained on the official website. Please make sure to also update your installation using pacman after going through the graphical setup. This is also explained on the website, but often ignored by users.
Once you have finished the installation of MSYS2, you can close the default MSYS2 Shell. The MSYS2 Shell will not work for the following steps. Instead, you have to open a MINGW32 Shell (for x86 builds) or MINGW64 Shell (for x64 builds) to do the following steps. These MINGW Shells are also included with MSYS2 and are available from your Windows Start menu.
Install dependencies
x86:
pacman -S mingw-w64-i686-cmake mingw-w64-i686-unicorn mingw-w64-i686-SDL2 mingw-w64-i686-glew mingw-w64-i686-openal mingw-w64-i686-enet
x64:
pacman -S mingw-w64-x86_64-cmake mingw-w64-x86_64-unicorn mingw-w64-x86_64-SDL2 mingw-w64-x86_64-glew mingw-w64-x86_64-openal mingw-w64-x86_64-enet
Generate build files
cmake -G 'MSYS Makefiles' ..
Building
make
Install dependencies
brew install cmake
Native:
brew install sdl2 unicorn glew openal-soft enet
Generate build files
cmake ..
Building
make
Install dependencies
apt-get install cmake
Native:
apt-get install libopenal-dev libenet-dev libglew-dev libsdl2-dev
Generate build files
mkdir unicorn
cd unicorn
wget https://github.com/unicorn-engine/unicorn/archive/1.0.1.tar.gz
tar xf 1.0.1.tar.gz --strip-components=1
UNICORN_ARCHS="x86" ./make.sh
cd ..
UNICORNDIR="$PWD/unicorn" cmake ..
Building
make
Install dependencies
pacman -S cmake
Native:
pacman -S community/unicorn extra/sdl2 extra/glew extra/openal community/enet
Generate build files
cmake ..
Building
make
Install dependencies
zypper in cmake
Native:
zypper in libSDL2-devel glew-devel openal-soft-devel enet-devel
Generate build files
mkdir unicorn
cd unicorn
wget https://github.com/unicorn-engine/unicorn/archive/1.0.1.tar.gz
tar xf 1.0.1.tar.gz --strip-components=1
UNICORN_ARCHS="x86" ./make.sh
cd ..
UNICORNDIR="$PWD/unicorn" cmake ..
Building
make