Compiling Doomseeker on Linux: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:
** qt5-multimedia
** qt5-multimedia
* '''Recommended'''
* '''Recommended'''
** mercurial ''(needed in order to [https://bitbucket.org/Doomseeker/doomseeker download the source] and compile in commit meta data)''
** git ''(needed in order to [https://bitbucket.org/Doomseeker/doomseeker download the source] and compile in commit meta data)''
* '''Optional'''
* '''Optional'''
** zlib ''(Doomseeker has a copy of it and will be statically compiled in if not found)''
** zlib ''(Doomseeker has a copy of it and will be statically compiled in if not found)''
Line 20: Line 20:
=== Debian/Ubuntu ===
=== Debian/Ubuntu ===
<pre>
<pre>
sudo apt-get install g++ make cmake mercurial 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 26: Line 26:
=== Fedora ===
=== Fedora ===
<pre>
<pre>
dnf install gcc-c++ make cmake mercurial 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 32: Line 32:
=== openSUSE ===
=== openSUSE ===
<pre>
<pre>
zypper install gcc-c++ make cmake mercurial 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 39: Line 39:
<pre>
<pre>
a='' && [ "$(uname -m)" = x86_64 ] && a=64
a='' && [ "$(uname -m)" = x86_64 ] && a=64
urpmi gcc-c++ make cmake mercurial lib${a}zlib-devel \
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}bzip2-devel lib${a}qt5base5-devel qttools5 lib${a}qt5help-devel \
lib${a}qt5multimedia-devel lib${a}qt4-devel lib${a}qtcore4
lib${a}qt5multimedia-devel lib${a}qt4-devel lib${a}qtcore4
Line 46: Line 46:
=== Arch Linux ===
=== Arch Linux ===
<pre>
<pre>
pacman -S --needed gcc make cmake mercurial 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 sys-devel/make dev-util/cmake dev-vcs/mercurial \
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 \
sys-libs/zlib app-arch/bzip2 dev-qt/linguist dev-qt/linguist-tools \
dev-qt/qtmultimedia dev-qt/qtcore
dev-qt/qtmultimedia dev-qt/qtcore
Line 59: Line 59:
<pre>
<pre>
a='' && [ "$(uname -m)" = x86_64 ] && a=64
a='' && [ "$(uname -m)" = x86_64 ] && a=64
apt-get install gcc-c++ make cmake mercurial zlib1-devel \
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}bzip2-devel lib${a}qt5base5-devel qttools5 lib${a}qt5help-devel \
lib${a}qt5multimedia-devel lib${a}qt4-devel
lib${a}qt5multimedia-devel lib${a}qt4-devel
Line 67: Line 67:
<pre>
<pre>
sudo eopkg install g++ make cmake binutils glibc-devel pkg-config \
sudo eopkg install g++ make cmake binutils glibc-devel pkg-config \
mercurial zlib-devel bzip2-devel qt5-tools-devel qt5-base-devel \
git zlib-devel bzip2-devel qt5-tools-devel qt5-base-devel \
qt5-multimedia-devel qt4-devel
qt5-multimedia-devel qt4-devel
</pre>
</pre>
Line 82: Line 82:
<pre>
<pre>
cd ~/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>
Line 105: Line 105:
<pre>
<pre>
cd ~/doomseeker_build/doomseeker &&
cd ~/doomseeker_build/doomseeker &&
hg identify -r 'max(tagged())'
git tag -l | tail -1
</pre>
</pre>


Line 111: Line 111:
<pre>
<pre>
cd ~/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]].
Line 118: Line 118:
<pre>
<pre>
cd ~/doomseeker_build/doomseeker &&
cd ~/doomseeker_build/doomseeker &&
hg update default
git checkout master
</pre>
</pre>


Line 124: Line 124:
If you want to backup Doomseeker, do the following:
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:
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 ~/doomseeker_build/doomseeker/build &&
cd ~/doomseeker_build/doomseeker/build &&
Line 130: Line 130:
k="$(sed -n 's/.*CMAKE_BUILD_TYPE:STRING=\(.*\)/\1/p' CMakeCache.txt)"; else k=''; fi &&
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 &&
if [ -n "$k" ]; then b="-BuildType$k"; else b=''; fi &&
h="$(sed -n 's/.*#define HG_REVISION_HASH_STRING "\(.*\)".*/\1/p' ../src/core/svnrevision.h)" &&
r=../src/core/gitinfo.h && h="$(sed -n 's/.*#define HG_REVISION_HASH_STRING "\(.*\)".*/\1/p' $r)" &&
if [ -n "$(hg cat -r $h ../src/core/versiondefs.h 2>/dev/null)" ]; then r=h; else r=cmake; fi &&
if [ -n "$(git show $h:../src/core/versiondefs.h 2>/dev/null)" ]; then s=h; else s=cmake; fi &&
BACKUPDOOMSEEKER="../../$(hg cat -r $h ../src/core/versiondefs.$r | sed -n 's/.*VERSION_STRING "\(.*\)".*/\1/p')\
BACKUPDOOMSEEKER="../../$(git show $h:../src/core/versiondefs.$s | sed -n 's/.*VERSION_STRING "\(.*\)".*/\1/p')\
$(sed -n 's/.*#define SVN_REVISION_STRING "\(.*\)".*/\-\1/p' ../src/core/svnrevision.h)-$h$b" &&
$(sed -n 's/.*#define HG_TIME "\(.*\)".*/\-\1/p' $r)-$h$b" &&
mkdir -pv "$BACKUPDOOMSEEKER" &&
mkdir -pv "$BACKUPDOOMSEEKER" &&
cp -rv doomseeker libwadseeker.so engines \
cp -rv doomseeker libwadseeker.so* engines \
"$BACKUPDOOMSEEKER"/
"$BACKUPDOOMSEEKER"/
</pre>
</pre>
Line 147: Line 147:
<pre>
<pre>
cd ~/doomseeker_build/doomseeker &&
cd ~/doomseeker_build/doomseeker &&
hg pull ; hg update
git pull
</pre>
</pre>


Line 162: Line 162:
</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>
cd ~/doomseeker_build/doomseeker/build &&
cd ~/doomseeker_build/doomseeker/build &&
sudo cp -rv doomseeker libwadseeker.so engines \
sudo cp -rv doomseeker libwadseeker.so* engines \
/usr/games/doomseeker/
/usr/games/doomseeker/
</pre>
</pre>
Line 173: Line 173:
cd ~/doomseeker_build/doomseeker/build &&
cd ~/doomseeker_build/doomseeker/build &&
printf %s "\
printf %s "\
#!/bin/sh
#! /bin/sh
export LD_LIBRARY_PATH=/usr/games/doomseeker
export LD_LIBRARY_PATH=/usr/games/doomseeker
exec /usr/games/doomseeker/doomseeker \"\$@\"
exec /usr/games/doomseeker/doomseeker \"\$@\"
Line 238: Line 238:
(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.


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:
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:
Line 255: Line 256:
|+ <span style="text-decoration: underline">CMake 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
20

edits