Skip to content

How To Build

vpicaver edited this page Dec 3, 2015 · 29 revisions

How to Guide to building Cavewhere

The following platforms are support by this guide:

Build without Qt Creator and instead use the command line using QBS

This guide assumes you have no development software installed on your machine. If have development software install, such as Qt 5, you can probably skip several steps.

Build Environment - Ubuntu 14.04 64bit

Although this guide is written for Ubuntu, you probably can easily port the steps to other Linux distributions.

Fire up a terminal

Install Developer tools

Installs Dependancies (clang, git):

sudo apt-get install clang-3.5 build-essential git libc++1 libc++-dev

Install OpenGL Development Libraries

You can install Mesa Drivers, Nvidia drivers, or AMD drivers (choose one).

Mesa (software accelerated, use this one if you don't know)

sudo apt-get install mesa-common-dev

sudo apt-get install libglu1-mesa-dev -y

Nvidia (for nvidia graphics cards only)

sudo apt-get install nvidia-current-dev

AMD (for AMD graphics cards only)

Guide to install AMD Graphics Drivers

If you're running Ubuntu through Parallels, you'll have to update the symbolic link to

sudo ln -s /var/lib/parallels-tools/.backup/.libgl/libGL.so.1.2.0 /usr/lib/x86_64-linux-gnu/mesa/libGL.so

If you OpenGL enviroment isn't setup correctly, you my have to change symbolic link /usr/lib/x86_64-linux-gnu/mesa/libGL.so to a linking error, when clang++ can't find GL

Download and Install Qt (get the latest)

wget http://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run

chmod +x qt-unified-linux-x64-online.run

./qt-unified-linux-x64-online.run For local user only (use sudo for global)

Download and Install QtCreator (Optional)

By default, Qt with QtCreator

Get cavewhere source

git clone git@github.com:Cavewhere/cavewhere.git

If this step fails to work and get the issue below. You need to setup a github account with the correct ssh keys. It's important to setup your cavewhere build with ssh for checking out submodules.

Cloning into 'cavewhere'...
The authenticity of host 'github.com (192.30.252.131)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.252.131' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository

Please make sure you have the correct access rights and the repository exists.

To resolve this issues:

  • Get a github account
  • Follow this guide to setup you ssh keys

Initialize and update all submodules

cd cavewhere

git submodule init

git submodule update

Open cavewhere.qbs

File->Open, then open cavewhere.qbs

All *.pro are not maintained and you shouldn't use them.

Build Cavewhere

Ctrl+B or Build->Build Cavewhere or Build->Build All

Run Cavewhere

Cntl+R or Build->Run

Mac OS X

Install Developer tools

  1. Download and install XCode from the App Store.
  2. Install command line tools, guide
  3. Open a termial and type clang

You should get this output:

SauceMachine:~ vpicaver$ clang
clang: error: no input files

Install Git

Download Git

Download and Install Qt (Get the latest)

Download Qt

Download and Install QtCreator (Optional)

By default, Qt comes with QtCreator.

Get cavewhere source

git clone git@github.com:Cavewhere/cavewhere.git

If this step fails to work and get the issue below. You need to setup a github account with the correct ssh keys. It's important to setup your cavewhere build with ssh for checking out submodules.

Cloning into 'cavewhere'...
The authenticity of host 'github.com (192.30.252.131)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.252.131' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository

Please make sure you have the correct access rights and the repository exists.

To resolve this issues:

  • Get a github account
  • Follow this guide to setup you ssh keys

Initialize and update all submodules

cd cavewhere

git submodule init

git submodule update

QtKits

Open cavewhere.qbs

File->Open, then open cavewhere.qbs

All *.pro are not maintained and you shouldn't use them.

Build Cavewhere

Ctrl+B or Build->Build Cavewhere or Build->Build All

Run Cavewhere

Cntl+R or Build->Run

Windows 7

Install Developer tools

Download and Install Visual C++ Studio 2012 Express

Install Git

Download Git

Use all the default settings in the installer (press Next a bunch of times).

Download and Install Qt

Download Qt

Download and Install QtCreator (Optional)

By default, Qt comes with QtCreator

Get cavewhere source

In windows, the best way to run these commands is through Git Bash and is located in Start->All Programs->Git->Git Bash. Get bash will create a termial window where you run git commands.

git clone git@github.com:Cavewhere/cavewhere.git

If this step fails to work and get the issue below. You need to setup a github account with the correct ssh keys. It's important to setup your cavewhere build with ssh for checking out submodules.

Cloning into 'cavewhere'...
The authenticity of host 'github.com (192.30.252.131)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.252.131' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository

Please make sure you have the correct access rights and the repository exists.

To resolve this issues:

  • Get a github account
  • Follow this guide to setup you ssh keys

You can setup your windows ssh keys inside of Git Bash.

Initialize and update all submodules

cd cavewhere

git submodule init

git submodule update

Open cavewhere.qbs

File->Open, then open cavewhere.qbs

All *.pro are not maintained and you shouldn't use them.

Build Cavewhere

Ctrl+B or Build->Build Cavewhere or Build->Build All

Run Cavewhere

Cntl+R or Build->Run

Building on the Command Line with QBS

If you want to develop on the command line without QtCreator (not recommended) you can build Cavewhere with qbs. This guide was targeted for Ubuntu but the same steps apply for windows and mac.

Download and Install QBS

QBS Linux / Mac

tar -zxvf qbs-VERSION.src.tar.gz
~/PATH_TO_QT_INSTALL/bin/qmake qbs.pro
make
sudo make install

Setup QBS

For more details see QBS documentation for Configuring and Managing Qt Versions

qbs setup-toolchains --detect

qbs setup-qt ~/PATH_TO_QT_INSTALL/bin/qmake qt5-3-1

qbs config profiles.qt5-5-1.baseProfile clang

qbs config defaultProfile qt5-5-1

You have now setup up the qt5-5-1 profile with the clang compiler.

Building with QBS

cd cavewhere
qbs

Run Cavewhere with QBS

qbs run --products Cavewhere

Clone this wiki locally
You can’t perform that action at this time.