User Tools

Site Tools


devel:compiling_and_running_1.15_or_earlier_qmake

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
devel:compiling_and_running_1.15_or_earlier_qmake [2017-03-15 09:03]
skyjake
devel:compiling_and_running_1.15_or_earlier_qmake [2017-08-31 17:32] (current)
skyjake [SDK requirements (1.15+)]
Line 1: Line 1:
 +====== Compiling and running (1.15 or earlier, qmake) ======
 +
 +This article contains compilation instructions for all [[:​supported platforms]].
 +
 +===== Getting started =====
 +
 +You should first read the [[getting_started]] page.
 +
 +Regardless of which platform is being used, you'll need to install the [[http://​download.qt-project.org/​official_releases/​qt/​|Qt libraries]] and [[http://​qt-project.org/​doc/​qt-5/​qmake-manual.html|qmake]] in order to build Doomsday.
 +
 +===== SDK requirements (1.15) =====
 +
 +
 +==== Doomsday client, server, and libraries ====
 +
 +
 +**Windows**
 +
 +The compiler we use on Windows is [[http://​www.microsoft.com/​express/​Downloads/​|Microsoft Visual C++ 2013 Express Edition]]. (GCC is not supported on Windows.)
 +  *  [[http://​download.qt-project.org/​official_releases/​qt/​|Qt 5 (latest version)]]. VS 2013 OpenGL build recommended.
 +  *  SDL 2.0 and SDL_mixer 2.0. Download these from http://​www.libsdl.org.
 +  *  [[direct_x]] 9.0 or later. The SDK can be downloaded from [[http://​www.microsoft.com/​windows/​directx/​|Microsoft'​s DirectX site]].
 +  *  [[http://​www.opengl.org/​wiki/​Getting_started|OpenGL 2 (or later) headers]].
 +  *  [[eax]] 2.0. Used for environmental sound effects such as reverb. EAX 3.0 may work as well but hasn't been tested. The SDK used to be available on [[http://​developer.creative.com/​welcome.asp|Creative'​s Developer Central site]].
 +
 +**Mac OS X**
 +
 +  *  [[http://​download.qt-project.org/​official_releases/​qt/​|Qt 5 (latest version)]].
 +  *  The ''​.framework''​s for SDL2 (for joysticks) and SDL2_mixer (if using SDL2_mixer audio). These can be downloaded from http://​www.libsdl.org/​.
 +
 +**Unix**
 +
 +xxf86vm, xrandr, curses, sdl2, libqt4-dev (although Qt 5 recommended)
 +
 +See also: [[build_tools_for_unix]]
 +
 +
 +==== Plugins ====
 +
 +
 +**audio_fluidsynth plugin**
 +
 +  *  libfluidsynth-dev (unless using the embedded synthesizer under **external**)
 +  *  OS X: pkg-config and glib (e.g., from [[http://​mxcl.github.com/​homebrew/​|Homebrew]])
 +
 +**audio_fmod plugin**
 +
 +  *  [[http://​fmod.org|FMOD Ex Programmers API]]
 +
 +**audio_openal plugin**
 +
 +  *  [[open_al]] 1.1 SDK, if you want to build the [[audio_openal]] audio driver. The SDK can be downloaded from [[http://​developer.creative.com/​welcome.asp|Creative'​s Developer Central site]].
 +
 +
 +===== Building with Qt Creator =====
 +
 +
 +  -  Open **doomsday.pro** in Qt Creator. This is the main project file that builds everything. You can also open one of the .pro files in the subdirectories to build a specific component. Note, however, that most require the Doomsday 2 libraries (libcore, libgui, libappfw, libshell) and liblegacy .
 +  -  Check your **config_user.pri**. It is for build options specific to your system and/or personal preferences,​ e.g., locations of the third-party SDKs. Another important purpose of the file is to set the CONFIG variable to enable/​disable Doomsday build options (e.g., ''​deng_fmod''​). See below for platform-specific notes.
 +  -  Go to Projects → Desktop :: Build :: Build Steps. Here you can configure how qmake is run by the IDE, if you wish to specify additional options (e.g., ''​PREFIX=/​some/​path''​ on Unix).
 +  -  Build → Run qmake. Check the output for any error messages.
 +  -  //(This step does not apply to Mac OS X.)// Switch to the Run tab. Click on Deployment → Add Deploy Step to add a new Make step. Put "​install"​ in the arguments for Make. This will cause all the built components to be deployed to their platform-specific install location (see notes below).
 +  -  Build → Build Project "​doomsday"​.
 +
 +
 +==== Platform-specific notes ====
 +
 +=== Windows ===
 +
 +  *  You need to manually specify all 3rd party SDK paths (e.g., FMOD, SDL). Examples have been provided in **config_user-example.pri**.
 +  *  Built binaries and other files are deployed under **distrib\products**. The directory structure mirrors the one that is created by the distribution installer.
 +
 +
 +=== Mac OS X ===
 +
 +  *  You will most likely want to compile using the default Mac OS SDK that matches the version of your operating system. You can do this by adding ''​CONFIG+=deng_nativesdk''​ to your **config_user.pri**. When you run qmake, it will print a message about the selected SDK. (See **config_macx.pri** for details. For the needs of the [[autobuilder]],​ the SDK selection by default occurs based on which version of Qt is available.)
 +  *  The "​postbuild"​ subproject will automatically run a script that collects all the binaries into a single **Doomsday.app** bundle. Consequently,​ it is not necessary to run "make install"​.
 +
 +
 +=== Unix ===
 +
 +  *  Set the PREFIX in **config_user.pri** or on the qmake command line so the installed files are placed in a suitable location (e.g., "​~/​deng"​). It is not possible to run the game without "make install"​.
 +
 +
 +===== Running Doomsday under Qt Creator =====
 +
 +==== Windows ====
 +
 +  -  Go to Projects → Desktop :: Run and create a custom Run configuration.
 +  -  Set **distrib\products\bin\doomsday.exe** as the executable.
 +  -  Set the arguments, e.g. ''​-game doom1-ultimate -iwad \some\path\Doom.wad''​
 +  -  Set **distrib\products** as the working directory.
 +
 +
 +==== Mac OS X ====
 +
 +  -  Set **%{buildDir}/​client/​Doomsday.app** as the executable.
 +  -  Add options as follows in the Run configuration (modify to suit your needs): ''​-vdmap .. }data -bd Doomsday.app/​Contents/​Resources -iwad /​mypath/​Doom.wad -game doom1-ultimate''​
 +  -  Set **%{buildDir}/​client** as the working directory.
 +
 +
 +==== Unix ====
 +
 +  -  Modify the Run configuration to start the binary from your installed location. Note that the path you specified as the PREFIX was built in to the engine, so it knows to look for the resources by default from that location. You'll still need to specify the game plugin and IWAD file, though.
 +
 +
 +===== Compiling manually with qmake =====
 +
 +
 +[[qmake]] is a portable compiling system. It works pretty much the same way on all platforms. Brief summary of how to use it: you will need to create an empty directory where the generated binaries and other build files will be stored, and then run qmake from within that directory. For example:
 +
 +  qmake -r ../​doomsday/​doomsday.pro CONFIG+=deng_notools
 +  make
 +  make install
 +
 +
 +===== Creating a release package =====
 +
 +You can use the [[automated build system]] to create and package a build of the Doomsday Engine. The way to do this is to go to the //distrib// directory inside the Doomsday source tree and type this command:
 +
 +  python platform_release.py
 +
 +It will automatically detect the operating system and create a suitable type of build. The result will appear in the **distrib/​releases** directory.
 +
 +<​note>​The automated build scripts have not been intended for use outside the skyjake'​s private build network. They may assume things that do not apply to your system. I.e., YMMV.</​note>​
 +
  
devel/compiling_and_running_1.15_or_earlier_qmake.txt · Last modified: 2017-08-31 17:32 by skyjake