Skip to content

Compiling

Alexander Barthel edited this page Oct 27, 2018 · 9 revisions

Compile Marble

Clone Marble using the lnm/1.1 branch from my repository clone here: https://github.com/albar965/marble/tree/lnm/1.1

All examples below are for release builds. Adapt the paths according to you file structure and used Qt version.

The Marble installation process is terribly broken for Windows and even more for macOS. You have to copy the include files and libraries manually.

Linux

cmake -DCMAKE_BUILD_TYPE=Release -DSTATIC_BUILD=TRUE -DQTONLY=TRUE -DBUILD_MARBLE_EXAMPLES=NO -DBUILD_INHIBIT_SCREENSAVER_PLUGIN=NO -DBUILD_MARBLE_APPS=NO -DBUILD_MARBLE_EXAMPLES=NO -DBUILD_MARBLE_TESTS=NO -DBUILD_MARBLE_TOOLS=NO -DBUILD_TESTING=NO -DBUILD_WITH_DBUS=NO -DMARBLE_EMPTY_MAPTHEME=YES -DMOBILE=NO -DWITH_DESIGNER_PLUGIN=NO -DWITH_Phonon=NO -DWITH_Qt5Location=NO -DWITH_Qt5Positioning=NO -DWITH_Qt5SerialPort=NO -DWITH_ZLIB=NO -DWITH_libgps=NO -DWITH_libshp=NO -DWITH_libwlocate=NO -DCMAKE_INSTALL_PREFIX=~/Programme/Marble-release -DEXEC_INSTALL_PREFIX=~/Programme/Marble-release -DCMAKE_PREFIX_PATH=$HOME/Qt/5.9.3/gcc_64 ../marble/

macOS

cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_MARBLE_EXAMPLES=NO -DBUILD_INHIBIT_SCREENSAVER_PLUGIN=NO -DBUILD_MARBLE_APPS=NO -DBUILD_MARBLE_EXAMPLES=NO -DBUILD_MARBLE_TESTS=NO -DBUILD_MARBLE_TOOLS=NO -DBUILD_TESTING=NO -DBUILD_WITH_DBUS=NO -DMARBLE_EMPTY_MAPTHEME=YES -DMOBILE=NO -DWITH_DESIGNER_PLUGIN=NO -DWITH_Phonon=NO -DWITH_Qt5Location=NO -DWITH_Qt5Positioning=NO -DWITH_Qt5SerialPort=NO -DWITH_ZLIB=NO -DWITH_libgps=NO -DWITH_libshp=NO -DWITH_libwlocate=NO -DCMAKE_PREFIX_PATH=$HOME/Qt/5.9.3/clang_64 -DCMAKE_INSTALL_PREFIX=~/Programme/Marble-release -DEXEC_INSTALL_PREFIX=~/Programme/Marble-release ../marble/

Windows

cd C:\Projekte\build-marble-release
set PATH=%PATH%;C:\Qt\5.9.5\mingw53_32\bin;C:\Qt\Tools\mingw530_32\bin
cmake -Wno-dev -G "MinGW Makefiles" -DQTONLY=TRUE -DQT5BUILD=TRUE -DWITH_quazip=FALSE -DWITH_libshp=FALSE -DWITH_libgps=FALSE -DWITH_libwlocate=FALSE -DWITH_QtLocation=FALSE -DWITH_liblocation=FALSE -DCMAKE_INSTALL_PREFIX="C:\Projekte\Marble-release" -DCMAKE_BUILD_TYPE=Release ..\marble
mingw32-make -j2
mingw32-make install

Compile the atools Library

Qt development packages of Core, Widgets, XML and SQL are needed with minimum version 5.6. GIT command line tools are required.

You need a SDK/SimConnect installation on Windows. There is currently no define to exclude this. Also install the X-Plane SDK.

Windows

  • Get and install Qt Creator from http://www.qt.io.
  • Import atools into the workspace.
  • Configure the project and enable shadow build for release or debug versions. -- Clone atools from GIT to e.g.: "C:\Projects\atools" -- Use "../build-%{CurrentProject:Name}-%{CurrentBuild:Name}" for "Default build directory" in the Qt Creator options dialog. -- For atools use the build directory of e.g.: "C:\Projects\build-atools-release"
  • Adapt the QT_BIN and GIT_BIN variables in "atools.pro".
  • Run qmake from Qt Creator
  • Build

Do not use the default shadow build directory names, this will break project dependencies.

The atools can be built using the mingw environment or MSVC >= 2013. If SimConnect is not installed add DEFINES+=SIMCONNECT_DUMMY to the qmake run SimConnect will and can only be used when compiling with MSVC.

Linux / macOS

Install Qt development packages. Version at least 5.6.

Create the build directories on the same level as the source directory "atools".

To build the release version:

  • mkdir build-atools-release
  • cd build-atools-release
  • qmake ../atools/atools.pro CONFIG+=release
  • make

To build the debug version:

  • mkdir build-atools-debug
  • cd build-atools-debug
  • qmake ../atools/atools.pro CONFIG+=debug
  • make

Compile the littlenavmap Application

Qt development packages of Core, Widgets, XML and SQL are needed with minimum version 5.6. GIT command line tools are required. The marble widget is needed (see https://techbase.kde.org/Marble#Compiling_Marble). Additionally my atools static library is needed.

Get Marble from my repository which contains a few needed improvements: https://github.com/albar965/marble.git Build an install it according to the included instructions. Use branch lnm/1.1 for the builds.

Windows

  • Get "Win32 OpenSSL v1.0.1u" from https://slproweb.com/products/Win32OpenSSL.html and install it.
  • Make sure SimConnect is installed.
  • Get and install Qt Creator from http://www.qt.io.
  • Use "../build-%{CurrentProject:Name}-%{CurrentBuild:Name}" for "Default build directory" in the Qt Creator options dialog.
  • Import atools and littlenavmap into the workspace.
  • Configure the projects and enable shadow build for release or debug versions. -- Clone atools from GIT to e.g.: "C:\Projects\atools" -- For atools use the build directory of e.g.: "C:\Projects\build-atools-release" -- Clone littlenavmap from GIT to e.g.: "C:\Projects\littlenavmap" -- For littlenavmap use the build directory of e.g.: "C:\Projects\build-littlenavmap-release"
  • Adapt the QT_BIN, GIT_BIN, SIMCONNECT and other variables in "littlenavmap.pro".
  • Set the build kit for atools and littlenavmap to MinGW 32bit.
  • Run qmake from Qt Creator for all projects
  • Build all projects from Qt Creator

Do not use the default shadow build directory names, this will break project dependencies.

Linux / macOS

Install Qt development packages. Version at least 5.6.

Build atools according to instructions in BUILD.txt.

Create all build directories on the same level as the source directories "atools" and "littlenavmap".

To build the release version:

  • mkdir build-littlenavmap-release
  • cd build-littlenavmap-release
  • qmake ../littlenavmap/littlenavmap.pro CONFIG+=release
  • make

To build the debug version:

  • mkdir build-littlenavmap-debug
  • cd build-littlenavmap-debug
  • qmake ../littlenavmap/littlenavmap.pro CONFIG+=debug
  • make

Branches / Project Dependencies

Little Navmap has to be built using the mingw environment as Marble compiles only on the same.

Make sure to use the correct branches to avoid breaking dependencies. The branch master is the unstable development branch but all software should compile there.

For releases check the release/MAJOR.MINOR branches to get the correct dependencies. The atools branch is usually one MAJOR number ahead.

So Little Navmap branch release/1.2 should work well with atools release/2.2 for example.

Clone this wiki locally