-
Notifications
You must be signed in to change notification settings - Fork 16
Building from Source
Bipolar supports out-of-source builds on all supported platforms.
The basic steps are the same on all platforms. The syntax just varies a little depending on the shell / toolset in use.
The overall steps are:
- Create a new build directory.
- Change into the build directory.
- Execute
qmake
. I like to run it recursively (the-r
flag) to see QMake warnings earlier. - Run the the platform's "make" tool (eg
make
,mingw32-make.exe
,nmake.exe
, etc). - Optionally, run "make" for the "check" target to run all of the unit tests (this can take several minutes).
- Optionally, on supported platforms, run "make" for the relevant package target (eg
dmg
to build an OSX disk image;nsis
to build an NSIS-based Windows installer).
A basic example for building on a typical GNU / Linux operating systems:
mkdir -p <build-directory>
pushd <build-directory>
qmake -r -Wall -Wlogic -Wparser <source-directory>
make && make check
popd
For a more-advanced example, have a look at the .travis.yml configuration. Unfortunately that example mixes both Linux (Ubuntu) and OSX implementations (Travis CI currently only supports one configuration file for both), so that does make it a little unnecessarily complex.
A basic example for building on MacOS:
mkdir -p <build-directory>
pushd <build-directory>
qmake -r -Wall -Wlogic -Wparser <source-directory>
make && make check && make -C pkg/osx dmg
popd
For a more-advanced example, have a look at the .travis.yml configuration. Unfortunately that example mixes both Linux (Ubuntu) and OSX implementations (Travis CI currently only supports one configuration file for both), so that does make it a little unnecessarily complex.
Building on Windows varies a little depending on the choice of build toolset - ie MinGW versus MSVC. See examples of each below.
A basic example for building on Windows, using MinGW:
mkdir -p <build-directory>
pushd <build-directory>
qmake -r -Wall -Wlogic -Wparser <source-directory>
mingw32-make.exe
mingw32-make.exe check
mingw32-make.exe -C pkg/nsis nsis
popd
For a more-advanced example, have a look at the .appveyor.yml configuration. That example mixes both MinGW and MSVC implementations, so that does make it a little more complex.
A basic example for building on Windows, using MSVC:
mk <build-directory>
pushd <build-directory>
qmake -r -Wall -Wlogic -Wparser <source-directory>
nmake.exe
nmake.exe check
pushd pkg\nsis
namke.exe nsis
popd
popd
For a more-advanced example, have a look at the .appveyor.yml configuration. That example mixes both MinGW and MSVC implementations, so that does make it a little more complex.