Skip to content

Building from Source

Marian Stramm edited this page Oct 28, 2015 · 2 revisions

Adapted from the instructions on the forum.

Prerequisites

  • git
  • cmake
  • working compiler (mingw, mingw64, visual studio 20xx)
    • if you want to target windows xp with VS2012, you have to update it to the latest

Quick instructions

Visual Studio

  • Get the sources
  • Run cmake-gui
    • Select source directory (ends with \BlackboxZero)
    • Select build directory (should not be the same as source directory)
    • Configure
    • Build
  • Open the Solution
  • Build
  • Build project install

Full instructions (for Visual Studio)

1. Get the sources from github

git clone https://github.com/xzero450/bbclean-xzero450.git

There are two branches right now (as of january 2014):

  • master: contains 1.17.1 as committed by Jonathan "xzero450".
  • devel: contains the current development version

Switch to devel branch:

  git checkout devel

then init submodules:

  git submodule init
  git submodule sync
  git submodule update --recursive

Note: for a good git guide check out Wine's Wiki

2. cmake

Run cmake-gui (by default it's in C:\Program Files (x86)\CMake\bin\cmake-gui.exe)

CMake in four easy steps

  1. Select bb's source directory (ends in \BlackboxZero)
  2. Select the build directory (where the build-specific files will be)
  3. Click Configure (and select your build environment)
  4. Click Generate

Note: it is recommended to have a build directory separate from the source directory Note: the installation directory can be specified via command line or by modifying BlackBoxZero/CMakeLists.txt

3. Open the solution in Visual Studio

Select your favorite configuration and hit F5

KNOWN ISSUES

  • i do not think the "do not overwrite config files" during building INSTALL target works correctly, so BACKUP YOUR CONFIGS
  • some doc files seems to be missing in install dir

Development environment / compilers notes:

Eclipse + mingw64

http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html [https://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/heliossr2](Eclipse (at least 3.6 i.e. Helios) or newer Kepler)

http://cznic.dl.sourceforge.net/project/mingwbuilds/host-windows/releases/4.8.0/64-bit/threads-posix/seh/x64-4.8.0-release-posix-seh-rev2.7z

Then run cmake-gui for example.

if you want to have a control over compiler you may select the second radio button:

CMake Eclipse config 1 CMake Eclipse config 2