Skip to content

Compiling with Qt Creator (Ubuntu)

jonwd7 edited this page Jun 10, 2017 · 5 revisions

Requirements

To compile NifSkope you will need gl.h and glu.h from any number of packages. It is recommended you install the following:

sudo apt-get install mesa-common-dev libglu1-mesa-dev freeglut3-dev

Installing Qt

To install you simply need the Qt Online Installer.

Configuration

After downloading the Qt Online Installer you will need to make it executable, e.g. chmod +x qt-unified-linux-x64-3.0.0-online.run. Run it and select the following at minimum:

You do not need any of the extras or the Android/ARM compilers.

Downloading NifSkope

This guide assumes that you have cloned from [email protected]:niftools/nifskope.git and did so with the --recursive option or ran git submodule update after.

Opening the NifSkope project

In Qt Creator, open NifSkope.pro in the project root. It should ask you to select the build kits for the project. Select at minimum Desktop Qt 5.9.0 GCC 64bit. It will look something like this:

Multithreaded compiling

If you want to compile much faster with GCC, you need to add -jN to the Make Arguments for your kit like so:

Compiling NifSkope

To assure your Makefile is up-to-date, right-click in the Projects pane on NifSkope (or use the Build menu), and select Run qmake. Then select Build and wait for it to compile. If you receive missing gl.h or glu.h errors you have not installed the required packages. If you receive any third-party library errors, you have not run git submodule update.

Optional make targets

NifSkope has two optional make targets that you may run before or after building.

docs

This builds the HTML documentation for nif.xml. If it is packaged with NifSkope it can be viewed in the Reference Browser pane from inside NifSkope. Python is required. From the Makefile directory run:

make docs

doxygen

This builds the API documentation for NifSkope. Doxygen is required as well as unzip. You may optionally install graphviz if you want diagram support. From the Makefile directory run:

make doxygen

To install Doxygen and Graphviz: sudo apt-get install doxygen graphviz

Packaging NifSkope

The build process defined by NifSkope.pro is set up to copy everything needed for a release to the build directory. This includes (non-comprehensive):

shaders/      (OpenGL shaders)
kfm.xml*
nif.xml*
style.qss*

*: As of this writing these files do not copy to the build dir for developmental reasons. You can uncomment copyFiles( $$XML $$QSS ) in NifSkope.pro to make them copy on build.

Clone this wiki locally