Build Workflow

From Sepiola Wiki
Jump to: navigation, search

Contents

Requirements

The following packages are required to build Sepiola (in their respective versions for the desired target):

  • CMake
  • Qt 4 library and headers
  • Boost
  • GCC or Clang with C++11 support
  • NSIS

Use your Linux distributions package manager to install them.

For Windows, we furthermore require the VSS SDK to be present.

The following setups are done on our Jenkins installation, see also Continuous Integration.

Building from source for Linux

Native

# switch to the directory of the Git checkout or the unpacked source tarball
cd sepiola
 
mkdir build
cd build
 
cmake ..
make
make package

32bit

# switch to the directory of the Git checkout or the unpacked source tarball
cd sepiola
 
mkdir build32
cd build32
 
CFLAGS="-m32" CXXFLAGS="-m32" exec /bin/setarch i686 cmake ..
make
make package

Building from source for Windows

Building on Windows is currently not supported. We are using the MinGW cross-compiler on Fedora to build the Windows binaries. The following setup therefore requires a Fedora Linux installation:

First install the required tools and libraries:

# common build tools
yum install cmake make
 
# toolchain and libs to build for Linux
yum install gcc-c++ glibc-devel.{i686,x86_64} libstdc++-devel.{i686,x86_64} boost-devel.{i686,x86_64} qt.{i686,x86_64} qt-devel.{i686,x86_64}
 
# toolchain and libs to build for Windows
yum install mingw*-gcc mingw*-gcc-c++ mingw*-qt* mingw*-boost* mingw*qmake mingw*nsis mingw*-glib2 *pixman* msitools.x86_64
 
# required to (re-)build rsync & ssh
yum install openssl-devel.{i686,x86_64} zlib-devel.{i686,x86_64} libacl-devel.{i686,x86_64} libattr-devel.{i686,x86_64} popt-devel.{i686,x86_64}

As already mentioned we need the VSS SDK from Microsoft:

# script required to extract the VSS SDK Headers
wget -O /usr/local/bin/extract-vsssdk-headers "https://raw.githubusercontent.com/qemu/qemu/master/scripts/extract-vsssdk-headers"
chmod 0755 /usr/local/bin/extract-vsssdk-headers
 
wget -O /usr/local/bin/vss-sdk-7.2-setup.exe http://download.microsoft.com/download/9/4/c/94c588cf-8176-4bdb-9d55-2597c76043c6/setup.exe
 
cd /usr/local
./bin/extract-vsssdk-headers ./bin/vss-sdk-7.2-setup.exe
chmod -R a+rX ./inc

There are a number of bugs in the header files which we have to fix manually to make it work with MinGW:

  • /usr/local/inc/win2003/vswriter.h
    • Line 654 change from _declspec(dllexport) to __declspec(dllexport) (two _ instead of one)
  • /usr/i686-w64-mingw32/sys-root/mingw/include/rpcndr.h
    • Line 110 change from void *__RPC_USER MIDL_user_allocate(SIZE_T); to void *__RPC_USER MIDL_user_allocate(size_t);

32bit

cd sepiola
 
mkdir build.mingw32
cd build.mingw32
mingw32-cmake ..
 
make
make package

64bit

cd sepiola
 
mkdir build.mingw64
cd build.mingw64
mingw64-cmake ..
 
make
make package

Building for a reseller

The recipes above to build the various editions can furthermore be combined with a reseller build to get a branded/whitelabeled edition of Sepiola.

Everything required to build a branded version is encapsulated in the build system itself. It is therefore only required to pre-load the configuration for a given reseller for the initial CMake run:

cd work
 
git clone https://github.com/stepping-stone/sepiola.git
git clone https://github.com/stepping-stone/sepiola-reseller-data.git
 
mkdir -p sepiola/build.stepping-stone.ch
cd sepiola/build.stepping-stone.ch
 
cmake -C ../../sepiola-reseller-data/reseller/stepping-stone.ch/cmake-preload.txt ..
 
make
make package

The detailed directory structure for the reseller data is described in the sepiola-reseller-data/README.md.

Personal tools
Namespaces

Variants
Actions
Navigation
Wiki
sepiola.org
Toolbox