Compiling Doomseeker on Linux: Difference between revisions

From Zandronum Wiki
(Created page with "'''Open a terminal and copy and paste the whole code box for each step.''' == Notes == If you received the error: '''pulling from https://bitbucket.org/Blzut3/doomseeker'''...")
 
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Open a terminal and copy and paste the whole code box for each step.'''
'''Open a terminal and copy and paste the whole code box for each step.'''


== Notes ==
== Install dependencies ==
If you received the error:
[http://doomseeker.drdteam.org/ Doomseeker] needs certain tools and development files in order to compile:
* '''Required'''
** gcc 4.4 or later
** make
** cmake 2.8.12 or later
** qt5-tools
** qt5-multimedia
* '''Recommended'''
** git ''(needed in order to [https://bitbucket.org/Doomseeker/doomseeker download the source] and compile in commit meta data)''
* '''Optional'''
** zlib ''(Doomseeker has a copy of it and will be statically compiled in if not found)''
** libbzip2 ''(possibly static)''
** [[#Build Options|libqt4 and/or libqtcore4/qtcore]] 4.8.2


'''pulling from https://bitbucket.org/Blzut3/doomseeker'''
Install the following as root/superuser:
 
'''abort: HTTP Error 503: Repository Unavailable'''
 
edit "$HOME"/doomseeker_build/doomseeker/.hg/hgrc file and change the default path
<pre>
[paths]
default = https://bitbucket.org/Blzut3/doomseeker
</pre>
 
to:
<pre>
[paths]
default = https://bitbucket.org/Doomseeker/doomseeker
</pre>
 
== Prerequisites ==
Doomseeker requires some development files in order to compile.
* gcc - C and C++ compilers
* make
* cmake
* qt5-tools qt5-multimedia
* [[#Build Options|libqt4 and/or libqtcore4/qtcore]] ''(optional)''
* zlib ''(optional - possibly static)''
* libbzip2 ''(optional - possibly static)''
* mercurial ''(needed in order to clone repository)''
 
Install the following dependencies and tools as superuser:


=== Debian/Ubuntu ===
=== Debian/Ubuntu ===
<pre>
<pre>
sudo apt-get install g++ cmake mercurial make zlib1g-dev libbz2-dev \
sudo apt-get install g++ make cmake git zlib1g-dev libbz2-dev \
qttools5-dev qttools5-dev-tools qtmultimedia5-dev libqt4-dev
qttools5-dev qttools5-dev-tools qtmultimedia5-dev libqt4-dev
</pre>
</pre>
Line 41: Line 26:
=== Fedora ===
=== Fedora ===
<pre>
<pre>
yum install gcc-c++ cmake mercurial make zlib-devel bzip2-devel \
dnf install gcc-c++ make cmake git zlib-devel bzip2-devel \
qt5-qttools-devel qt5-qtmultimedia-devel qt-devel
qt5-qttools-devel qt5-qtmultimedia-devel qt-devel
</pre>
</pre>
Line 47: Line 32:
=== openSUSE ===
=== openSUSE ===
<pre>
<pre>
zypper install gcc-c++ cmake mercurial make zlib-devel libbz2-devel \
zypper install gcc-c++ make cmake git zlib-devel libbz2-devel \
libqt5-qttools-devel libqt5-qtmultimedia-devel libqt4-devel
libqt5-qttools-devel libqt5-qtmultimedia-devel libqt4-devel
</pre>
</pre>
Line 53: Line 38:
=== Mageia ===
=== Mageia ===
<pre>
<pre>
if [ "$(uname -m)" = "x86_64" ]; then
a='' && [ "$(uname -m)" = x86_64 ] && a=64
a="64"
urpmi gcc-c++ make cmake git lib${a}zlib-devel \
else
lib${a}bzip2-devel lib${a}qt5base5-devel qttools5 lib${a}qt5help-devel \
a=""
lib${a}qt5multimedia-devel lib${a}qt4-devel lib${a}qtcore4
fi && \
urpmi gcc-c++ cmake mercurial make lib"$a"zlib-devel lib"$a"bzip2-devel \
lib"$a"qt5base5-devel qttools5 lib"$a"qt5help-devel lib"$a"qt5multimedia-devel \
lib"$a"qt4-devel lib"$a"qtcore4
</pre>
</pre>


=== Arch Linux ===
=== Arch Linux ===
<pre>
<pre>
pacman -S --needed gcc cmake mercurial make zlib bzip2 qt5-tools qt5-base qt5-multimedia qt4
pacman -S --needed gcc make cmake git zlib bzip2 qt5-tools qt5-base qt5-multimedia qt4
</pre>
</pre>


=== Gentoo ===
=== Gentoo ===
<pre>
<pre>
emerge -avn sys-devel/gcc dev-util/cmake dev-vcs/mercurial sys-devel/make sys-libs/zlib app-arch/bzip2 \
emerge -avn sys-devel/gcc sys-devel/make dev-util/cmake dev-vcs/git \
dev-qt/linguist dev-qt/linguist-tools dev-qt/qtmultimedia dev-qt/qtcore
sys-libs/zlib app-arch/bzip2 dev-qt/linguist dev-qt/linguist-tools \
dev-qt/qtmultimedia dev-qt/qtcore
</pre>
</pre>


=== PCLinuxOS ===
=== PCLinuxOS ===
<pre>
<pre>
if [ "$(uname -m)" = "x86_64" ]; then
a='' && [ "$(uname -m)" = x86_64 ] && a=64
a="64"
apt-get install gcc-c++ make cmake git zlib1-devel \
else
lib${a}bzip2-devel lib${a}qt5base5-devel qttools5 lib${a}qt5help-devel \
a=""
lib${a}qt5multimedia-devel lib${a}qt4-devel
fi && \
</pre>
apt-get install gcc-c++ cmake mercurial make zlib1-devel lib"$a"bzip2-devel \
 
lib"$a"qt5base5-devel qttools5 lib"$a"qt5help-devel lib"$a"qt5multimedia-devel \
=== Solus ===
lib"$a"qt4-devel
<pre>
sudo eopkg install g++ make cmake binutils glibc-devel pkg-config \
git zlib-devel bzip2-devel qt5-tools-devel qt5-base-devel \
qt5-multimedia-devel qt4-devel
</pre>
</pre>


'''Do the following steps as normal user.'''
'''Do the following sections as normal user.'''


== Make doomseeker_build directory ==
== Create doomseeker_build directory ==
<pre>
<pre>
mkdir -pv "$HOME"/doomseeker_build
mkdir -pv ~/doomseeker_build
</pre>
</pre>


== Download the Source ==
== Download and prepare the source ==
Download the Doomseeker source and make build directory:
Download the Doomseeker source and create an out of tree build directory:
<pre>
<pre>
cd "$HOME"/doomseeker_build && \
cd ~/doomseeker_build &&
hg clone https://bitbucket.org/Doomseeker/doomseeker && \
git clone https://bitbucket.org/Doomseeker/doomseeker.git &&
mkdir -pv doomseeker/build
mkdir -pv doomseeker/build
</pre>
</pre>


== Compiling ==
== Compiling ==
To compile the development version:
To compile Doomseeker:
<pre>
<pre>
cd "$HOME"/doomseeker_build/doomseeker/build && \
c="$(lscpu -p | grep -v '#' | sort -u -t , -k 2,4 | wc -l)" ; [ "$c" -eq 0 ] && c=1
make clean ; rm -f engines/*.so ; \
cd ~/doomseeker_build/doomseeker/build &&
cmake -DCMAKE_BUILD_TYPE=Release .. && \
cmake .. -DCMAKE_BUILD_TYPE=Release &&
make
make -j$c
</pre>
</pre>
A development version of Doomseeker will be compiled if you do not do [[#Latest stable version]].
Assuming all goes well, a doomseeker binary should be produced. To start Doomseeker, the following command should work:
Assuming all goes well, a doomseeker binary should be produced. To start Doomseeker, the following command should work:
<pre>
<pre>
Line 114: Line 101:
</pre>
</pre>


=== Current stable version ===
=== Latest stable version ===
Show the current stable version:
Show the latest stable version:
<pre>
<pre>
cd "$HOME"/doomseeker_build/doomseeker && \
cd ~/doomseeker_build/doomseeker &&
hg identify -r 'max(tagged())'
git tag -l | tail -1
</pre>
</pre>


If you want to compile the current stable version, run the following:
If you want to compile the latest stable version, run:
<pre>
<pre>
cd "$HOME"/doomseeker_build/doomseeker && \
cd ~/doomseeker_build/doomseeker &&
hg update -cr 'max(tagged())'
git checkout --detach refs/tags/$(git tag -l | tail -1)
</pre>
</pre>
and [[#Compiling|compile]].
and [[#Compiling|compile]].


After compiling and backing up the current stable version, run the following:
After compiling and [[#Backup|backing up]] the latest stable version, run:
<pre>
<pre>
cd "$HOME"/doomseeker_build/doomseeker && \
cd ~/doomseeker_build/doomseeker &&
hg update
git checkout master
</pre>
</pre>


== Backup ==
== Backup ==
Follow this step if you want or manually copy (backup) doomseeker, libwadseeker.so and the engines directory.
If you want to backup Doomseeker, do the following:


Make and name a directory with the corresponding Doomseeker version/revision and copy doomseeker, libwadseeker.so and the engines directory to it:
Create and name a directory with the corresponding Doomseeker version/revision, build type and copy doomseeker, libwadseeker.so* and the engines directory to it:
<pre>
<pre>
cd "$HOME"/doomseeker_build/doomseeker/src/core && \
cd ~/doomseeker_build/doomseeker/build &&
BACKUPDOOMSEEKER="$(sed -n 's/.*#define VERSION_STRING "\(.*\)".*/\1/p' versiondefs.h)\
if [ -f CMakeCache.txt ]; then
$(sed -n 's/.*#define SVN_REVISION_STRING "\(.*\)".*/\-\1/p' svnrevision.h)\
k="$(sed -n 's/.*CMAKE_BUILD_TYPE:STRING=\(.*\)/\1/p' CMakeCache.txt)"; else k=''; fi &&
$(sed -n 's/.*#define HG_REVISION_HASH_STRING "\(.*\)".*/\-\1/p' svnrevision.h)" && \
if [ -n "$k" ]; then b="-BuildType$k"; else b=''; fi &&
cd ../../.. && mkdir -pv "$BACKUPDOOMSEEKER" && \
r=../src/core/gitinfo.h && h="$(sed -n 's/.*#define HG_REVISION_HASH_STRING "\(.*\)".*/\1/p' $r)" &&
cp -rv doomseeker/build/{doomseeker,libwadseeker.so,engines} \
if [ -n "$(git show $h:../src/core/versiondefs.h 2>/dev/null)" ]; then s=h; else s=cmake; fi &&
"$BACKUPDOOMSEEKER"
BACKUPDOOMSEEKER="../../$(git show $h:../src/core/versiondefs.$s | sed -n 's/.*VERSION_STRING "\(.*\)".*/\1/p')\
$(sed -n 's/.*#define HG_TIME "\(.*\)".*/\-\1/p' $r)-$h$b" &&
mkdir -pv "$BACKUPDOOMSEEKER" &&
cp -rv doomseeker libwadseeker.so* engines \
"$BACKUPDOOMSEEKER"/
</pre>
</pre>


=== Backup (Optional) ===
Files are located at:
Make and name a directory with the current year, month, day, hour and minute and copy doomseeker, libwadseeker.so and the engines directory to it:
<pre>
cd "$HOME"/doomseeker_build && \
COPYANDPASTEDS="$(date +%Y%m%d%H%M)" && \
mkdir -pv "$COPYANDPASTEDS" && \
cp -rv doomseeker/build/{doomseeker,libwadseeker.so,engines} \
"$COPYANDPASTEDS"
</pre>


If you did "Backup" or "Backup (Optional)", the previous files should be located at:
/home/<your username>/doomseeker_build/<your newly created directory>
: '''/home/<your username>/doomseeker_build/'''


== Updating ==
== Updating ==
When you wish to update Doomseeker, copy and paste the following:
When you wish to update Doomseeker, copy and paste the following:
<pre>
<pre>
cd "$HOME"/doomseeker_build/doomseeker && \
cd ~/doomseeker_build/doomseeker &&
hg pull ; hg update
git pull
</pre>
</pre>


When the update finish, go to [[#Compiling|Compiling]].
When the update finish, go to [[#Compiling]].


== Installation ==
== Installation ==
'''The following steps contain commands that require to be run as superuser with the sudo command.'''
Commands beginning with "sudo" will require temporary superuser privileges.


If you want to install Doomseeker, do the following:
If you want to install Doomseeker, do the following:


Make /usr/games/doomseeker directory:
Create /usr/games/doomseeker directory:
<pre>
<pre>
sudo mkdir -pv /usr/games/doomseeker
sudo mkdir -pv /usr/games/doomseeker
</pre>
</pre>


Copy doomseeker, libwadseeker.so and the engines directory to /usr/games/doomseeker:
Copy doomseeker, libwadseeker.so* and the engines directory to /usr/games/doomseeker/:
<pre>
<pre>
sudo cp -rv /home/"$USER"/doomseeker_build/doomseeker/build/{doomseeker,\
cd ~/doomseeker_build/doomseeker/build &&
libwadseeker.so,engines} /usr/games/doomseeker
sudo cp -rv doomseeker libwadseeker.so* engines \
/usr/games/doomseeker/
</pre>
</pre>


Make doomseeker script, add executable permission and move it to /usr/bin:
Create launch script:
<pre>
<pre>
cd /tmp && \
cd ~/doomseeker_build/doomseeker/build &&
echo '#!/bin/sh' > doomseeker && \
printf %s "\
echo >> doomseeker && \
#! /bin/sh
echo 'export LD_LIBRARY_PATH=/usr/games/doomseeker' >> doomseeker && \
export LD_LIBRARY_PATH=/usr/games/doomseeker
echo 'exec /usr/games/doomseeker/doomseeker "$@"' >> doomseeker && \
exec /usr/games/doomseeker/doomseeker \"\$@\"
chmod 755 doomseeker && \
" > doomseeker.sh &&
sudo mv -v doomseeker /usr/bin
chmod 755 doomseeker.sh &&
sudo mv -v doomseeker.sh /usr/bin/doomseeker
</pre>
</pre>


Now from a terminal you should be able to execute '''doomseeker''' from any user account.
Now from a terminal you should be able to run '''doomseeker''' from any user account.


=== Uninstallation ===
=== Uninstallation ===
To remove the previous installation steps:
Remove /usr/games/doomseeker directory and all its files:
Remove /usr/games/doomseeker directory and all its files:
<pre>
<pre>
cd /usr/games && \
sudo rm -rfv /usr/games/doomseeker
sudo rm -rfv doomseeker
</pre>
</pre>


Remove doomseeker script:
Remove doomseeker script:
<pre>
<pre>
cd /usr/bin && \
sudo rm -fv /usr/bin/doomseeker
sudo rm -fv doomseeker
</pre>
</pre>


== Debugging ==
== Developing ==
This page has helped you compile Doomseeker, but perhaps you are interested in debugging the code or submitting code changes or fixes for inclusion. This section is intended for more advanced users who may be unfamiliar to CMake or debugging on Linux systems.
 
=== Debugging ===
'''Prerequisite:'''
'''Prerequisite:'''


* [http://www.gnu.org/software/gdb/ gdb]
* [http://www.gnu.org/software/gdb/ gdb]


In most cases it is good idea to generate a back trace when Doomseeker crashes.
Maybe you have found a way to make Doomseeker crash, and are interested in debugging it. First, you need to compile a debug build of Doomseeker. Inside the build directory, invoke CMake to set up for compiling, but this time, the build type is set to Debug:
 
Make debug directory.
<pre>
<pre>
mkdir -pv "$HOME"/doomseeker_build/doomseeker/debug
cd ~/doomseeker_build/doomseeker/build
cmake .. -DCMAKE_BUILD_TYPE=Debug
</pre>
</pre>
Optionally, you may want to use some of the [[#Build options]].


Make a debug build of doomseeker.
After CMake is done, run <code>make</code> or to speed up compilation, run <code>make -j<number></code>, a recommended value for the <code>-j</code> option is the number of physical cores:
<pre>
<pre>
cd "$HOME"/doomseeker_build/doomseeker/debug && \
make clean ; rm -f engines/*.so ; \
cmake -DCMAKE_BUILD_TYPE=Debug .. && \
make
make
</pre>
</pre>


You should now be able to use gdb to generate a back trace.
To run Doomseeker under a debugger such as gdb, use the following command:
<pre>
<pre>
gdb doomseeker
gdb doomseeker
</pre>
</pre>


You probably want to log the output, so lets output to a file doomseekerdebug.log.
Now gdb should have you in its own command prompt:
<pre>
(gdb)
</pre>
 
You probably want to log the output, so lets output to a file doomseekerdebug.log:
<pre>
<pre>
set logging on doomseekerdebug.log
(gdb) set logging on doomseekerdebug.log
</pre>
</pre>


GDB has it's own command prompt. Use "run" to start doomseeker.
Now start Doomseeker by typing in run, and pressing enter:
<pre>
<pre>
(gdb) run
(gdb) run
</pre>
</pre>


To start and pass command line parameters to doomseeker.
Or put any command line parameters to doomseeker after run:
<pre>
<pre>
(gdb) run <command line parameters>
(gdb) run <command line parameters>
</pre>
</pre>
To see the available command line parameters for Doomseeker, type <code>run --help</code> and press enter.


Use "bt" to get the back trace after a crash.
If Doomseeker crashes, gdb may be able to tell you the source file and line number it crashed in. Typing in the command backtrace or bt will produce information telling the last function calls, showing how execution got to the point where it crashed:
<pre>
<pre>
(gdb) bt
(gdb) backtrace
</pre>
</pre>
All output will be copied into the doomseekerdebug.log, which can then be scrutinized later, or perhaps posted to the [http://zandronum.com/tracker/ Bug Tracker] for other developers to look at.


To exit GDB's command prompt, use "quit", "q" or Ctrl-D.
To exit gdb's command prompt, type quit, q or press Ctrl-D:
<pre>
<pre>
(gdb) quit
(gdb) quit
</pre>
</pre>
If you want to free up space, run <code>make clean</code> to remove the files generated by the compilation.


== Build Options ==
=== Build options ===
{|class="wikitable" width="72%"
{|class="wikitable" width="72%"
|+ <span style="text-decoration: underline">CMake Build Options</span>
|+ <span style="text-decoration: underline">CMake options</span>
|-
|-
!width="10%"|Options!!width="25%"|Description!!width="65%"|Example
!width="10%"|Options!!width="30%"|Description!!width="60%"|Example
|-
|-
|FORCE_QT4=ON||Force Qt4.||cmake -DCMAKE_BUILD_TYPE=Release -DFORCE_QT4=ON ..
|FORCE_QT4=ON||Force Qt4.||cmake .. -DCMAKE_BUILD_TYPE=Release -DFORCE_QT4=ON
|}
|}


{|class="wikitable" width="72%"
{|class="wikitable" width="72%"
|+ <span style="text-decoration: underline">CMake Build Types</span>
|+ <span style="text-decoration: underline">CMake build types</span>
|-
|-
!width="10%"|Types!!width="45%"|Description!!width="45%"|Example
!width="10%"|Types!!width="45%"|Description!!width="45%"|Example
|-
|-
|Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..
|Debug||Debug information, -O1 optimization.||cmake .. -DCMAKE_BUILD_TYPE=Debug
|-
|-
|Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..
|Release||No debug information, -O3 optimization.||cmake .. -DCMAKE_BUILD_TYPE=Release
|-
|-
|RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
|RelWithDebInfo||Debug information, -O2 optimization. Useful for finding optimization bugs that only show up in Release.||cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
|-
|-
|MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..
|MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel
|}
|}


[[Category:Developers Articles]]
[[Category:Developers Articles]]

Latest revision as of 23:51, 15 September 2019

Open a terminal and copy and paste the whole code box for each step.

Install dependencies

Doomseeker needs certain tools and development files in order to compile:

  • Required
    • gcc 4.4 or later
    • make
    • cmake 2.8.12 or later
    • qt5-tools
    • qt5-multimedia
  • Recommended
  • Optional

Install the following as root/superuser:

Debian/Ubuntu

sudo apt-get install g++ make cmake git zlib1g-dev libbz2-dev \
qttools5-dev qttools5-dev-tools qtmultimedia5-dev libqt4-dev

Fedora

dnf install gcc-c++ make cmake git zlib-devel bzip2-devel \
qt5-qttools-devel qt5-qtmultimedia-devel qt-devel

openSUSE

zypper install gcc-c++ make cmake git zlib-devel libbz2-devel \
libqt5-qttools-devel libqt5-qtmultimedia-devel libqt4-devel

Mageia

a='' && [ "$(uname -m)" = x86_64 ] && a=64
urpmi gcc-c++ make cmake git lib${a}zlib-devel \
lib${a}bzip2-devel lib${a}qt5base5-devel qttools5 lib${a}qt5help-devel \
lib${a}qt5multimedia-devel lib${a}qt4-devel lib${a}qtcore4

Arch Linux

pacman -S --needed gcc make cmake git zlib bzip2 qt5-tools qt5-base qt5-multimedia qt4

Gentoo

emerge -avn sys-devel/gcc sys-devel/make dev-util/cmake dev-vcs/git \
sys-libs/zlib app-arch/bzip2 dev-qt/linguist dev-qt/linguist-tools \
dev-qt/qtmultimedia dev-qt/qtcore

PCLinuxOS

a='' && [ "$(uname -m)" = x86_64 ] && a=64
apt-get install gcc-c++ make cmake git zlib1-devel \
lib${a}bzip2-devel lib${a}qt5base5-devel qttools5 lib${a}qt5help-devel \
lib${a}qt5multimedia-devel lib${a}qt4-devel

Solus

sudo eopkg install g++ make cmake binutils glibc-devel pkg-config \
git zlib-devel bzip2-devel qt5-tools-devel qt5-base-devel \
qt5-multimedia-devel qt4-devel

Do the following sections as normal user.

Create doomseeker_build directory

mkdir -pv ~/doomseeker_build

Download and prepare the source

Download the Doomseeker source and create an out of tree build directory:

cd ~/doomseeker_build &&
git clone https://bitbucket.org/Doomseeker/doomseeker.git &&
mkdir -pv doomseeker/build

Compiling

To compile Doomseeker:

c="$(lscpu -p | grep -v '#' | sort -u -t , -k 2,4 | wc -l)" ; [ "$c" -eq 0 ] && c=1
cd ~/doomseeker_build/doomseeker/build &&
cmake .. -DCMAKE_BUILD_TYPE=Release &&
make -j$c

A development version of Doomseeker will be compiled if you do not do #Latest stable version.

Assuming all goes well, a doomseeker binary should be produced. To start Doomseeker, the following command should work:

./doomseeker

Latest stable version

Show the latest stable version:

cd ~/doomseeker_build/doomseeker &&
git tag -l | tail -1

If you want to compile the latest stable version, run:

cd ~/doomseeker_build/doomseeker &&
git checkout --detach refs/tags/$(git tag -l | tail -1)

and compile.

After compiling and backing up the latest stable version, run:

cd ~/doomseeker_build/doomseeker &&
git checkout master

Backup

If you want to backup Doomseeker, do the following:

Create and name a directory with the corresponding Doomseeker version/revision, build type and copy doomseeker, libwadseeker.so* and the engines directory to it:

cd ~/doomseeker_build/doomseeker/build &&
if [ -f CMakeCache.txt ]; then
k="$(sed -n 's/.*CMAKE_BUILD_TYPE:STRING=\(.*\)/\1/p' CMakeCache.txt)"; else k=''; fi &&
if [ -n "$k" ]; then b="-BuildType$k"; else b=''; fi &&
r=../src/core/gitinfo.h && h="$(sed -n 's/.*#define HG_REVISION_HASH_STRING "\(.*\)".*/\1/p' $r)" &&
if [ -n "$(git show $h:../src/core/versiondefs.h 2>/dev/null)" ]; then s=h; else s=cmake; fi &&
BACKUPDOOMSEEKER="../../$(git show $h:../src/core/versiondefs.$s | sed -n 's/.*VERSION_STRING "\(.*\)".*/\1/p')\
$(sed -n 's/.*#define HG_TIME "\(.*\)".*/\-\1/p' $r)-$h$b" &&
mkdir -pv "$BACKUPDOOMSEEKER" &&
cp -rv doomseeker libwadseeker.so* engines \
"$BACKUPDOOMSEEKER"/

Files are located at:

/home/<your username>/doomseeker_build/<your newly created directory>

Updating

When you wish to update Doomseeker, copy and paste the following:

cd ~/doomseeker_build/doomseeker &&
git pull

When the update finish, go to #Compiling.

Installation

Commands beginning with "sudo" will require temporary superuser privileges.

If you want to install Doomseeker, do the following:

Create /usr/games/doomseeker directory:

sudo mkdir -pv /usr/games/doomseeker

Copy doomseeker, libwadseeker.so* and the engines directory to /usr/games/doomseeker/:

cd ~/doomseeker_build/doomseeker/build &&
sudo cp -rv doomseeker libwadseeker.so* engines \
/usr/games/doomseeker/

Create launch script:

cd ~/doomseeker_build/doomseeker/build &&
printf %s "\
#! /bin/sh
export LD_LIBRARY_PATH=/usr/games/doomseeker
exec /usr/games/doomseeker/doomseeker \"\$@\"
" > doomseeker.sh &&
chmod 755 doomseeker.sh &&
sudo mv -v doomseeker.sh /usr/bin/doomseeker

Now from a terminal you should be able to run doomseeker from any user account.

Uninstallation

Remove /usr/games/doomseeker directory and all its files:

sudo rm -rfv /usr/games/doomseeker

Remove doomseeker script:

sudo rm -fv /usr/bin/doomseeker

Developing

This page has helped you compile Doomseeker, but perhaps you are interested in debugging the code or submitting code changes or fixes for inclusion. This section is intended for more advanced users who may be unfamiliar to CMake or debugging on Linux systems.

Debugging

Prerequisite:

Maybe you have found a way to make Doomseeker crash, and are interested in debugging it. First, you need to compile a debug build of Doomseeker. Inside the build directory, invoke CMake to set up for compiling, but this time, the build type is set to Debug:

cd ~/doomseeker_build/doomseeker/build
cmake .. -DCMAKE_BUILD_TYPE=Debug

Optionally, you may want to use some of the #Build options.

After CMake is done, run make or to speed up compilation, run make -j<number>, a recommended value for the -j option is the number of physical cores:

make

To run Doomseeker under a debugger such as gdb, use the following command:

gdb doomseeker

Now gdb should have you in its own command prompt:

(gdb)

You probably want to log the output, so lets output to a file doomseekerdebug.log:

(gdb) set logging on doomseekerdebug.log

Now start Doomseeker by typing in run, and pressing enter:

(gdb) run

Or put any command line parameters to doomseeker after run:

(gdb) run <command line parameters>

To see the available command line parameters for Doomseeker, type run --help and press enter.

If Doomseeker crashes, gdb may be able to tell you the source file and line number it crashed in. Typing in the command backtrace or bt will produce information telling the last function calls, showing how execution got to the point where it crashed:

(gdb) backtrace

All output will be copied into the doomseekerdebug.log, which can then be scrutinized later, or perhaps posted to the Bug Tracker for other developers to look at.

To exit gdb's command prompt, type quit, q or press Ctrl-D:

(gdb) quit

If you want to free up space, run make clean to remove the files generated by the compilation.

Build options

CMake options
Options Description Example
FORCE_QT4=ON Force Qt4. cmake .. -DCMAKE_BUILD_TYPE=Release -DFORCE_QT4=ON
CMake build types
Types Description Example
Debug Debug information, -O1 optimization. cmake .. -DCMAKE_BUILD_TYPE=Debug
Release No debug information, -O3 optimization. cmake .. -DCMAKE_BUILD_TYPE=Release
RelWithDebInfo Debug information, -O2 optimization. Useful for finding optimization bugs that only show up in Release. cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
MinSizeRel Similar to Release but with less optimizations in order to save space. cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel