Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.

Building the Nuria Framework

Papierkorb edited this page Oct 16, 2014 · 3 revisions

Preparations

In order to build the Nuria Framework, you will need to have a decent toolchain available. What you'll need:

  • Git
  • Any recent C++11-capable Compiler - we recommend GCC 4.9. Clang will work under Linux, Windows user will need to resort to MinGW
  • Qt5.2+ including development tools
  • The CMake build system
  • LLVM/Clang for Tria
  • Doxygen for documentation generation (optional)

At runtime, Qt libraries will suffice.

Below you'll find installation instructions for your platform.

Linux

You can simply install all dependecies via your distributions package manager. For example:

Arch: pacman -Sy base-devel qt5-base clang cmake git doxygen

Windows

Since there is no default package manager for Windows, you'll need to gather all the components yourself.

  1. Download and install Git. Make sure you've selected the "Use Git from the Windows Command Prompt" option.

You can find Git binaries here: http://git-scm.com/download/win

  1. Install Qt through the Windows installer. Make sure that you're installing a MinGW-based version, i.e. Qt\5.3\MinGW 4.8.2 (32 bit). In the following we'll assume you installed that version to the default location, C:\Qt.

You can find the installer here: http://qt-project.org/downloads

  1. Install a more recent MinGW version. Qt ships with MinGW 4.8.2, which contains a bug that prevents the Twig module from functioning. Download this package and unpack it to C:\Qt\Tools\mingw482_32 (overwriting the Qt-shipped MinGW - this is needed because qmake expects to find its compiler there).

Note: If you wish to install MinGW through an installer, you'll need versions using the posix threading model and dwarf exception handling. Please make sure you're using the more recent MinGW-w64, since the original MinGW is out of date.

  1. Install CMake. Version 2.8.8 or higher is required, but the most recent 3.0.2 will work just fine. Make sure you've selected one of the "Add cmake to the system PATH" options.

Grab the installer here: http://www.cmake.org/download/

  1. Optional: Install doxygen from http://www.stack.nl/~dimitri/doxygen/download.html

  2. Add MinGW (C:\Qt\Tools\mingw482_32\bin) and Qt (C:\Qt\5.3\mingw482_32\bin) to your PATH. We recommend doing this permanently either through your system panel or with the Windows Path Editor utility. Alternatively, you can simply do

set PATH="C:\Qt\Tools\mingw482_32\bin;C:\Qt\5.3\mingw482_32\bin;%PATH%

which will modify the path only for the current shell.

Note: Please make sure that MinGW is first in the path, otherwise the wrong libstdc++ version will be found and used first.

  1. Optional: Build and install clang if you want to use Tria (recommended), and add it to your path. Detailed instructions are available in Building clang (win32). Note that clang binary releases will not work because the required parts of libclang are not included.

  2. Test your environment: Open a shell (cmd), and test the following commands:

  • git
  • cmake
  • qmake
  • gcc -v (should output version 4.9.1)

Installation

Please make sure that all dependencies are fulfilled beforehand. See the README.md file for details.

  1. Clone the Framework repository: $ git clone https://github.com/NuriaProject/Framework.git

  2. Go into 'Framework' and let git check out all submodules:

$ cd Framework
$ git submodule update --init --recursive
  1. Create a 'build' directory and change into it: mkdir build && cd build

  2. Let cmake create the Makefile: $ cmake .. (Note, you may want to pass additional arguments)

  3. Compile everything: $ make (Add -jX if you want to build faster, where X is the count of CPU cores you have)

  4. Run unit-tests: $ make test

  5. Install: $ sudo make install

Adding the documentation to QtCreator

If you had Doxygen installed, you should have a .qch file (On Linux, it is installed to PREFIX/share/doc/nuriaframework/nuriaprojectframework.qch).

  1. Find the file on your system.
  2. In Creator, go to Tools -> Options
  3. Go to the Help section and click on Documentation
  4. Click Add... and select the .qch file
  5. You may need to restart QtCreator now for changes to take effect.

That's it, now you can enjoy documentation right in your IDE!

Clone this wiki locally