Skip to content

Commit

Permalink
Improve INSTALL
Browse files Browse the repository at this point in the history
  • Loading branch information
juzzlin committed Nov 18, 2018
1 parent 79805cd commit 7ca34db
Showing 1 changed file with 41 additions and 33 deletions.
74 changes: 41 additions & 33 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ These are build & install instructions for Dust Racing 2D.
Source code
===========

The source tree includes source code for the track editor and
the game itself. The game uses an 2D engine called MiniCore
written by Jussi Lind. The code is "documented" by using
Doxygen tags.
The source tree includes source code for the track editor and the game itself.

The code is "documented" with Doxygen tags.

The source tree layout:

Expand All @@ -20,11 +19,21 @@ src/game/STFH/ : Sound Toolkit From Hell.
src/editor/ : Source files for the track editor.
src/common/ : Shared files between the editor and the game.
src/images/ : Some SVG-images used as the source for final images.

Data directory structure:

data/ : Data mapping and configuration files.
data/fonts/ : Font used by the game.
data/icons/ : Icon files for game and editor.
data/images/ : Image files and textures loaded by the game.
data/levels/ : Level data.
data/shaders/ : GLSL shaders.
packaging/ : Example packaging for Ubuntu/Debian.
data/models/ : 3D models.
data/sounds/ : Sound files.
data/translations/ : Released Qt translation files.

Other:

packaging/windows/ : NSIS packaging for Windows.

Build systems
=============
Expand All @@ -36,8 +45,9 @@ Toolchains

GCC/MinGW and Clang are the only "officially" supported toolchains on Linux.

Windows builds are done in a Docker container with MXE (web: mxe.cc). The build script
Windows builds are done in a Docker container with MXE (http://mxe.cc). The build script
also generates automatically an NSIS Windows installer and a ZIP-archive.

See scripts/buildWindowsInstaller.sh and scripts/mxeWindowsBuild.sh.

Building the project with Microsoft Visual C++ 2013 also works, but no automatic
Expand All @@ -64,65 +74,59 @@ Development build (the game can be run without installing anything):
- You might need to install also these manually depending on your system
- qttools5-dev
- libqt5opengl5-dev

2) Install OpenAL development files (libopenal-dev on Debian/Ubuntu).

3) Install Vorbis development files (libvorbis-dev on Debian/Ubuntu).
4) Install CMake (cmake on Debian/Ubuntu).
5) Go to the source directory and run:

$ mkdir build
$ cd build
$ cmake ..
4) Install CMake (cmake on Debian/Ubuntu).

This runs CMake that generates the makefiles.
5) Go to the source directory and run:

You can also use Qt Creator to open the top-level CMakeLists.txt and build inside Qt Creator.
There's also a convenience configure script which is just a wrapper for cmake.
`$ mkdir build && cd build`

Anyway, if everything went ok with cmake, run:
`$ cmake ..`

$ make
`$ make`

This will build the editor and the game binaries.

Run the game:

$ ./dustrac-game
`$ ./dustrac-game`

Optionally run the track editor:

$ ./dustrac-editor
`$ ./dustrac-editor`

Run unit tests:

$ ctest
`$ ctest`

Release build (in this example game installs under /usr):
--------------------------------------------------------

$ mkdir build
$ cd build
$ cmake .. -DReleaseBuild=ON -DCMAKE_INSTALL_PREFIX=/usr
`$ mkdir build && cd build`

This runs CMake that generates the makefiles.
If everything went ok, run:
`$ cmake .. -DReleaseBuild=ON -DCMAKE_INSTALL_PREFIX=/usr`

$ make
`$ make`

This will build the editor and the game binaries.

Install the binaries and data files:

$ sudo make install
`$ sudo make install`

This installs also the desktop files so Dust Racing
This installs also the desktop files so Dust Racing 2D
should appear in your application menu.

Cross-compiling for Windows in Docker with MXE on Linux
=======================================================

1) Install Docker

2) $ ./scripts/buildWindowsInstaller.sh
2) `$ ./scripts/buildWindowsInstaller.sh`

CPack
=====
Expand All @@ -132,7 +136,7 @@ e.g. Debian packages.

After a successful build with ReleaseBuild=ON run CPack:

$ cpack -G DEB
`$ cpack -G DEB`

This will generate a Debian package.

Expand All @@ -148,9 +152,16 @@ The project has been successfully compiled and executed with MSVC with the follo
* MS Visual Studio 2013 for Desktop Windows

1) Download and build Vorbis libraries and OpenAL Soft with the same toolchain

2) Open the top-level CMakeLists.txt in Qt Creator, configure and build

3) Copy the runtime files, like OpenAL DLL, to the same directory with the game binary

Jenkins CI
==========

Jenkinsfile includes pipelines configuration for Jenkins CI.

For packagers
=============

Expand All @@ -168,6 +179,3 @@ CMAKE_INSTALL_PREFIX usually defaults to /usr/local and
can be changed by giving, for example, -DCMAKE_INSTALL_PREFIX=/usr
to cmake (or to the configure script).


-- Jussi Lind <[email protected]>

0 comments on commit 7ca34db

Please sign in to comment.