http://maniacsvault.net/ecwolf/w/api.php?action=feedcontributions&user=Skyrimguy&feedformat=atom ECWolf Wiki - User contributions [en] 2024-03-29T11:05:04Z User contributions MediaWiki 1.35.8 http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=813 Compile ECWolf on Linux 2019-09-15T21:31:24Z <p>Skyrimguy: /* Download and prepare the source */</p> <hr /> <div>This guide will demonstrate how to compile the Git version of ECWolf on Linux.<br /> <br /> == Install dependencies ==<br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://www.libsdl.org/ libsdl] 2.x<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 2.x<br /> * [https://www.libsdl.org/projects/SDL_net/ SDL_net] 2.x<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://maniacsvault.net/ecwolf/files/tools/dev/ SDL_mixer for ECWolf] (Standard [http://www.libsdl.org/projects/SDL_mixer/release-1.2.html SDL_mixer] 1.2 will also work, but features will be disabled.)<br /> * [https://www.libsdl.org/projects/SDL_net/release-1.2.html SDL_net] 1.2<br /> <br /> [http://tortoisehg.bitbucket.org/ Git] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following as root/superuser:<br /> <br /> === Debian/Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install g++ make cmake libsdl2-dev libsdl2-mixer-dev libsdl2-net-dev \<br /> git zlib1g-dev libbz2-dev libjpeg-dev libgtk2.0-dev libsdl1.2-dev libsdl-mixer1.2-dev \<br /> libsdl-net1.2-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> dnf install gcc-c++ make cmake SDL2-devel SDL2_mixer-devel SDL2_net-devel git \<br /> zlib-devel bzip2-devel libjpeg-turbo-devel gtk2-devel SDL-devel SDL_mixer-devel \<br /> SDL_net-devel<br /> &lt;/pre&gt;<br /> <br /> === openSUSE ===<br /> &lt;pre&gt;<br /> zypper install gcc-c++ make cmake libSDL2-devel libSDL2_mixer-devel libSDL2_net-devel \<br /> git zlib-devel libbz2-devel libjpeg-devel gtk2-devel libSDL-devel libSDL_mixer-devel \<br /> libSDL_net-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> a='' &amp;&amp; [ &quot;$(uname -m)&quot; = x86_64 ] &amp;&amp; a=64<br /> urpmi gcc-c++ make cmake lib${a}sdl2.0-devel lib{a}sdl2_mixer-devel \<br /> lib{a}sdl2_net-devel git lib${a}zlib-devel lib${a}bzip2-devel \<br /> lib${a}jpeg-devel lib${a}gtk+2.0-devel lib${a}cairo-devel lib${a}SDL-devel \<br /> lib${a}SDL_mixer-devel lib${a}SDL_net-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed gcc make cmake sdl2 sdl2_mixer sdl2_net git \<br /> zlib bzip2 libjpeg-turbo gtk2 sdl sdl_mixer sdl_net<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn sys-devel/gcc sys-devel/make dev-util/cmake media-libs/libsdl2 \<br /> media-libs/sdl2-mixer media-libs/sdl2-net dev-vcs/git sys-libs/zlib \<br /> app-arch/bzip2 media-libs/libjpeg-turbo x11-libs/gtk+ media-libs/libsdl \<br /> media-libs/sdl-mixer media-libs/sdl-net<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> a='' &amp;&amp; [ &quot;$(uname -m)&quot; = x86_64 ] &amp;&amp; a=64<br /> apt-get install gcc-c++ make cmake lib${a}sdl2.0-devel lib{a}sdl2_mixer-devel \<br /> lib{a}sdl2_net-devel git zlib1-devel lib${a}bzip2-devel lib${a}jpeg62-devel \<br /> lib${a}gtk+2.0_0-devel lib${a}SDL-devel lib${a}SDL_mixer-devel lib${a}SDL_net-devel<br /> &lt;/pre&gt;<br /> <br /> === Solus ===<br /> &lt;pre&gt;<br /> sudo eopkg install g++ make cmake binutils glibc-devel pkg-config \<br /> sdl2-devel sdl2-mixer-devel sdl2-net-devel git zlib-devel \<br /> bzip2-devel libjpeg-turbo-devel libgtk-2-devel sdl1-devel \<br /> sdl1-mixer-devel sdl1-net-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following sections as normal user.'''<br /> <br /> == Create ecwolf_build directory ==<br /> mkdir -pv ~/ecwolf_build<br /> <br /> == Download and prepare the source ==<br /> Use Git to download the ECWolf source:<br /> cd ~/ecwolf_build<br /> git clone [https://bitbucket.org/ecwolf/ecwolf https://bitbucket.org/ecwolf/ecwolf.git]<br /> and create an out of tree build directory in the newly created ecwolf directory:<br /> mkdir -pv ecwolf/build<br /> <br /> == Compiling ==<br /> Inside the build directory, run CMake to generate a Makefile:<br /> cd ~/ecwolf_build/ecwolf/build<br /> cmake .. -DCMAKE_BUILD_TYPE=Release -DGPL=ON<br /> Assuming there were no errors, you should be able to run make to compile:<br /> make<br /> A development version of ECWolf will be compiled if you do not do [[#Latest stable version]].<br /> <br /> An ecwolf binary should be produced. To start ECWolf, the following command should work:<br /> ./ecwolf<br /> If ECWolf complains you do not have any base game data set up, make sure that you have your [[Game data]] files placed in the same directory as ECWolf, in ~/.config/ecwolf or $PROGDIR. Alternatively, you can edit ~/.config/ecwolf/ecwolf.cfg to add the path for your game data to BaseDataPaths.<br /> <br /> === Latest stable version ===<br /> Show the latest stable version:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> git tag -l | tail -1<br /> <br /> If you want to compile the latest stable version, run:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> git checkout --detach refs/tags/$(git tag -l | tail -1)<br /> and [[#Compiling|compile]].<br /> <br /> After compiling, [[#Backup|backing up]] and optionally [[#Installation|installing]] the latest stable version, run:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> git checkout master<br /> <br /> == Backup ==<br /> If you want to backup ECWolf, do the following:<br /> <br /> Create and name a directory with the corresponding ECWolf version/revision, build type and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd ~/ecwolf_build/ecwolf/build &amp;&amp;<br /> if [ -f CMakeCache.txt ]; then<br /> k=&quot;$(sed -n 's/.*CMAKE_BUILD_TYPE:STRING=\(.*\)/\1/p' CMakeCache.txt)&quot;; else k=''; fi &amp;&amp;<br /> if [ -n &quot;$k&quot; ]; then b=&quot;-BuildType$k&quot;; else b=''; fi &amp;&amp;<br /> BACKUPECWOLF=&quot;../../$(sed -n 's/.*#define GIT_DESCRIPTION &quot;\(.*\)&quot;.*/\1/p' src/gitinfo.h)$b&quot; &amp;&amp;<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp;<br /> cp -v ecwolf ecwolf.pk3 &quot;$BACKUPECWOLF&quot;/<br /> &lt;/pre&gt;<br /> <br /> Files are located at:<br /> <br /> /home/&lt;your username&gt;/ecwolf_build/&lt;your newly created directory&gt;<br /> <br /> == Updating ==<br /> When you wish to update ECWolf, copy and paste the following:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> git pull<br /> <br /> When the update finish, go to [[#Compiling]].<br /> <br /> == Installation ==<br /> * '''ecwolf''' = Stable version<br /> * '''ecwolf-alpha''' = Development version<br /> <br /> Commands beginning with &quot;sudo&quot; will require temporary superuser privileges.<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Create /usr/games/ecwolf and /usr/games/ecwolf-alpha directories:<br /> sudo mkdir -pv /usr/games/ecwolf /usr/games/ecwolf-alpha<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf/ or /usr/games/ecwolf-alpha/:<br /> &lt;pre&gt;<br /> cd ~/ecwolf_build/ecwolf/build &amp;&amp;<br /> h=&quot;$(sed -n 's/.*#define GIT_HASH &quot;\(.*\)&quot;.*/\1/p' src/gitinfo.h)&quot; &amp;&amp;<br /> if [ -z &quot;$(git describe --exact-match --tags $h 2&gt;/dev/null)&quot; ]; then<br /> d=-alpha; else d=''; fi &amp;&amp;<br /> sudo cp -v ecwolf ecwolf.pk3 /usr/games/ecwolf$d/<br /> &lt;/pre&gt;<br /> <br /> Create launch script:<br /> &lt;pre&gt;<br /> cd ~/ecwolf_build/ecwolf/build &amp;&amp;<br /> h=&quot;$(sed -n 's/.*#define GIT_HASH &quot;\(.*\)&quot;.*/\1/p' src/gitinfo.h)&quot; &amp;&amp;<br /> if [ -z &quot;$(git describe --exact-match --tags $h 2&gt;/dev/null)&quot; ]; then<br /> d=-alpha; else d=''; fi &amp;&amp;<br /> printf %s &quot;\<br /> #! /bin/sh<br /> exec /usr/games/ecwolf$d/ecwolf \&quot;\$@\&quot;<br /> &quot; &gt; ecwolf$d.sh &amp;&amp;<br /> chmod 755 ecwolf$d.sh &amp;&amp;<br /> sudo mv -v ecwolf$d.sh /usr/bin/ecwolf$d<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to run '''ecwolf''' or '''ecwolf-alpha''' from any user account.<br /> <br /> === Uninstallation ===<br /> Remove /usr/games/ecwolf directory and all its files:<br /> sudo rm -rfv /usr/games/ecwolf<br /> <br /> Remove ecwolf script:<br /> sudo rm -fv /usr/bin/ecwolf<br /> <br /> Remove /usr/games/ecwolf-alpha directory and all its files:<br /> sudo rm -rfv /usr/games/ecwolf-alpha<br /> <br /> Remove ecwolf-alpha script:<br /> sudo rm -fv /usr/bin/ecwolf-alpha<br /> <br /> == Developing ==<br /> This page has helped you compile ECWolf, 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.<br /> <br /> === Debugging ===<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> Maybe you have found a way to make ECWolf crash, and are interested in debugging it. First, you need to compile a debug build of ECWolf. Inside the build directory, invoke CMake to set up for compiling, but this time, the build type is set to Debug:<br /> cd ~/ecwolf_build/ecwolf/build<br /> cmake .. -DCMAKE_BUILD_TYPE=Debug<br /> Optionally, you may want to use some of the [[#Build options]].<br /> <br /> After CMake is done, run &quot;make&quot; or to speed up compilation, run &quot;make -j&lt;number&gt;&quot;, a recommended value for the &quot;-j&quot; option is the number of physical cores:<br /> make<br /> <br /> To run ECWolf under a debugger such as gdb, use the following command:<br /> gdb ecwolf<br /> <br /> Now gdb should have you in its own command prompt:<br /> (gdb)<br /> <br /> You probably want to log the output, so lets output to a file ecwolfdebug.log:<br /> (gdb) set logging on ecwolfdebug.log<br /> <br /> Now start ECWolf by typing in run, and pressing enter:<br /> (gdb) run<br /> <br /> Or put any command line parameters to ecwolf after run:<br /> (gdb) run &lt;command line parameters&gt;<br /> To see the available command line parameters for ECWolf, type &quot;run --help&quot; and press enter.<br /> <br /> If ECWolf 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:<br /> (gdb) backtrace<br /> All output will be copied into the ecwolfdebug.log, which can then be scrutinized later, or perhaps posted to the [https://bitbucket.org/ecwolf/ecwolf/issues Bug Tracker] for other developers to look at.<br /> <br /> To exit gdb's command prompt, type quit, q or press Ctrl-D:<br /> (gdb) quit<br /> If you want to free up space, run &quot;make clean&quot; to remove the files generated by the compilation.<br /> <br /> === Build options ===<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake .. -DGPL=ON<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake .. -DGPL=ON -DUSE_LIBTEXTSCREEN=ON<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake .. -DNO_GTK=ON<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake build types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake .. -DCMAKE_BUILD_TYPE=Debug<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake .. -DCMAKE_BUILD_TYPE=Release<br /> |-<br /> |RelWithDebInfo||Debug information, -O2 optimization. Useful for finding optimization bugs that only show up in Release.||cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=812 Compile ECWolf on Linux 2019-09-15T14:03:33Z <p>Skyrimguy: </p> <hr /> <div>This guide will demonstrate how to compile the Git version of ECWolf on Linux.<br /> <br /> == Install dependencies ==<br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://www.libsdl.org/ libsdl] 2.x<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 2.x<br /> * [https://www.libsdl.org/projects/SDL_net/ SDL_net] 2.x<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://maniacsvault.net/ecwolf/files/tools/dev/ SDL_mixer for ECWolf] (Standard [http://www.libsdl.org/projects/SDL_mixer/release-1.2.html SDL_mixer] 1.2 will also work, but features will be disabled.)<br /> * [https://www.libsdl.org/projects/SDL_net/release-1.2.html SDL_net] 1.2<br /> <br /> [http://tortoisehg.bitbucket.org/ Git] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following as root/superuser:<br /> <br /> === Debian/Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install g++ make cmake libsdl2-dev libsdl2-mixer-dev libsdl2-net-dev \<br /> git zlib1g-dev libbz2-dev libjpeg-dev libgtk2.0-dev libsdl1.2-dev libsdl-mixer1.2-dev \<br /> libsdl-net1.2-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> dnf install gcc-c++ make cmake SDL2-devel SDL2_mixer-devel SDL2_net-devel git \<br /> zlib-devel bzip2-devel libjpeg-turbo-devel gtk2-devel SDL-devel SDL_mixer-devel \<br /> SDL_net-devel<br /> &lt;/pre&gt;<br /> <br /> === openSUSE ===<br /> &lt;pre&gt;<br /> zypper install gcc-c++ make cmake libSDL2-devel libSDL2_mixer-devel libSDL2_net-devel \<br /> git zlib-devel libbz2-devel libjpeg-devel gtk2-devel libSDL-devel libSDL_mixer-devel \<br /> libSDL_net-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> a='' &amp;&amp; [ &quot;$(uname -m)&quot; = x86_64 ] &amp;&amp; a=64<br /> urpmi gcc-c++ make cmake lib${a}sdl2.0-devel lib{a}sdl2_mixer-devel \<br /> lib{a}sdl2_net-devel git lib${a}zlib-devel lib${a}bzip2-devel \<br /> lib${a}jpeg-devel lib${a}gtk+2.0-devel lib${a}cairo-devel lib${a}SDL-devel \<br /> lib${a}SDL_mixer-devel lib${a}SDL_net-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed gcc make cmake sdl2 sdl2_mixer sdl2_net git \<br /> zlib bzip2 libjpeg-turbo gtk2 sdl sdl_mixer sdl_net<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn sys-devel/gcc sys-devel/make dev-util/cmake media-libs/libsdl2 \<br /> media-libs/sdl2-mixer media-libs/sdl2-net dev-vcs/git sys-libs/zlib \<br /> app-arch/bzip2 media-libs/libjpeg-turbo x11-libs/gtk+ media-libs/libsdl \<br /> media-libs/sdl-mixer media-libs/sdl-net<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> a='' &amp;&amp; [ &quot;$(uname -m)&quot; = x86_64 ] &amp;&amp; a=64<br /> apt-get install gcc-c++ make cmake lib${a}sdl2.0-devel lib{a}sdl2_mixer-devel \<br /> lib{a}sdl2_net-devel git zlib1-devel lib${a}bzip2-devel lib${a}jpeg62-devel \<br /> lib${a}gtk+2.0_0-devel lib${a}SDL-devel lib${a}SDL_mixer-devel lib${a}SDL_net-devel<br /> &lt;/pre&gt;<br /> <br /> === Solus ===<br /> &lt;pre&gt;<br /> sudo eopkg install g++ make cmake binutils glibc-devel pkg-config \<br /> sdl2-devel sdl2-mixer-devel sdl2-net-devel git zlib-devel \<br /> bzip2-devel libjpeg-turbo-devel libgtk-2-devel sdl1-devel \<br /> sdl1-mixer-devel sdl1-net-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following sections as normal user.'''<br /> <br /> == Create ecwolf_build directory ==<br /> mkdir -pv ~/ecwolf_build<br /> <br /> == Download and prepare the source ==<br /> Use Git to download the ECWolf source:<br /> cd ~/ecwolf_build<br /> git clone [https://bitbucket.org/ecwolf/ecwolf https://bitbucket.org/ecwolf/ecwolf]<br /> and create an out of tree build directory in the newly created ecwolf directory:<br /> mkdir -pv ecwolf/build<br /> <br /> == Compiling ==<br /> Inside the build directory, run CMake to generate a Makefile:<br /> cd ~/ecwolf_build/ecwolf/build<br /> cmake .. -DCMAKE_BUILD_TYPE=Release -DGPL=ON<br /> Assuming there were no errors, you should be able to run make to compile:<br /> make<br /> A development version of ECWolf will be compiled if you do not do [[#Latest stable version]].<br /> <br /> An ecwolf binary should be produced. To start ECWolf, the following command should work:<br /> ./ecwolf<br /> If ECWolf complains you do not have any base game data set up, make sure that you have your [[Game data]] files placed in the same directory as ECWolf, in ~/.config/ecwolf or $PROGDIR. Alternatively, you can edit ~/.config/ecwolf/ecwolf.cfg to add the path for your game data to BaseDataPaths.<br /> <br /> === Latest stable version ===<br /> Show the latest stable version:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> git tag -l | tail -1<br /> <br /> If you want to compile the latest stable version, run:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> git checkout --detach refs/tags/$(git tag -l | tail -1)<br /> and [[#Compiling|compile]].<br /> <br /> After compiling, [[#Backup|backing up]] and optionally [[#Installation|installing]] the latest stable version, run:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> git checkout master<br /> <br /> == Backup ==<br /> If you want to backup ECWolf, do the following:<br /> <br /> Create and name a directory with the corresponding ECWolf version/revision, build type and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd ~/ecwolf_build/ecwolf/build &amp;&amp;<br /> if [ -f CMakeCache.txt ]; then<br /> k=&quot;$(sed -n 's/.*CMAKE_BUILD_TYPE:STRING=\(.*\)/\1/p' CMakeCache.txt)&quot;; else k=''; fi &amp;&amp;<br /> if [ -n &quot;$k&quot; ]; then b=&quot;-BuildType$k&quot;; else b=''; fi &amp;&amp;<br /> BACKUPECWOLF=&quot;../../$(sed -n 's/.*#define GIT_DESCRIPTION &quot;\(.*\)&quot;.*/\1/p' src/gitinfo.h)$b&quot; &amp;&amp;<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp;<br /> cp -v ecwolf ecwolf.pk3 &quot;$BACKUPECWOLF&quot;/<br /> &lt;/pre&gt;<br /> <br /> Files are located at:<br /> <br /> /home/&lt;your username&gt;/ecwolf_build/&lt;your newly created directory&gt;<br /> <br /> == Updating ==<br /> When you wish to update ECWolf, copy and paste the following:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> git pull<br /> <br /> When the update finish, go to [[#Compiling]].<br /> <br /> == Installation ==<br /> * '''ecwolf''' = Stable version<br /> * '''ecwolf-alpha''' = Development version<br /> <br /> Commands beginning with &quot;sudo&quot; will require temporary superuser privileges.<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Create /usr/games/ecwolf and /usr/games/ecwolf-alpha directories:<br /> sudo mkdir -pv /usr/games/ecwolf /usr/games/ecwolf-alpha<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf/ or /usr/games/ecwolf-alpha/:<br /> &lt;pre&gt;<br /> cd ~/ecwolf_build/ecwolf/build &amp;&amp;<br /> h=&quot;$(sed -n 's/.*#define GIT_HASH &quot;\(.*\)&quot;.*/\1/p' src/gitinfo.h)&quot; &amp;&amp;<br /> if [ -z &quot;$(git describe --exact-match --tags $h 2&gt;/dev/null)&quot; ]; then<br /> d=-alpha; else d=''; fi &amp;&amp;<br /> sudo cp -v ecwolf ecwolf.pk3 /usr/games/ecwolf$d/<br /> &lt;/pre&gt;<br /> <br /> Create launch script:<br /> &lt;pre&gt;<br /> cd ~/ecwolf_build/ecwolf/build &amp;&amp;<br /> h=&quot;$(sed -n 's/.*#define GIT_HASH &quot;\(.*\)&quot;.*/\1/p' src/gitinfo.h)&quot; &amp;&amp;<br /> if [ -z &quot;$(git describe --exact-match --tags $h 2&gt;/dev/null)&quot; ]; then<br /> d=-alpha; else d=''; fi &amp;&amp;<br /> printf %s &quot;\<br /> #! /bin/sh<br /> exec /usr/games/ecwolf$d/ecwolf \&quot;\$@\&quot;<br /> &quot; &gt; ecwolf$d.sh &amp;&amp;<br /> chmod 755 ecwolf$d.sh &amp;&amp;<br /> sudo mv -v ecwolf$d.sh /usr/bin/ecwolf$d<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to run '''ecwolf''' or '''ecwolf-alpha''' from any user account.<br /> <br /> === Uninstallation ===<br /> Remove /usr/games/ecwolf directory and all its files:<br /> sudo rm -rfv /usr/games/ecwolf<br /> <br /> Remove ecwolf script:<br /> sudo rm -fv /usr/bin/ecwolf<br /> <br /> Remove /usr/games/ecwolf-alpha directory and all its files:<br /> sudo rm -rfv /usr/games/ecwolf-alpha<br /> <br /> Remove ecwolf-alpha script:<br /> sudo rm -fv /usr/bin/ecwolf-alpha<br /> <br /> == Developing ==<br /> This page has helped you compile ECWolf, 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.<br /> <br /> === Debugging ===<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> Maybe you have found a way to make ECWolf crash, and are interested in debugging it. First, you need to compile a debug build of ECWolf. Inside the build directory, invoke CMake to set up for compiling, but this time, the build type is set to Debug:<br /> cd ~/ecwolf_build/ecwolf/build<br /> cmake .. -DCMAKE_BUILD_TYPE=Debug<br /> Optionally, you may want to use some of the [[#Build options]].<br /> <br /> After CMake is done, run &quot;make&quot; or to speed up compilation, run &quot;make -j&lt;number&gt;&quot;, a recommended value for the &quot;-j&quot; option is the number of physical cores:<br /> make<br /> <br /> To run ECWolf under a debugger such as gdb, use the following command:<br /> gdb ecwolf<br /> <br /> Now gdb should have you in its own command prompt:<br /> (gdb)<br /> <br /> You probably want to log the output, so lets output to a file ecwolfdebug.log:<br /> (gdb) set logging on ecwolfdebug.log<br /> <br /> Now start ECWolf by typing in run, and pressing enter:<br /> (gdb) run<br /> <br /> Or put any command line parameters to ecwolf after run:<br /> (gdb) run &lt;command line parameters&gt;<br /> To see the available command line parameters for ECWolf, type &quot;run --help&quot; and press enter.<br /> <br /> If ECWolf 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:<br /> (gdb) backtrace<br /> All output will be copied into the ecwolfdebug.log, which can then be scrutinized later, or perhaps posted to the [https://bitbucket.org/ecwolf/ecwolf/issues Bug Tracker] for other developers to look at.<br /> <br /> To exit gdb's command prompt, type quit, q or press Ctrl-D:<br /> (gdb) quit<br /> If you want to free up space, run &quot;make clean&quot; to remove the files generated by the compilation.<br /> <br /> === Build options ===<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake .. -DGPL=ON<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake .. -DGPL=ON -DUSE_LIBTEXTSCREEN=ON<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake .. -DNO_GTK=ON<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake build types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake .. -DCMAKE_BUILD_TYPE=Debug<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake .. -DCMAKE_BUILD_TYPE=Release<br /> |-<br /> |RelWithDebInfo||Debug information, -O2 optimization. Useful for finding optimization bugs that only show up in Release.||cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=786 Compile ECWolf on Linux 2018-03-08T11:21:01Z <p>Skyrimguy: </p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Install dependencies ==<br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://www.libsdl.org/ libsdl] 2.x<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 2.x<br /> * [https://www.libsdl.org/projects/SDL_net/ SDL_net] 2.x<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://maniacsvault.net/ecwolf/files/tools/dev/ SDL_mixer for ECWolf] (Standard [http://www.libsdl.org/projects/SDL_mixer/release-1.2.html SDL_mixer] 1.2 will also work, but features will be disabled.)<br /> * [https://www.libsdl.org/projects/SDL_net/release-1.2.html SDL_net] 1.2<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following as root/superuser:<br /> <br /> === Debian/Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install g++ make cmake libsdl2-dev libsdl2-mixer-dev libsdl2-net-dev \<br /> mercurial zlib1g-dev libbz2-dev libjpeg-dev libgtk2.0-dev libsdl1.2-dev libsdl-mixer1.2-dev \<br /> libsdl-net1.2-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> dnf install gcc-c++ make cmake SDL2-devel SDL2_mixer-devel SDL2_net-devel mercurial \<br /> zlib-devel bzip2-devel libjpeg-turbo-devel gtk2-devel SDL-devel SDL_mixer-devel \<br /> SDL_net-devel<br /> &lt;/pre&gt;<br /> <br /> === openSUSE ===<br /> &lt;pre&gt;<br /> zypper install gcc-c++ make cmake libSDL2-devel libSDL2_mixer-devel libSDL2_net-devel \<br /> mercurial zlib-devel libbz2-devel libjpeg-devel gtk2-devel libSDL-devel libSDL_mixer-devel \<br /> libSDL_net-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> a='' &amp;&amp; [ &quot;$(uname -m)&quot; = x86_64 ] &amp;&amp; a=64<br /> urpmi gcc-c++ make cmake lib${a}sdl2.0-devel lib{a}sdl2_mixer-devel \<br /> lib{a}sdl2_net-devel mercurial lib${a}zlib-devel lib${a}bzip2-devel \<br /> lib${a}jpeg-devel lib${a}gtk+2.0-devel lib${a}cairo-devel lib${a}SDL-devel \<br /> lib${a}SDL_mixer-devel lib${a}SDL_net-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed gcc make cmake sdl2 sdl2_mixer sdl2_net mercurial \<br /> zlib bzip2 libjpeg-turbo gtk2 sdl sdl_mixer sdl_net<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn sys-devel/gcc sys-devel/make dev-util/cmake media-libs/libsdl2 \<br /> media-libs/sdl2-mixer media-libs/sdl2-net dev-vcs/mercurial sys-libs/zlib \<br /> app-arch/bzip2 media-libs/libjpeg-turbo x11-libs/gtk+ media-libs/libsdl \<br /> media-libs/sdl-mixer media-libs/sdl-net<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> a='' &amp;&amp; [ &quot;$(uname -m)&quot; = x86_64 ] &amp;&amp; a=64<br /> apt-get install gcc-c++ make cmake lib${a}sdl2.0-devel lib{a}sdl2_mixer-devel \<br /> lib{a}sdl2_net-devel mercurial zlib1-devel lib${a}bzip2-devel lib${a}jpeg62-devel \<br /> lib${a}gtk+2.0_0-devel lib${a}SDL-devel lib${a}SDL_mixer-devel lib${a}SDL_net-devel<br /> &lt;/pre&gt;<br /> <br /> === Solus ===<br /> &lt;pre&gt;<br /> sudo eopkg install g++ make cmake binutils glibc-devel pkg-config \<br /> sdl2-devel sdl2-mixer-devel sdl2-net-devel mercurial zlib-devel \<br /> bzip2-devel libjpeg-turbo-devel libgtk-2-devel sdl1-devel \<br /> sdl1-mixer-devel sdl1-net-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following sections as normal user.'''<br /> <br /> == Create ecwolf_build directory ==<br /> mkdir -pv ~/ecwolf_build<br /> <br /> == Download and prepare the source ==<br /> Use Mercurial to download the ECWolf source:<br /> cd ~/ecwolf_build<br /> hg clone [https://bitbucket.org/ecwolf/ecwolf https://bitbucket.org/ecwolf/ecwolf]<br /> and create an out of tree build directory in the newly created ecwolf directory:<br /> mkdir -pv ecwolf/build<br /> <br /> == Compiling ==<br /> Inside the build directory, run CMake to generate a Makefile:<br /> cd ~/ecwolf_build/ecwolf/build<br /> cmake .. -DCMAKE_BUILD_TYPE=Release -DGPL=ON<br /> Assuming there were no errors, you should be able to run make to compile:<br /> make<br /> A development version of ECWolf will be compiled if you do not do [[#Latest stable version]].<br /> <br /> An ecwolf binary should be produced. To start ECWolf, the following command should work:<br /> ./ecwolf<br /> If ECWolf complains you do not have any base game data set up, make sure that you have your [[Game data]] files placed in the same directory as ECWolf, in ~/.config/ecwolf or $PROGDIR. Alternatively, you can edit ~/.config/ecwolf/ecwolf.cfg to add the path for your game data to BaseDataPaths.<br /> <br /> === Latest stable version ===<br /> Show the latest stable version:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> hg identify -r 'max(tagged())'<br /> <br /> If you want to compile the latest stable version, run:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> hg update -cr 'max(tagged())'<br /> and [[#Compiling|compile]].<br /> <br /> After compiling, [[#Backup|backing up]] and optionally [[#Installation|installing]] the latest stable version, run:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> hg update default<br /> <br /> == Backup ==<br /> If you want to backup ECWolf, do the following:<br /> <br /> Create and name a directory with the corresponding ECWolf version/revision, build type and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd ~/ecwolf_build/ecwolf/build &amp;&amp;<br /> if [ -f CMakeCache.txt ]; then<br /> k=&quot;$(sed -n 's/.*CMAKE_BUILD_TYPE:STRING=\(.*\)/\1/p' CMakeCache.txt)&quot;; else k=''; fi &amp;&amp;<br /> if [ -n &quot;$k&quot; ]; then b=&quot;-BuildType$k&quot;; else b=''; fi &amp;&amp;<br /> r=../src/svnrevision.h &amp;&amp; if [ -f &quot;$r&quot; ] &amp;&amp; [ &quot;$(hg status $r)&quot; != &quot;? $r&quot; ]; then r=$r; else<br /> r=src/hginfo.h; fi &amp;&amp; h=&quot;$(sed -n 's/.*#define HG.*_HASH.* &quot;\(.*\)&quot;.*/\1/p' $r)&quot; &amp;&amp;<br /> BACKUPECWOLF=&quot;../../$(hg cat -r $h ../src/version.h | sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p')\<br /> $(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\-\1/p' $r)\<br /> $(sed -n 's/.*#define HG_TIME &quot;\(.*\)&quot;.*/\-\1/p' $r)-$h$b&quot; &amp;&amp;<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp;<br /> cp -v ecwolf ecwolf.pk3 &quot;$BACKUPECWOLF&quot;/<br /> &lt;/pre&gt;<br /> <br /> Files are located at:<br /> <br /> /home/&lt;your username&gt;/ecwolf_build/&lt;your newly created directory&gt;<br /> <br /> == Updating ==<br /> When you wish to update ECWolf, copy and paste the following:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> hg pull ; hg update<br /> <br /> When the update finish, go to [[#Compiling]].<br /> <br /> If you received the error:<br /> <br /> '''pulling from &lt;nowiki&gt;https://bitbucket.org/Blzut3/ecwolf&lt;/nowiki&gt;'''<br /> <br /> '''abort: HTTP Error 404: Not Found'''<br /> <br /> edit ~/ecwolf_build/ecwolf/.hg/hgrc file and change the default path:<br /> [paths]<br /> default = &lt;nowiki&gt;https://bitbucket.org/Blzut3/ecwolf&lt;/nowiki&gt;<br /> <br /> to:<br /> [paths]<br /> default = &lt;nowiki&gt;https://bitbucket.org/ecwolf/ecwolf&lt;/nowiki&gt;<br /> <br /> == Installation ==<br /> * '''ecwolf''' = Stable version<br /> * '''ecwolf-alpha''' = Development version<br /> <br /> Commands beginning with &quot;sudo&quot; will require temporary superuser privileges.<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Create /usr/games/ecwolf and /usr/games/ecwolf-alpha directories:<br /> sudo mkdir -pv /usr/games/ecwolf /usr/games/ecwolf-alpha<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf/ or /usr/games/ecwolf-alpha/:<br /> &lt;pre&gt;<br /> cd ~/ecwolf_build/ecwolf/build &amp;&amp;<br /> r=../src/svnrevision.h &amp;&amp; if [ -f &quot;$r&quot; ] &amp;&amp; [ &quot;$(hg status $r)&quot; != &quot;? $r&quot; ]; then r=$r; else<br /> r=src/hginfo.h; fi &amp;&amp; h=&quot;$(sed -n 's/.*#define HG.*_HASH.* &quot;\(.*\)&quot;.*/\1/p' $r)&quot; &amp;&amp;<br /> t=&quot;$(hg id -tr $h)&quot; &amp;&amp; if [ &quot;$t&quot; = tip ] || [ -z &quot;$t&quot; ]; then d=-alpha; else d=''; fi &amp;&amp;<br /> sudo cp -v ecwolf ecwolf.pk3 /usr/games/ecwolf$d/<br /> &lt;/pre&gt;<br /> <br /> Create launch script:<br /> &lt;pre&gt;<br /> cd ~/ecwolf_build/ecwolf/build &amp;&amp;<br /> r=../src/svnrevision.h &amp;&amp; if [ -f &quot;$r&quot; ] &amp;&amp; [ &quot;$(hg status $r)&quot; != &quot;? $r&quot; ]; then r=$r; else<br /> r=src/hginfo.h; fi &amp;&amp; h=&quot;$(sed -n 's/.*#define HG.*_HASH.* &quot;\(.*\)&quot;.*/\1/p' $r)&quot; &amp;&amp;<br /> t=&quot;$(hg id -tr $h)&quot; &amp;&amp; if [ &quot;$t&quot; = tip ] || [ -z &quot;$t&quot; ]; then d=-alpha; else d=''; fi &amp;&amp;<br /> printf %s &quot;\<br /> #!/bin/sh<br /> exec /usr/games/ecwolf$d/ecwolf \&quot;\$@\&quot;<br /> &quot; &gt; ecwolf$d.sh &amp;&amp;<br /> chmod 755 ecwolf$d.sh &amp;&amp;<br /> sudo mv -v ecwolf$d.sh /usr/bin/ecwolf$d<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to run '''ecwolf''' or '''ecwolf-alpha''' from any user account.<br /> <br /> === Uninstallation ===<br /> Remove /usr/games/ecwolf directory and all its files:<br /> sudo rm -rfv /usr/games/ecwolf<br /> <br /> Remove ecwolf script:<br /> sudo rm -fv /usr/bin/ecwolf<br /> <br /> Remove /usr/games/ecwolf-alpha directory and all its files:<br /> sudo rm -rfv /usr/games/ecwolf-alpha<br /> <br /> Remove ecwolf-alpha script:<br /> sudo rm -fv /usr/bin/ecwolf-alpha<br /> <br /> == Developing ==<br /> This page has helped you compile ECWolf, 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.<br /> <br /> === Debugging ===<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> Maybe you have found a way to make ECWolf crash, and are interested in debugging it. First, you need to compile a debug build of ECWolf. Inside the build directory, invoke CMake to set up for compiling, but this time, the build type is set to Debug:<br /> cd ~/ecwolf_build/ecwolf/build<br /> cmake .. -DCMAKE_BUILD_TYPE=Debug<br /> Optionally, you may want to use some of the [[#Build options]].<br /> <br /> After CMake is done, run &quot;make&quot; or to speed up compilation, run &quot;make -j&lt;number&gt;&quot;, a recommended value for the &quot;-j&quot; option is the number of physical cores:<br /> make<br /> <br /> To run ECWolf under a debugger such as gdb, use the following command:<br /> gdb ecwolf<br /> <br /> Now gdb should have you in its own command prompt:<br /> (gdb)<br /> <br /> You probably want to log the output, so lets output to a file ecwolfdebug.log:<br /> (gdb) set logging on ecwolfdebug.log<br /> <br /> Now start ECWolf by typing in run, and pressing enter:<br /> (gdb) run<br /> <br /> Or put any command line parameters to ecwolf after run:<br /> (gdb) run &lt;command line parameters&gt;<br /> To see the available command line parameters for ECWolf, type &quot;run --help&quot; and press enter.<br /> <br /> If ECWolf 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:<br /> (gdb) backtrace<br /> All output will be copied into the ecwolfdebug.log, which can then be scrutinized later, or perhaps posted to the [https://bitbucket.org/ecwolf/ecwolf/issues Bug Tracker] for other developers to look at.<br /> <br /> To exit gdb's command prompt, type quit, q or press Ctrl-D:<br /> (gdb) quit<br /> If you want to free up space, run &quot;make clean&quot; to remove the files generated by the compilation.<br /> <br /> === Build options ===<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake .. -DGPL=ON<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake .. -DGPL=ON -DUSE_LIBTEXTSCREEN=ON<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake .. -DNO_GTK=ON<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake build types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake .. -DCMAKE_BUILD_TYPE=Debug<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake .. -DCMAKE_BUILD_TYPE=Release<br /> |-<br /> |RelWithDebInfo||Debug information, -O2 optimization. Useful for finding optimization bugs that only show up in Release.||cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=781 Compile ECWolf on Linux 2017-12-23T01:38:02Z <p>Skyrimguy: /* Build options */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Install dependencies ==<br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://maniacsvault.net/ecwolf/files/tools/dev/ SDL_mixer for ECWolf] (Standard [http://www.libsdl.org/projects/SDL_mixer/release-1.2.html SDL_mixer] 1.2 will also work, but features will be disabled.)<br /> * [https://www.libsdl.org/projects/SDL_net/release-1.2.html SDL_net] 1.2<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following as root/superuser:<br /> <br /> === Debian/Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install g++ make cmake libsdl1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev \<br /> mercurial zlib1g-dev libbz2-dev libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> dnf install gcc-c++ make cmake SDL-devel SDL_mixer-devel SDL_net-devel mercurial \<br /> zlib-devel bzip2-devel libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === openSUSE ===<br /> &lt;pre&gt;<br /> zypper install gcc-c++ make cmake libSDL-devel libSDL_mixer-devel libSDL_net-devel \<br /> mercurial zlib-devel libbz2-devel libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> a='' &amp;&amp; [ &quot;$(uname -m)&quot; = x86_64 ] &amp;&amp; a=64<br /> urpmi gcc-c++ make cmake lib${a}SDL-devel lib${a}SDL_mixer-devel \<br /> lib${a}SDL_net-devel mercurial lib${a}zlib-devel lib${a}bzip2-devel \<br /> lib${a}jpeg-devel lib${a}gtk+2.0-devel lib${a}cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed gcc make cmake sdl sdl_mixer sdl_net mercurial zlib bzip2 libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn sys-devel/gcc sys-devel/make dev-util/cmake media-libs/libsdl \<br /> media-libs/sdl-mixer media-libs/sdl-net dev-vcs/mercurial sys-libs/zlib \<br /> app-arch/bzip2 media-libs/libjpeg-turbo x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> a='' &amp;&amp; [ &quot;$(uname -m)&quot; = x86_64 ] &amp;&amp; a=64<br /> apt-get install gcc-c++ make cmake lib${a}SDL-devel lib${a}SDL_mixer-devel \<br /> lib${a}SDL_net-devel mercurial zlib1-devel lib${a}bzip2-devel lib${a}jpeg62-devel \<br /> lib${a}gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> === Solus ===<br /> &lt;pre&gt;<br /> sudo eopkg install g++ make cmake binutils glibc-devel pkg-config \<br /> sdl1-devel sdl1-mixer-devel sdl1-net-devel mercurial zlib-devel \<br /> bzip2-devel libjpeg-turbo-devel libgtk-2-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following sections as normal user.'''<br /> <br /> == Create ecwolf_build directory ==<br /> mkdir -pv ~/ecwolf_build<br /> <br /> == Download and prepare the source ==<br /> Use Mercurial to download the ECWolf source:<br /> cd ~/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> and create an out of tree build directory in the newly created ecwolf directory:<br /> mkdir -pv ecwolf/build<br /> <br /> == Compiling ==<br /> Inside the build directory, run CMake to generate a Makefile:<br /> cd ~/ecwolf_build/ecwolf/build<br /> cmake .. -DCMAKE_BUILD_TYPE=Release -DGPL=ON<br /> Assuming there were no errors, you should be able to run make to compile:<br /> make<br /> A development version of ECWolf will be compiled if you do not do [[#Latest stable version]].<br /> <br /> An ecwolf binary should be produced. To start ECWolf, the following command should work:<br /> ./ecwolf<br /> If ECWolf complains you do not have any base game data set up, make sure that you have your [[Game data]] files placed in the same directory as ECWolf, in ~/.config/ecwolf or $PROGDIR. Alternatively, you can edit ~/.config/ecwolf/ecwolf.cfg to add the path for your game data to BaseDataPaths.<br /> <br /> === Latest stable version ===<br /> Show the latest stable version:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> hg identify -r 'max(tagged())'<br /> <br /> If you want to compile the latest stable version, run:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> hg update -cr 'max(tagged())'<br /> and [[#Compiling|compile]].<br /> <br /> After compiling, [[#Backup|backing up]] and optionally [[#Installation|installing]] the latest stable version, run:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> hg update default<br /> <br /> == Backup ==<br /> If you want to backup ECWolf, do the following:<br /> <br /> Create and name a directory with the corresponding ECWolf version/revision, build type and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd ~/ecwolf_build/ecwolf/build &amp;&amp;<br /> if [ -f CMakeCache.txt ]; then<br /> k=&quot;$(sed -n 's/.*CMAKE_BUILD_TYPE:STRING=\(.*\)/\1/p' CMakeCache.txt)&quot;; else k=''; fi &amp;&amp;<br /> if [ -n &quot;$k&quot; ]; then b=&quot;-BuildType$k&quot;; else b=''; fi &amp;&amp;<br /> h=&quot;$(sed -n 's/.*#define HG_REVISION_HASH_STRING &quot;\(.*\)&quot;.*/\1/p' ../src/svnrevision.h)&quot; &amp;&amp;<br /> BACKUPECWOLF=&quot;../../$(hg cat -r $h ../src/version.h | sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p')\<br /> $(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\-r\1/p' ../src/svnrevision.h)-$h$b&quot; &amp;&amp;<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp;<br /> cp -v ecwolf ecwolf.pk3 &quot;$BACKUPECWOLF&quot;/<br /> &lt;/pre&gt;<br /> <br /> Files are located at:<br /> <br /> /home/&lt;your username&gt;/ecwolf_build/&lt;your newly created directory&gt;<br /> <br /> == Updating ==<br /> When you wish to update ECWolf, copy and paste the following:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> hg pull ; hg update<br /> <br /> When the update finish, go to [[#Compiling]].<br /> <br /> == Installation ==<br /> * '''ecwolf''' = Stable version<br /> * '''ecwolf-alpha''' = Development version<br /> <br /> Commands beginning with &quot;sudo&quot; will require temporary superuser privileges.<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Create /usr/games/ecwolf and /usr/games/ecwolf-alpha directories:<br /> sudo mkdir -pv /usr/games/ecwolf /usr/games/ecwolf-alpha<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf/ or /usr/games/ecwolf-alpha/:<br /> &lt;pre&gt;<br /> cd ~/ecwolf_build/ecwolf/build &amp;&amp;<br /> h=&quot;$(sed -n 's/.*#define HG_REVISION_HASH_STRING &quot;\(.*\)&quot;.*/\1/p' ../src/svnrevision.h)&quot; &amp;&amp;<br /> t=&quot;$(hg id -tr $h)&quot; &amp;&amp;<br /> if [ &quot;$t&quot; = tip ] || [ -z &quot;$t&quot; ]; then d=-alpha; else d=''; fi &amp;&amp;<br /> sudo cp -v ecwolf ecwolf.pk3 /usr/games/ecwolf$d/<br /> &lt;/pre&gt;<br /> <br /> Create launch script:<br /> &lt;pre&gt;<br /> cd ~/ecwolf_build/ecwolf/build &amp;&amp;<br /> h=&quot;$(sed -n 's/.*#define HG_REVISION_HASH_STRING &quot;\(.*\)&quot;.*/\1/p' ../src/svnrevision.h)&quot; &amp;&amp;<br /> t=&quot;$(hg id -tr $h)&quot; &amp;&amp;<br /> if [ &quot;$t&quot; = tip ] || [ -z &quot;$t&quot; ]; then d=-alpha; else d=''; fi &amp;&amp;<br /> printf %s &quot;\<br /> #!/bin/sh<br /> exec /usr/games/ecwolf$d/ecwolf \&quot;\$@\&quot;<br /> &quot; &gt; ecwolf$d.sh &amp;&amp;<br /> chmod 755 ecwolf$d.sh &amp;&amp;<br /> sudo mv -v ecwolf$d.sh /usr/bin/ecwolf$d<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to run '''ecwolf''' or '''ecwolf-alpha''' from any user account.<br /> <br /> === Uninstallation ===<br /> Remove /usr/games/ecwolf directory and all its files:<br /> sudo rm -rfv /usr/games/ecwolf<br /> <br /> Remove ecwolf script:<br /> sudo rm -fv /usr/bin/ecwolf<br /> <br /> Remove /usr/games/ecwolf-alpha directory and all its files:<br /> sudo rm -rfv /usr/games/ecwolf-alpha<br /> <br /> Remove ecwolf-alpha script:<br /> sudo rm -fv /usr/bin/ecwolf-alpha<br /> <br /> == Developing ==<br /> This page has helped you compile ECWolf, 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.<br /> <br /> === Debugging ===<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> Maybe you have found a way to make ECWolf crash, and are interested in debugging it. First, you need to compile a debug build of ECWolf. Inside the build directory, invoke CMake to set up for compiling, but this time, the build type is set to Debug:<br /> cd ~/ecwolf_build/ecwolf/build<br /> cmake .. -DCMAKE_BUILD_TYPE=Debug<br /> Optionally, you may want to use some of the [[#Build options]].<br /> <br /> After CMake is done, run &quot;make&quot; or to speed up compilation, run &quot;make -j&lt;number&gt;&quot;, a recommended value for the &quot;-j&quot; option is the number of physical cores:<br /> make<br /> <br /> To run ECWolf under a debugger such as gdb, use the following command:<br /> gdb ecwolf<br /> <br /> Now gdb should have you in its own command prompt:<br /> (gdb)<br /> <br /> You probably want to log the output, so lets output to a file ecwolfdebug.log:<br /> (gdb) set logging on ecwolfdebug.log<br /> <br /> Now start ECWolf by typing in run, and pressing enter:<br /> (gdb) run<br /> <br /> Or put any command line parameters to ecwolf after run:<br /> (gdb) run &lt;command line parameters&gt;<br /> To see the available command line parameters for ECWolf, type &quot;run --help&quot; and press enter.<br /> <br /> If ECWolf 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:<br /> (gdb) backtrace<br /> All output will be copied into the ecwolfdebug.log, which can then be scrutinized later, or perhaps posted to the [https://bitbucket.org/Blzut3/ecwolf/issues Bug Tracker] for other developers to look at.<br /> <br /> To exit gdb's command prompt, type quit, q or press Ctrl-D:<br /> (gdb) quit<br /> If you want to free up space, run &quot;make clean&quot; to remove the files generated by the compilation.<br /> <br /> === Build options ===<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake .. -DGPL=ON<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake .. -DGPL=ON -DUSE_LIBTEXTSCREEN=ON<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake .. -DNO_GTK=ON<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake build types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake .. -DCMAKE_BUILD_TYPE=Debug<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake .. -DCMAKE_BUILD_TYPE=Release<br /> |-<br /> |RelWithDebInfo||Debug information, -O2 optimization. Useful for finding optimization bugs that only show up in Release.||cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=780 Compile ECWolf on Linux 2017-12-23T00:41:06Z <p>Skyrimguy: </p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Install dependencies ==<br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://maniacsvault.net/ecwolf/files/tools/dev/ SDL_mixer for ECWolf] (Standard [http://www.libsdl.org/projects/SDL_mixer/release-1.2.html SDL_mixer] 1.2 will also work, but features will be disabled.)<br /> * [https://www.libsdl.org/projects/SDL_net/release-1.2.html SDL_net] 1.2<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following as root/superuser:<br /> <br /> === Debian/Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install g++ make cmake libsdl1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev \<br /> mercurial zlib1g-dev libbz2-dev libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> dnf install gcc-c++ make cmake SDL-devel SDL_mixer-devel SDL_net-devel mercurial \<br /> zlib-devel bzip2-devel libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === openSUSE ===<br /> &lt;pre&gt;<br /> zypper install gcc-c++ make cmake libSDL-devel libSDL_mixer-devel libSDL_net-devel \<br /> mercurial zlib-devel libbz2-devel libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> a='' &amp;&amp; [ &quot;$(uname -m)&quot; = x86_64 ] &amp;&amp; a=64<br /> urpmi gcc-c++ make cmake lib${a}SDL-devel lib${a}SDL_mixer-devel \<br /> lib${a}SDL_net-devel mercurial lib${a}zlib-devel lib${a}bzip2-devel \<br /> lib${a}jpeg-devel lib${a}gtk+2.0-devel lib${a}cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed gcc make cmake sdl sdl_mixer sdl_net mercurial zlib bzip2 libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn sys-devel/gcc sys-devel/make dev-util/cmake media-libs/libsdl \<br /> media-libs/sdl-mixer media-libs/sdl-net dev-vcs/mercurial sys-libs/zlib \<br /> app-arch/bzip2 media-libs/libjpeg-turbo x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> a='' &amp;&amp; [ &quot;$(uname -m)&quot; = x86_64 ] &amp;&amp; a=64<br /> apt-get install gcc-c++ make cmake lib${a}SDL-devel lib${a}SDL_mixer-devel \<br /> lib${a}SDL_net-devel mercurial zlib1-devel lib${a}bzip2-devel lib${a}jpeg62-devel \<br /> lib${a}gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> === Solus ===<br /> &lt;pre&gt;<br /> sudo eopkg install g++ make cmake binutils glibc-devel pkg-config \<br /> sdl1-devel sdl1-mixer-devel sdl1-net-devel mercurial zlib-devel \<br /> bzip2-devel libjpeg-turbo-devel libgtk-2-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following sections as normal user.'''<br /> <br /> == Create ecwolf_build directory ==<br /> mkdir -pv ~/ecwolf_build<br /> <br /> == Download and prepare the source ==<br /> Use Mercurial to download the ECWolf source:<br /> cd ~/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> and create an out of tree build directory in the newly created ecwolf directory:<br /> mkdir -pv ecwolf/build<br /> <br /> == Compiling ==<br /> Inside the build directory, run CMake to generate a Makefile:<br /> cd ~/ecwolf_build/ecwolf/build<br /> cmake .. -DCMAKE_BUILD_TYPE=Release -DGPL=ON<br /> Assuming there were no errors, you should be able to run make to compile:<br /> make<br /> A development version of ECWolf will be compiled if you do not do [[#Latest stable version]].<br /> <br /> An ecwolf binary should be produced. To start ECWolf, the following command should work:<br /> ./ecwolf<br /> If ECWolf complains you do not have any base game data set up, make sure that you have your [[Game data]] files placed in the same directory as ECWolf, in ~/.config/ecwolf or $PROGDIR. Alternatively, you can edit ~/.config/ecwolf/ecwolf.cfg to add the path for your game data to BaseDataPaths.<br /> <br /> === Latest stable version ===<br /> Show the latest stable version:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> hg identify -r 'max(tagged())'<br /> <br /> If you want to compile the latest stable version, run:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> hg update -cr 'max(tagged())'<br /> and [[#Compiling|compile]].<br /> <br /> After compiling, [[#Backup|backing up]] and optionally [[#Installation|installing]] the latest stable version, run:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> hg update default<br /> <br /> == Backup ==<br /> If you want to backup ECWolf, do the following:<br /> <br /> Create and name a directory with the corresponding ECWolf version/revision, build type and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd ~/ecwolf_build/ecwolf/build &amp;&amp;<br /> if [ -f CMakeCache.txt ]; then<br /> k=&quot;$(sed -n 's/.*CMAKE_BUILD_TYPE:STRING=\(.*\)/\1/p' CMakeCache.txt)&quot;; else k=''; fi &amp;&amp;<br /> if [ -n &quot;$k&quot; ]; then b=&quot;-BuildType$k&quot;; else b=''; fi &amp;&amp;<br /> h=&quot;$(sed -n 's/.*#define HG_REVISION_HASH_STRING &quot;\(.*\)&quot;.*/\1/p' ../src/svnrevision.h)&quot; &amp;&amp;<br /> BACKUPECWOLF=&quot;../../$(hg cat -r $h ../src/version.h | sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p')\<br /> $(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\-r\1/p' ../src/svnrevision.h)-$h$b&quot; &amp;&amp;<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp;<br /> cp -v ecwolf ecwolf.pk3 &quot;$BACKUPECWOLF&quot;/<br /> &lt;/pre&gt;<br /> <br /> Files are located at:<br /> <br /> /home/&lt;your username&gt;/ecwolf_build/&lt;your newly created directory&gt;<br /> <br /> == Updating ==<br /> When you wish to update ECWolf, copy and paste the following:<br /> cd ~/ecwolf_build/ecwolf &amp;&amp;<br /> hg pull ; hg update<br /> <br /> When the update finish, go to [[#Compiling]].<br /> <br /> == Installation ==<br /> * '''ecwolf''' = Stable version<br /> * '''ecwolf-alpha''' = Development version<br /> <br /> Commands beginning with &quot;sudo&quot; will require temporary superuser privileges.<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Create /usr/games/ecwolf and /usr/games/ecwolf-alpha directories:<br /> sudo mkdir -pv /usr/games/ecwolf /usr/games/ecwolf-alpha<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf/ or /usr/games/ecwolf-alpha/:<br /> &lt;pre&gt;<br /> cd ~/ecwolf_build/ecwolf/build &amp;&amp;<br /> h=&quot;$(sed -n 's/.*#define HG_REVISION_HASH_STRING &quot;\(.*\)&quot;.*/\1/p' ../src/svnrevision.h)&quot; &amp;&amp;<br /> t=&quot;$(hg id -tr $h)&quot; &amp;&amp;<br /> if [ &quot;$t&quot; = tip ] || [ -z &quot;$t&quot; ]; then d=-alpha; else d=''; fi &amp;&amp;<br /> sudo cp -v ecwolf ecwolf.pk3 /usr/games/ecwolf$d/<br /> &lt;/pre&gt;<br /> <br /> Create launch script:<br /> &lt;pre&gt;<br /> cd ~/ecwolf_build/ecwolf/build &amp;&amp;<br /> h=&quot;$(sed -n 's/.*#define HG_REVISION_HASH_STRING &quot;\(.*\)&quot;.*/\1/p' ../src/svnrevision.h)&quot; &amp;&amp;<br /> t=&quot;$(hg id -tr $h)&quot; &amp;&amp;<br /> if [ &quot;$t&quot; = tip ] || [ -z &quot;$t&quot; ]; then d=-alpha; else d=''; fi &amp;&amp;<br /> printf %s &quot;\<br /> #!/bin/sh<br /> exec /usr/games/ecwolf$d/ecwolf \&quot;\$@\&quot;<br /> &quot; &gt; ecwolf$d.sh &amp;&amp;<br /> chmod 755 ecwolf$d.sh &amp;&amp;<br /> sudo mv -v ecwolf$d.sh /usr/bin/ecwolf$d<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to run '''ecwolf''' or '''ecwolf-alpha''' from any user account.<br /> <br /> === Uninstallation ===<br /> Remove /usr/games/ecwolf directory and all its files:<br /> sudo rm -rfv /usr/games/ecwolf<br /> <br /> Remove ecwolf script:<br /> sudo rm -fv /usr/bin/ecwolf<br /> <br /> Remove /usr/games/ecwolf-alpha directory and all its files:<br /> sudo rm -rfv /usr/games/ecwolf-alpha<br /> <br /> Remove ecwolf-alpha script:<br /> sudo rm -fv /usr/bin/ecwolf-alpha<br /> <br /> == Developing ==<br /> This page has helped you compile ECWolf, 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.<br /> <br /> === Debugging ===<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> Maybe you have found a way to make ECWolf crash, and are interested in debugging it. First, you need to compile a debug build of ECWolf. Inside the build directory, invoke CMake to set up for compiling, but this time, the build type is set to Debug:<br /> cd ~/ecwolf_build/ecwolf/build<br /> cmake .. -DCMAKE_BUILD_TYPE=Debug<br /> Optionally, you may want to use some of the [[#Build options]].<br /> <br /> After CMake is done, run &quot;make&quot; or to speed up compilation, run &quot;make -j&lt;number&gt;&quot;, a recommended value for the &quot;-j&quot; option is the number of physical cores:<br /> make<br /> <br /> To run ECWolf under a debugger such as gdb, use the following command:<br /> gdb ecwolf<br /> <br /> Now gdb should have you in its own command prompt:<br /> (gdb)<br /> <br /> You probably want to log the output, so lets output to a file ecwolfdebug.log:<br /> (gdb) set logging on ecwolfdebug.log<br /> <br /> Now start ECWolf by typing in run, and pressing enter:<br /> (gdb) run<br /> <br /> Or put any command line parameters to ecwolf after run:<br /> (gdb) run &lt;command line parameters&gt;<br /> To see the available command line parameters for ECWolf, type &quot;run --help&quot; and press enter.<br /> <br /> If ECWolf 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:<br /> (gdb) backtrace<br /> All output will be copied into the ecwolfdebug.log, which can then be scrutinized later, or perhaps posted to the [https://bitbucket.org/Blzut3/ecwolf/issues Bug Tracker] for other developers to look at.<br /> <br /> To exit gdb's command prompt, type quit, q or press Ctrl-D:<br /> (gdb) quit<br /> If you want to free up space, run &quot;make clean&quot; to remove the files generated by the compilation.<br /> <br /> === Build options ===<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake .. -DGPL=ON<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake .. -DGPL=ON -DUSE_LIBTEXTSCREEN=ON<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake .. -DNO_GTK=ON<br /> |-<br /> |CMAKE_C_COMPILER||Set path for C compiler.||cmake .. -DCMAKE_C_COMPILER=/path/to/compiler/gcc<br /> |-<br /> |CMAKE_CXX_COMPILER||Set path for C++ compiler.||cmake .. -DCMAKE_CXX_COMPILER=/path/to/compiler/g++<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake build types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake .. -DCMAKE_BUILD_TYPE=Debug<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake .. -DCMAKE_BUILD_TYPE=Release<br /> |-<br /> |RelWithDebInfo||Debug information, -O2 optimization. Useful for finding optimization bugs that only show up in Release.||cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=767 Compile ECWolf on Linux 2017-01-09T21:49:56Z <p>Skyrimguy: /* Fedora */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://maniacsvault.net/ecwolf/files/tools/dev/ SDL_mixer for ECWolf] (Standard [http://www.libsdl.org/projects/SDL_mixer/release-1.2.html SDL_mixer] 1.2 will also work, but features will be disabled.)<br /> * [https://www.libsdl.org/projects/SDL_net/release-1.2.html SDL_net] 1.2<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as root/superuser:<br /> <br /> === Debian/Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> dnf install cmake gcc-c++ SDL-devel SDL_mixer-devel SDL_net-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === openSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel libSDL_net-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> a='' &amp;&amp; [ &quot;$(uname -m)&quot; = x86_64 ] &amp;&amp; a=64<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel lib&quot;$a&quot;SDL_net-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer sdl_net zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer media-libs/sdl-net \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> a='' &amp;&amp; [ &quot;$(uname -m)&quot; = x86_64 ] &amp;&amp; a=64<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel lib&quot;$a&quot;SDL_net-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv &quot;$HOME&quot;/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd &quot;$HOME&quot;/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced. To start ECWolf, the following command should work:<br /> ./ecwolf<br /> If ECWolf complains you do not have any base game data set up, make sure that you have your [[Game data]] files placed in the same directory as ECWolf, in ~/.config/ecwolf or $PROGDIR. Alternatively, you can edit ~/.config/ecwolf/ecwolf.cfg to add the path for your game data to BaseDataPaths.<br /> <br /> === Current release version ===<br /> Show the current release version:<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg identify -r 'max(tagged())'<br /> <br /> If you want to compile the current release version, run the following:<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr 'max(tagged())'<br /> and [[#Compiling|compile]].<br /> <br /> After compiling, [[#Backup|backing up]] and optionally [[#Installation|installing]] the current release version, run the following:<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ==<br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf/src &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' version.h)\<br /> $(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\-r\1/p' svnrevision.h)&quot; &amp;&amp; \<br /> cd ../.. &amp;&amp; mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup (Optional) ===<br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +'%Y%m%d-%H%M')&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup&quot; or &quot;Backup (Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/&lt;your newly created directory&gt;'''<br /> <br /> == Updating ==<br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling]].<br /> <br /> == Installation ==<br /> * '''ecwolf''' = Release version<br /> * '''ecwolf-alpha''' = Non-release version<br /> <br /> '''The following steps have commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf and /usr/games/ecwolf-alpha directories:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/{ecwolf,ecwolf-alpha}<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf or /usr/games/ecwolf-alpha:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> t=&quot;$(hg id -t)&quot; &amp;&amp; \<br /> d='' &amp;&amp; [ &quot;$t&quot; = tip ] || [ -z &quot;$t&quot; ] &amp;&amp; d=-alpha ; \<br /> sudo cp -v build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf&quot;$d&quot;<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf or ecwolf-alpha script, add executable permission and move it to /usr/bin:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> t=&quot;$(hg id -t)&quot; &amp;&amp; \<br /> d='' &amp;&amp; [ &quot;$t&quot; = tip ] || [ -z &quot;$t&quot; ] &amp;&amp; d=-alpha ; \<br /> cd /tmp &amp;&amp; \<br /> echo '#!/bin/sh' &gt; ecwolf&quot;$d&quot; &amp;&amp; \<br /> echo &gt;&gt; ecwolf&quot;$d&quot; &amp;&amp; \<br /> echo &quot;exec /usr/games/ecwolf&quot;$d&quot;/ecwolf \&quot;\$@\&quot;&quot; &gt;&gt; ecwolf&quot;$d&quot; &amp;&amp; \<br /> chmod 755 ecwolf&quot;$d&quot; &amp;&amp; \<br /> sudo mv -v ecwolf&quot;$d&quot; /usr/bin<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' or '''ecwolf-alpha''' from any user account.<br /> <br /> === Uninstallation ===<br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> sudo rm -rfv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> sudo rm -fv /usr/bin/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove /usr/games/ecwolf-alpha directory and all its files:<br /> &lt;pre&gt;<br /> sudo rm -rfv /usr/games/ecwolf-alpha<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf-alpha script:<br /> &lt;pre&gt;<br /> sudo rm -fv /usr/bin/ecwolf-alpha<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a backtrace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a backtrace.<br /> gdb ecwolf<br /> Now gdb should have you in its own command prompt. You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> (gdb) set logging on ecwolfdebug.log<br /> Use &quot;run&quot; to start ecwolf.<br /> (gdb) run<br /> To start and pass command line parameters to ecwolf.<br /> (gdb) run &lt;command line parameters&gt;<br /> Use &quot;bt&quot; to get the backtrace after a crash.<br /> (gdb) bt<br /> All output will be copied into the ecwolfdebug.log, which can then be scrutinized later, or perhaps posted to the [https://bitbucket.org/Blzut3/ecwolf/issues Bug Tracker] for other developers to look at.<br /> <br /> To exit gdb's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake -DGPL=ON -DUSE_LIBTEXTSCREEN=ON ..<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake -DNO_GTK=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=731 Compile ECWolf on Linux 2016-11-28T21:42:09Z <p>Skyrimguy: </p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://maniacsvault.net/ecwolf/files/tools/dev/ SDL_mixer for ECWolf] (Standard [http://www.libsdl.org/projects/SDL_mixer/release-1.2.html SDL_mixer] 1.2 will also work, but features will be disabled.)<br /> * [https://www.libsdl.org/projects/SDL_net/release-1.2.html SDL_net] 1.2<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as root/superuser:<br /> <br /> === Debian/Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel SDL_net-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === openSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel libSDL_net-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> a='' &amp;&amp; [ &quot;$(uname -m)&quot; = x86_64 ] &amp;&amp; a=64<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel lib&quot;$a&quot;SDL_net-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer sdl_net zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer media-libs/sdl-net \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> a='' &amp;&amp; [ &quot;$(uname -m)&quot; = x86_64 ] &amp;&amp; a=64<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel lib&quot;$a&quot;SDL_net-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv &quot;$HOME&quot;/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd &quot;$HOME&quot;/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced. To start ECWolf, the following command should work:<br /> ./ecwolf<br /> If ECWolf complains you do not have any base game data set up, make sure that you have your [[Game data]] files placed in the same directory as ECWolf, in ~/.config/ecwolf or $PROGDIR. Alternatively, you can edit ~/.config/ecwolf/ecwolf.cfg to add the path for your game data to BaseDataPaths.<br /> <br /> === Current release version ===<br /> Show the current release version:<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg identify -r 'max(tagged())'<br /> <br /> If you want to compile the current release version, run the following:<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr 'max(tagged())'<br /> and [[#Compiling|compile]].<br /> <br /> After compiling, [[#Backup|backing up]] and optionally [[#Installation|installing]] the current release version, run the following:<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ==<br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf/src &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' version.h)\<br /> $(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\-r\1/p' svnrevision.h)&quot; &amp;&amp; \<br /> cd ../.. &amp;&amp; mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup (Optional) ===<br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +'%Y%m%d-%H%M')&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup&quot; or &quot;Backup (Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/&lt;your newly created directory&gt;'''<br /> <br /> == Updating ==<br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling]].<br /> <br /> == Installation ==<br /> * '''ecwolf''' = Release version<br /> * '''ecwolf-alpha''' = Non-release version<br /> <br /> '''The following steps have commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf and /usr/games/ecwolf-alpha directories:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/{ecwolf,ecwolf-alpha}<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf or /usr/games/ecwolf-alpha:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> t=&quot;$(hg id -t)&quot; &amp;&amp; \<br /> d='' &amp;&amp; [ &quot;$t&quot; = tip ] || [ -z &quot;$t&quot; ] &amp;&amp; d=-alpha ; \<br /> sudo cp -v build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf&quot;$d&quot;<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf or ecwolf-alpha script, add executable permission and move it to /usr/bin:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> t=&quot;$(hg id -t)&quot; &amp;&amp; \<br /> d='' &amp;&amp; [ &quot;$t&quot; = tip ] || [ -z &quot;$t&quot; ] &amp;&amp; d=-alpha ; \<br /> cd /tmp &amp;&amp; \<br /> echo '#!/bin/sh' &gt; ecwolf&quot;$d&quot; &amp;&amp; \<br /> echo &gt;&gt; ecwolf&quot;$d&quot; &amp;&amp; \<br /> echo &quot;exec /usr/games/ecwolf&quot;$d&quot;/ecwolf \&quot;\$@\&quot;&quot; &gt;&gt; ecwolf&quot;$d&quot; &amp;&amp; \<br /> chmod 755 ecwolf&quot;$d&quot; &amp;&amp; \<br /> sudo mv -v ecwolf&quot;$d&quot; /usr/bin<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' or '''ecwolf-alpha''' from any user account.<br /> <br /> === Uninstallation ===<br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> sudo rm -rfv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> sudo rm -fv /usr/bin/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove /usr/games/ecwolf-alpha directory and all its files:<br /> &lt;pre&gt;<br /> sudo rm -rfv /usr/games/ecwolf-alpha<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf-alpha script:<br /> &lt;pre&gt;<br /> sudo rm -fv /usr/bin/ecwolf-alpha<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a backtrace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a backtrace.<br /> gdb ecwolf<br /> Now gdb should have you in its own command prompt. You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> (gdb) set logging on ecwolfdebug.log<br /> Use &quot;run&quot; to start ecwolf.<br /> (gdb) run<br /> To start and pass command line parameters to ecwolf.<br /> (gdb) run &lt;command line parameters&gt;<br /> Use &quot;bt&quot; to get the backtrace after a crash.<br /> (gdb) bt<br /> All output will be copied into the ecwolfdebug.log, which can then be scrutinized later, or perhaps posted to the [https://bitbucket.org/Blzut3/ecwolf/issues Bug Tracker] for other developers to look at.<br /> <br /> To exit gdb's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake -DGPL=ON -DUSE_LIBTEXTSCREEN=ON ..<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake -DNO_GTK=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=728 Compile ECWolf on Linux 2016-09-30T12:51:08Z <p>Skyrimguy: /* Dependencies */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://maniacsvault.net/ecwolf/files/tools/dev/ SDL_mixer for ECWolf] (Standard [http://www.libsdl.org/projects/SDL_mixer/release-1.2.html SDL_mixer] 1.2 will also work, but features will be disabled.)<br /> * [https://www.libsdl.org/projects/SDL_net/release-1.2.html SDL_net] 1.2<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as root/superuser:<br /> <br /> === Debian/Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel SDL_net-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === openSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel libSDL_net-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel lib&quot;$a&quot;SDL_net-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer sdl_net zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer media-libs/sdl-net \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel lib&quot;$a&quot;SDL_net-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv &quot;$HOME&quot;/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd &quot;$HOME&quot;/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced. To start ECWolf, the following command should work:<br /> ./ecwolf<br /> If ECWolf complains you do not have any base game data set up, make sure that you have your [[Game data]] files placed in the same directory as ECWolf, in ~/.config/ecwolf or $PROGDIR. Alternatively, you can edit ~/.config/ecwolf/ecwolf.cfg to add the path for your game data to BaseDataPaths.<br /> <br /> === Current release version ===<br /> Show the current release version:<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg identify -r 'max(tagged())'<br /> <br /> If you want to compile the current release version, run the following:<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr 'max(tagged())'<br /> and [[#Compiling|compile]].<br /> <br /> After compiling, [[#Backup|backing up]] and optionally [[#Installation|installing]] the current release version, run the following:<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ==<br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf/src &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' version.h)\<br /> $(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\-r\1/p' svnrevision.h)&quot; &amp;&amp; \<br /> cd ../.. &amp;&amp; mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup (Optional) ===<br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +'%Y%m%d-%H%M')&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup&quot; or &quot;Backup (Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/&lt;your newly created directory&gt;'''<br /> <br /> == Updating ==<br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling]].<br /> <br /> == Installation ==<br /> * '''ecwolf''' = Release version<br /> * '''ecwolf-alpha''' = Non-release version<br /> <br /> '''The following steps have commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf and /usr/games/ecwolf-alpha directories:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/{ecwolf,ecwolf-alpha}<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf or /usr/games/ecwolf-alpha:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> t=&quot;$(hg id -t)&quot; &amp;&amp; \<br /> if [ &quot;$t&quot; = &quot;tip&quot; ] || [ -z &quot;$t&quot; ]; then<br /> d=&quot;-alpha&quot;<br /> else<br /> d=&quot;&quot;<br /> fi &amp;&amp; \<br /> sudo cp -v build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf&quot;$d&quot;<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf or ecwolf-alpha script, add executable permission and move it to /usr/bin:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> t=&quot;$(hg id -t)&quot; &amp;&amp; \<br /> if [ &quot;$t&quot; = &quot;tip&quot; ] || [ -z &quot;$t&quot; ]; then<br /> d=&quot;-alpha&quot;<br /> else<br /> d=&quot;&quot;<br /> fi &amp;&amp; cd /tmp &amp;&amp; \<br /> echo '#!/bin/sh' &gt; ecwolf&quot;$d&quot; &amp;&amp; \<br /> echo &gt;&gt; ecwolf&quot;$d&quot; &amp;&amp; \<br /> echo &quot;exec /usr/games/ecwolf&quot;$d&quot;/ecwolf \&quot;\$@\&quot;&quot; &gt;&gt; ecwolf&quot;$d&quot; &amp;&amp; \<br /> chmod 755 ecwolf&quot;$d&quot; &amp;&amp; \<br /> sudo mv -v ecwolf&quot;$d&quot; /usr/bin<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' or '''ecwolf-alpha''' from any user account.<br /> <br /> === Uninstallation ===<br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove /usr/games/ecwolf-alpha directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf-alpha<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf-alpha script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf-alpha<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a backtrace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a backtrace.<br /> gdb ecwolf<br /> Now gdb should have you in its own command prompt. You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> (gdb) set logging on ecwolfdebug.log<br /> Use &quot;run&quot; to start ecwolf.<br /> (gdb) run<br /> To start and pass command line parameters to ecwolf.<br /> (gdb) run &lt;command line parameters&gt;<br /> Use &quot;bt&quot; to get the backtrace after a crash.<br /> (gdb) bt<br /> All output will be copied into the ecwolfdebug.log, which can then be scrutinized later, or perhaps posted to the [https://bitbucket.org/Blzut3/ecwolf/issues Bug Tracker] for other developers to look at.<br /> <br /> To exit gdb's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake -DGPL=ON -DUSE_LIBTEXTSCREEN=ON ..<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake -DNO_GTK=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=727 Compile ECWolf on Linux 2016-09-24T18:53:56Z <p>Skyrimguy: /* Updating */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://maniacsvault.net/ecwolf/files/tools/dev/ SDL_mixer for ECWolf] (Standard [http://www.libsdl.org/projects/SDL_mixer/release-1.2.html SDL_mixer] 1.2 will also work, but features will be disabled.)<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as root/superuser:<br /> <br /> === Debian/Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === openSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv &quot;$HOME&quot;/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd &quot;$HOME&quot;/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced. To start ECWolf, the following command should work:<br /> ./ecwolf<br /> If ECWolf complains you do not have any base game data set up, make sure that you have your [[Game data]] files placed in the same directory as ECWolf, in ~/.config/ecwolf or $PROGDIR. Alternatively, you can edit ~/.config/ecwolf/ecwolf.cfg to add the path for your game data to BaseDataPaths.<br /> <br /> === Current release version ===<br /> Show the current release version:<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg identify -r 'max(tagged())'<br /> <br /> If you want to compile the current release version, run the following:<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr 'max(tagged())'<br /> and [[#Compiling|compile]].<br /> <br /> After compiling, [[#Backup|backing up]] and optionally [[#Installation|installing]] the current release version, run the following:<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ==<br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf/src &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' version.h)\<br /> $(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\-r\1/p' svnrevision.h)&quot; &amp;&amp; \<br /> cd ../.. &amp;&amp; mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup (Optional) ===<br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +'%Y%m%d-%H%M')&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup&quot; or &quot;Backup (Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/&lt;your newly created directory&gt;'''<br /> <br /> == Updating ==<br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling]].<br /> <br /> == Installation ==<br /> * '''ecwolf''' = Release version<br /> * '''ecwolf-alpha''' = Non-release version<br /> <br /> '''The following steps have commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf and /usr/games/ecwolf-alpha directories:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/{ecwolf,ecwolf-alpha}<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf or /usr/games/ecwolf-alpha:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> t=&quot;$(hg id -t)&quot; &amp;&amp; \<br /> if [ &quot;$t&quot; = &quot;tip&quot; ] || [ -z &quot;$t&quot; ]; then<br /> d=&quot;-alpha&quot;<br /> else<br /> d=&quot;&quot;<br /> fi &amp;&amp; \<br /> sudo cp -v build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf&quot;$d&quot;<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf or ecwolf-alpha script, add executable permission and move it to /usr/bin:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> t=&quot;$(hg id -t)&quot; &amp;&amp; \<br /> if [ &quot;$t&quot; = &quot;tip&quot; ] || [ -z &quot;$t&quot; ]; then<br /> d=&quot;-alpha&quot;<br /> else<br /> d=&quot;&quot;<br /> fi &amp;&amp; cd /tmp &amp;&amp; \<br /> echo '#!/bin/sh' &gt; ecwolf&quot;$d&quot; &amp;&amp; \<br /> echo &gt;&gt; ecwolf&quot;$d&quot; &amp;&amp; \<br /> echo &quot;exec /usr/games/ecwolf&quot;$d&quot;/ecwolf \&quot;\$@\&quot;&quot; &gt;&gt; ecwolf&quot;$d&quot; &amp;&amp; \<br /> chmod 755 ecwolf&quot;$d&quot; &amp;&amp; \<br /> sudo mv -v ecwolf&quot;$d&quot; /usr/bin<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' or '''ecwolf-alpha''' from any user account.<br /> <br /> === Uninstallation ===<br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove /usr/games/ecwolf-alpha directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf-alpha<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf-alpha script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf-alpha<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a backtrace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a backtrace.<br /> gdb ecwolf<br /> Now gdb should have you in its own command prompt. You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> (gdb) set logging on ecwolfdebug.log<br /> Use &quot;run&quot; to start ecwolf.<br /> (gdb) run<br /> To start and pass command line parameters to ecwolf.<br /> (gdb) run &lt;command line parameters&gt;<br /> Use &quot;bt&quot; to get the backtrace after a crash.<br /> (gdb) bt<br /> All output will be copied into the ecwolfdebug.log, which can then be scrutinized later, or perhaps posted to the [https://bitbucket.org/Blzut3/ecwolf/issues Bug Tracker] for other developers to look at.<br /> <br /> To exit gdb's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake -DGPL=ON -DUSE_LIBTEXTSCREEN=ON ..<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake -DNO_GTK=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=726 Compile ECWolf on Linux 2016-09-23T23:03:37Z <p>Skyrimguy: </p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://maniacsvault.net/ecwolf/files/tools/dev/ SDL_mixer for ECWolf] (Standard [http://www.libsdl.org/projects/SDL_mixer/release-1.2.html SDL_mixer] 1.2 will also work, but features will be disabled.)<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as root/superuser:<br /> <br /> === Debian/Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === openSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv &quot;$HOME&quot;/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd &quot;$HOME&quot;/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced. To start ECWolf, the following command should work:<br /> ./ecwolf<br /> If ECWolf complains you do not have any base game data set up, make sure that you have your [[Game data]] files placed in the same directory as ECWolf, in ~/.config/ecwolf or $PROGDIR. Alternatively, you can edit ~/.config/ecwolf/ecwolf.cfg to add the path for your game data to BaseDataPaths.<br /> <br /> === Current release version ===<br /> Show the current release version:<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg identify -r 'max(tagged())'<br /> <br /> If you want to compile the current release version, run the following:<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr 'max(tagged())'<br /> and [[#Compiling|compile]].<br /> <br /> After compiling, [[#Backup|backing up]] and optionally [[#Installation|installing]] the current release version, run the following:<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ==<br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf/src &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' version.h)\<br /> $(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\-r\1/p' svnrevision.h)&quot; &amp;&amp; \<br /> cd ../.. &amp;&amp; mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup (Optional) ===<br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +'%Y%m%d-%H%M')&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup&quot; or &quot;Backup (Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/&lt;your newly created directory&gt;'''<br /> <br /> == Updating ==<br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Installation ==<br /> * '''ecwolf''' = Release version<br /> * '''ecwolf-alpha''' = Non-release version<br /> <br /> '''The following steps have commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf and /usr/games/ecwolf-alpha directories:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/{ecwolf,ecwolf-alpha}<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf or /usr/games/ecwolf-alpha:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> t=&quot;$(hg id -t)&quot; &amp;&amp; \<br /> if [ &quot;$t&quot; = &quot;tip&quot; ] || [ -z &quot;$t&quot; ]; then<br /> d=&quot;-alpha&quot;<br /> else<br /> d=&quot;&quot;<br /> fi &amp;&amp; \<br /> sudo cp -v build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf&quot;$d&quot;<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf or ecwolf-alpha script, add executable permission and move it to /usr/bin:<br /> &lt;pre&gt;<br /> cd &quot;$HOME&quot;/ecwolf_build/ecwolf &amp;&amp; \<br /> t=&quot;$(hg id -t)&quot; &amp;&amp; \<br /> if [ &quot;$t&quot; = &quot;tip&quot; ] || [ -z &quot;$t&quot; ]; then<br /> d=&quot;-alpha&quot;<br /> else<br /> d=&quot;&quot;<br /> fi &amp;&amp; cd /tmp &amp;&amp; \<br /> echo '#!/bin/sh' &gt; ecwolf&quot;$d&quot; &amp;&amp; \<br /> echo &gt;&gt; ecwolf&quot;$d&quot; &amp;&amp; \<br /> echo &quot;exec /usr/games/ecwolf&quot;$d&quot;/ecwolf \&quot;\$@\&quot;&quot; &gt;&gt; ecwolf&quot;$d&quot; &amp;&amp; \<br /> chmod 755 ecwolf&quot;$d&quot; &amp;&amp; \<br /> sudo mv -v ecwolf&quot;$d&quot; /usr/bin<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' or '''ecwolf-alpha''' from any user account.<br /> <br /> === Uninstallation ===<br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove /usr/games/ecwolf-alpha directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf-alpha<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf-alpha script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf-alpha<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a backtrace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a backtrace.<br /> gdb ecwolf<br /> Now gdb should have you in its own command prompt. You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> (gdb) set logging on ecwolfdebug.log<br /> Use &quot;run&quot; to start ecwolf.<br /> (gdb) run<br /> To start and pass command line parameters to ecwolf.<br /> (gdb) run &lt;command line parameters&gt;<br /> Use &quot;bt&quot; to get the backtrace after a crash.<br /> (gdb) bt<br /> All output will be copied into the ecwolfdebug.log, which can then be scrutinized later, or perhaps posted to the [https://bitbucket.org/Blzut3/ecwolf/issues Bug Tracker] for other developers to look at.<br /> <br /> To exit gdb's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake -DGPL=ON -DUSE_LIBTEXTSCREEN=ON ..<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake -DNO_GTK=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=725 Compile ECWolf on Linux 2016-09-12T03:56:50Z <p>Skyrimguy: </p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://maniacsvault.net/ecwolf/files/tools/dev/ SDL_mixer for ECWolf] (Standard [http://www.libsdl.org/projects/SDL_mixer/release-1.2.html SDL_mixer] 1.2 will also work, but features will be disabled.)<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian/Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === openSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> === Current stable version ===<br /> Show the current stable version:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg identify -r &quot;max(tagged())&quot;<br /> <br /> If you want to compile the current stable version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr &quot;max(tagged())&quot;<br /> and [[#Compiling|compile]].<br /> <br /> After compiling and backing up the current stable version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ==<br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> ecwolf/src/version.h)\<br /> $(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\-r\1/p' \<br /> ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup (Optional) ===<br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup&quot; or &quot;Backup (Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Updating ==<br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Installation ==<br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> echo '#!/bin/sh' &gt; ecwolf &amp;&amp; \<br /> echo &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exec /usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Uninstallation ===<br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf.<br /> (gdb) run<br /> To start and pass command line parameters to ecwolf.<br /> (gdb) run &lt;command line parameters&gt;<br /> Use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake -DGPL=ON -DUSE_LIBTEXTSCREEN=ON ..<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake -DNO_GTK=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=724 Compile ECWolf on Linux 2016-07-06T23:21:11Z <p>Skyrimguy: /* Backup */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://maniacsvault.net/ecwolf/files/tools/dev/ SDL_mixer for ECWolf] (Standard [http://www.libsdl.org/projects/SDL_mixer/release-1.2.html SDL_mixer] 1.2 will also work, but features will be disabled.)<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian/Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === openSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> === Current stable version ===<br /> Show the current stable version:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg identify -r &quot;max(tagged())&quot;<br /> <br /> If you want to compile the current stable version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr &quot;max(tagged())&quot;<br /> and [[#Compiling|compile]].<br /> <br /> After compiling and backing up the current stable version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> ecwolf/src/version.h)\<br /> $(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\-r\1/p' \<br /> ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup&quot; or &quot;Backup (Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Updating ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Installation ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> echo '#!/bin/sh' &gt; ecwolf &amp;&amp; \<br /> echo &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exec /usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Uninstallation ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf.<br /> (gdb) run<br /> To start and pass command line parameters to ecwolf.<br /> (gdb) run &lt;command line parameters&gt;<br /> Use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake -DGPL=ON -DUSE_LIBTEXTSCREEN=ON ..<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake -DNO_GTK=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=689 Compile ECWolf on Linux 2014-10-06T20:42:07Z <p>Skyrimguy: /* Current release version */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian/Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === openSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> === Current stable version ===<br /> Show the current stable version:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg identify -r &quot;max(tagged())&quot;<br /> <br /> If you want to compile the current stable version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr &quot;max(tagged())&quot;<br /> and [[#Compiling|compile]].<br /> <br /> After compiling and backing up the current stable version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup&quot; or &quot;Backup (Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Updating ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Installation ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> echo '#!/bin/sh' &gt; ecwolf &amp;&amp; \<br /> echo &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exec /usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Uninstallation ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf.<br /> (gdb) run<br /> To start and pass command line parameters to ecwolf.<br /> (gdb) run &lt;command line parameters&gt;<br /> Use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake -DGPL=ON -DUSE_LIBTEXTSCREEN=ON ..<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake -DNO_GTK=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=688 Compile ECWolf on Linux 2014-09-29T18:02:47Z <p>Skyrimguy: </p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian/Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === openSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> === Current release version ===<br /> Show the current release version:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg identify -r &quot;max(tagged())&quot;<br /> <br /> If you want to compile the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr &quot;max(tagged())&quot;<br /> and [[#Compiling|compile]].<br /> <br /> After compiling and backing up the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup&quot; or &quot;Backup (Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Updating ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Installation ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> echo '#!/bin/sh' &gt; ecwolf &amp;&amp; \<br /> echo &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exec /usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Uninstallation ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf.<br /> (gdb) run<br /> To start and pass command line parameters to ecwolf.<br /> (gdb) run &lt;command line parameters&gt;<br /> Use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake -DGPL=ON -DUSE_LIBTEXTSCREEN=ON ..<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake -DNO_GTK=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=687 Compile ECWolf on Linux 2014-09-29T08:43:15Z <p>Skyrimguy: /* Debugging */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> === Current release version ===<br /> Show the current release version:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg identify -r &quot;max(tagged())&quot;<br /> <br /> If you want to compile the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr &quot;max(tagged())&quot;<br /> and [[#Compiling|compile]].<br /> <br /> After compiling and backing up the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> echo '#!/bin/sh' &gt; ecwolf &amp;&amp; \<br /> echo &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exec /usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf.<br /> (gdb) run<br /> To start and pass command line parameters to ecwolf.<br /> (gdb) run &lt;command line parameters&gt;<br /> Use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake -DGPL=ON -DUSE_LIBTEXTSCREEN=ON ..<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake -DNO_GTK=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=686 Compile ECWolf on Linux 2014-09-27T00:17:24Z <p>Skyrimguy: /* Install ECWolf */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> === Current release version ===<br /> Show the current release version:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg identify -r &quot;max(tagged())&quot;<br /> <br /> If you want to compile the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr &quot;max(tagged())&quot;<br /> and [[#Compiling|compile]].<br /> <br /> After compiling and backing up the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> echo '#!/bin/sh' &gt; ecwolf &amp;&amp; \<br /> echo &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exec /usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake -DGPL=ON -DUSE_LIBTEXTSCREEN=ON ..<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake -DNO_GTK=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=683 Compile ECWolf on Linux 2014-07-13T03:38:20Z <p>Skyrimguy: /* Backup ECWolf */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> === Current release version ===<br /> Show the current release version:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg identify -r &quot;max(tagged())&quot;<br /> <br /> If you want to compile the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr &quot;max(tagged())&quot;<br /> and [[#Compiling|compile]].<br /> <br /> After compiling and backing up the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> echo '#!/bin/bash' &gt; ecwolf &amp;&amp; \<br /> echo &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exec /usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake -DGPL=ON -DUSE_LIBTEXTSCREEN=ON ..<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake -DNO_GTK=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=646 Compile ECWolf on Linux 2014-05-19T22:07:18Z <p>Skyrimguy: /* Install ECWolf */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> === Current release version ===<br /> Show the current release version:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg identify -r &quot;max(tagged())&quot;<br /> <br /> If you want to compile the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr &quot;max(tagged())&quot;<br /> and [[#Compiling|compile]].<br /> <br /> After compiling and backing up the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> echo '#!/bin/bash' &gt; ecwolf &amp;&amp; \<br /> echo &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exec /usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake -DGPL=ON -DUSE_LIBTEXTSCREEN=ON ..<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake -DNO_GTK=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=643 Compile ECWolf on Linux 2014-04-13T13:36:21Z <p>Skyrimguy: /* Build Options */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> === Current release version ===<br /> Show the current release version:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg identify -r &quot;max(tagged())&quot;<br /> <br /> If you want to compile the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr &quot;max(tagged())&quot;<br /> and [[#Compiling|compile]].<br /> <br /> After compiling and backing up the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exec /usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;100%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;15%&quot;|Options!!width=&quot;45%&quot;|Description!!width=&quot;40%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |-<br /> |USE_LIBTEXTSCREEN=ON||Use libtextscreen IWAD picker. Only available in the GPL edition.||cmake -DGPL=ON -DUSE_LIBTEXTSCREEN=ON ..<br /> |-<br /> |NO_GTK=ON||Disable GTK+ IWAD picker.||cmake -DNO_GTK=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=642 Compile ECWolf on Linux 2014-04-13T11:14:45Z <p>Skyrimguy: /* Current release version */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> === Current release version ===<br /> Show the current release version:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg identify -r &quot;max(tagged())&quot;<br /> <br /> If you want to compile the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr &quot;max(tagged())&quot;<br /> and [[#Compiling|compile]].<br /> <br /> After compiling and backing up the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exec /usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Options!!width=&quot;70%&quot;|Description!!width=&quot;20%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=640 Compile ECWolf on Linux 2014-04-11T19:31:45Z <p>Skyrimguy: /* Install ECWolf */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> === Current release version ===<br /> If you want to compile the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr &quot;max(tagged())&quot;<br /> and [[#Compiling|compile]].<br /> <br /> After compiling and backing up the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exec /usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Options!!width=&quot;70%&quot;|Description!!width=&quot;20%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=639 Compile ECWolf on Linux 2014-04-07T20:11:36Z <p>Skyrimguy: /* Current release version */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> === Current release version ===<br /> If you want to compile the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr &quot;max(tagged())&quot;<br /> and [[#Compiling|compile]].<br /> <br /> After compiling and backing up the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo &gt;&gt; ecwolf &amp;&amp; \<br /> echo '/usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exit $?' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Options!!width=&quot;70%&quot;|Description!!width=&quot;20%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=638 Compile ECWolf on Linux 2014-04-07T17:43:05Z <p>Skyrimguy: /* Install ECWolf */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> === Current release version ===<br /> If you want to compile the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr &quot;max(tagged())&quot;<br /> and [[#Compiling|compile]].<br /> <br /> After compiling the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo &gt;&gt; ecwolf &amp;&amp; \<br /> echo '/usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exit $?' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Options!!width=&quot;70%&quot;|Description!!width=&quot;20%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=637 Compile ECWolf on Linux 2014-04-06T06:31:29Z <p>Skyrimguy: /* Latest stable version */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> === Current release version ===<br /> If you want to compile the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr &quot;max(tagged())&quot;<br /> and [[#Compiling|compile]].<br /> <br /> After compiling the current release version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo '/usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exit $?' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Options!!width=&quot;70%&quot;|Description!!width=&quot;20%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=636 Compile ECWolf on Linux 2014-04-06T03:53:43Z <p>Skyrimguy: /* Compiling */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> === Latest stable version ===<br /> If you want to compile the latest stable version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update -cr &quot;max(tagged())&quot;<br /> and [[#Compiling|compile]].<br /> <br /> After compiling the latest stable version, run the following:<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg update default<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo '/usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exit $?' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Options!!width=&quot;70%&quot;|Description!!width=&quot;20%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=635 Compile ECWolf on Linux 2014-04-04T01:11:34Z <p>Skyrimguy: /* Compiling */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are going to recompile, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo '/usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exit $?' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Options!!width=&quot;70%&quot;|Description!!width=&quot;20%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=634 Compile ECWolf on Linux 2014-04-04T01:01:41Z <p>Skyrimguy: /* Update ECWolf */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are recompiling, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update<br /> &lt;/pre&gt;<br /> <br /> When the update finish, go to [[#Compiling|Compiling]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo '/usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exit $?' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Options!!width=&quot;70%&quot;|Description!!width=&quot;20%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=633 Compile ECWolf on Linux 2014-04-04T01:00:11Z <p>Skyrimguy: /* Compiling */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> <br /> If you are recompiling, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update &amp;&amp; \<br /> cd build &amp;&amp; make clean ; \<br /> cmake -DGPL=ON .. &amp;&amp; \<br /> make<br /> &lt;/pre&gt;<br /> <br /> When the update and compiling finish, go to [[#Backup ECWolf|Backup ECWolf]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo '/usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exit $?' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Options!!width=&quot;70%&quot;|Description!!width=&quot;20%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=632 Compile ECWolf on Linux 2014-04-04T00:56:47Z <p>Skyrimguy: /* Compiling */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> If you are recompiling, it is recommended to run '''make clean''' before the following.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update &amp;&amp; \<br /> cd build &amp;&amp; make clean ; \<br /> cmake -DGPL=ON .. &amp;&amp; \<br /> make<br /> &lt;/pre&gt;<br /> <br /> When the update and compiling finish, go to [[#Backup ECWolf|Backup ECWolf]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo '/usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exit $?' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Options!!width=&quot;70%&quot;|Description!!width=&quot;20%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=631 Compile ECWolf on Linux 2014-03-31T22:51:53Z <p>Skyrimguy: /* Update ECWolf */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf &amp;&amp; \<br /> hg pull ; hg update &amp;&amp; \<br /> cd build &amp;&amp; make clean ; \<br /> cmake -DGPL=ON .. &amp;&amp; \<br /> make<br /> &lt;/pre&gt;<br /> <br /> When the update and compiling finish, go to [[#Backup ECWolf|Backup ECWolf]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo '/usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exit $?' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Options!!width=&quot;70%&quot;|Description!!width=&quot;20%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=627 Compile ECWolf on Linux 2014-02-13T20:33:30Z <p>Skyrimguy: /* Debugging */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf/build &amp;&amp; \<br /> make clean ; \<br /> cd .. &amp;&amp; hg pull ; \<br /> hg update &amp;&amp; \<br /> cd build &amp;&amp; \<br /> cmake -DGPL=ON .. &amp;&amp; \<br /> make<br /> &lt;/pre&gt;<br /> <br /> When the update and compiling finish, go to [[#Backup ECWolf|Backup ECWolf]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo '/usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exit $?' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> '''Prerequisite:'''<br /> <br /> * [http://www.gnu.org/software/gdb/ gdb]<br /> <br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> You probably want to log the output, so lets output to a file ecwolfdebug.log.<br /> set logging on ecwolfdebug.log<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> (gdb) quit<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Options!!width=&quot;70%&quot;|Description!!width=&quot;20%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=572 Compile ECWolf on Linux 2013-10-30T23:14:12Z <p>Skyrimguy: /* Install ECWolf */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf/build &amp;&amp; \<br /> make clean ; \<br /> cd .. &amp;&amp; hg pull ; \<br /> hg update &amp;&amp; \<br /> cd build &amp;&amp; \<br /> cmake -DGPL=ON .. &amp;&amp; \<br /> make<br /> &lt;/pre&gt;<br /> <br /> When the update and compiling finish, go to [[#Backup ECWolf|Backup ECWolf]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo '/usr/games/ecwolf/ecwolf &quot;$@&quot;' &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exit $?' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> <br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> &lt;pre&gt;<br /> (gdb) quit<br /> &lt;/pre&gt;<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Options!!width=&quot;70%&quot;|Description!!width=&quot;20%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=571 Compile ECWolf on Linux 2013-10-16T14:30:05Z <p>Skyrimguy: /* PCLinuxOS */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$a&quot;bzip2-devel mercurial make lib&quot;$a&quot;jpeg62-devel \<br /> lib&quot;$a&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf/build &amp;&amp; \<br /> make clean ; \<br /> cd .. &amp;&amp; hg pull ; \<br /> hg update &amp;&amp; \<br /> cd build &amp;&amp; \<br /> cmake -DGPL=ON .. &amp;&amp; \<br /> make<br /> &lt;/pre&gt;<br /> <br /> When the update and compiling finish, go to [[#Backup ECWolf|Backup ECWolf]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo '/usr/games/ecwolf/ecwolf $*' &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exit $?' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> <br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> &lt;pre&gt;<br /> (gdb) quit<br /> &lt;/pre&gt;<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Options!!width=&quot;70%&quot;|Description!!width=&quot;20%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=570 Compile ECWolf on Linux 2013-10-16T14:28:21Z <p>Skyrimguy: /* Mageia */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> a=&quot;64&quot; <br /> else<br /> a=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$a&quot;SDL-devel lib&quot;$a&quot;SDL_mixer-devel \<br /> lib&quot;$a&quot;zlib-devel lib&quot;$a&quot;bzip2-devel mercurial make \<br /> lib&quot;$a&quot;jpeg-devel lib&quot;$a&quot;gtk+2.0-devel lib&quot;$a&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> whatsurhw=&quot;64&quot; <br /> else<br /> whatsurhw=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$whatsurhw&quot;SDL-devel lib&quot;$whatsurhw&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$whatsurhw&quot;bzip2-devel mercurial make lib&quot;$whatsurhw&quot;jpeg62-devel \<br /> lib&quot;$whatsurhw&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf/build &amp;&amp; \<br /> make clean ; \<br /> cd .. &amp;&amp; hg pull ; \<br /> hg update &amp;&amp; \<br /> cd build &amp;&amp; \<br /> cmake -DGPL=ON .. &amp;&amp; \<br /> make<br /> &lt;/pre&gt;<br /> <br /> When the update and compiling finish, go to [[#Backup ECWolf|Backup ECWolf]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo '/usr/games/ecwolf/ecwolf $*' &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exit $?' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> <br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> &lt;pre&gt;<br /> (gdb) quit<br /> &lt;/pre&gt;<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Options!!width=&quot;70%&quot;|Description!!width=&quot;20%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=563 Compile ECWolf on Linux 2013-07-15T16:09:22Z <p>Skyrimguy: /* Debugging */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> whatsurhw=&quot;64&quot; <br /> else<br /> whatsurhw=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$whatsurhw&quot;SDL-devel lib&quot;$whatsurhw&quot;SDL_mixer-devel \<br /> lib&quot;$whatsurhw&quot;zlib-devel lib&quot;$whatsurhw&quot;bzip2-devel mercurial make \<br /> lib&quot;$whatsurhw&quot;jpeg-devel lib&quot;$whatsurhw&quot;gtk+2.0-devel lib&quot;$whatsurhw&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> whatsurhw=&quot;64&quot; <br /> else<br /> whatsurhw=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$whatsurhw&quot;SDL-devel lib&quot;$whatsurhw&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$whatsurhw&quot;bzip2-devel mercurial make lib&quot;$whatsurhw&quot;jpeg62-devel \<br /> lib&quot;$whatsurhw&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf/build &amp;&amp; \<br /> make clean ; \<br /> cd .. &amp;&amp; hg pull ; \<br /> hg update &amp;&amp; \<br /> cd build &amp;&amp; \<br /> cmake -DGPL=ON .. &amp;&amp; \<br /> make<br /> &lt;/pre&gt;<br /> <br /> When the update and compiling finish, go to [[#Backup ECWolf|Backup ECWolf]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo '/usr/games/ecwolf/ecwolf $*' &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exit $?' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> <br /> To exit GDB's command prompt, use &quot;quit&quot;, &quot;q&quot; or Ctrl-D.<br /> &lt;pre&gt;<br /> (gdb) quit<br /> &lt;/pre&gt;<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Options!!width=&quot;70%&quot;|Description!!width=&quot;20%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=562 Compile ECWolf on Linux 2013-07-09T03:19:17Z <p>Skyrimguy: </p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> whatsurhw=&quot;64&quot; <br /> else<br /> whatsurhw=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$whatsurhw&quot;SDL-devel lib&quot;$whatsurhw&quot;SDL_mixer-devel \<br /> lib&quot;$whatsurhw&quot;zlib-devel lib&quot;$whatsurhw&quot;bzip2-devel mercurial make \<br /> lib&quot;$whatsurhw&quot;jpeg-devel lib&quot;$whatsurhw&quot;gtk+2.0-devel lib&quot;$whatsurhw&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> whatsurhw=&quot;64&quot; <br /> else<br /> whatsurhw=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$whatsurhw&quot;SDL-devel lib&quot;$whatsurhw&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$whatsurhw&quot;bzip2-devel mercurial make lib&quot;$whatsurhw&quot;jpeg62-devel \<br /> lib&quot;$whatsurhw&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> cmake -DCMAKE_BUILD_TYPE=Release -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf/build &amp;&amp; \<br /> make clean ; \<br /> cd .. &amp;&amp; hg pull ; \<br /> hg update &amp;&amp; \<br /> cd build &amp;&amp; \<br /> cmake -DGPL=ON .. &amp;&amp; \<br /> make<br /> &lt;/pre&gt;<br /> <br /> When the update and compiling finish, go to [[#Backup ECWolf|Backup ECWolf]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo '/usr/games/ecwolf/ecwolf $*' &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exit $?' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt<br /> <br /> == Build Options ==<br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Options&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Options!!width=&quot;70%&quot;|Description!!width=&quot;20%&quot;|Example<br /> |-<br /> |GPL=ON||Switch ECWolf's default original non-commercial license to GNU GPL. OPL emulator is changed from MAME's to the one from Dosbox.||cmake -DGPL=ON ..<br /> |}<br /> <br /> {|class=&quot;wikitable&quot; width=&quot;80%&quot;<br /> |+ &lt;span style=&quot;text-decoration: underline&quot;&gt;CMake Build Types&lt;/span&gt;<br /> |-<br /> !width=&quot;10%&quot;|Types!!width=&quot;45%&quot;|Description!!width=&quot;45%&quot;|Example<br /> |-<br /> |Debug||Debug information, -O1 optimization.||cmake -DCMAKE_BUILD_TYPE=Debug ..<br /> |-<br /> |Release||No debug information, -O3 optimization.||cmake -DCMAKE_BUILD_TYPE=Release ..<br /> |-<br /> |RelWithDebInfo||Debug information, -O3 optimization. Useful for finding optimization bugs that only show up in Release.||cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..<br /> |-<br /> |MinSizeRel||Similar to Release but with less optimizations in order to save space.||cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..<br /> |}</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=560 Compile ECWolf on Linux 2013-07-06T22:12:04Z <p>Skyrimguy: /* Dependencies */</p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2]<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> whatsurhw=&quot;64&quot; <br /> else<br /> whatsurhw=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$whatsurhw&quot;SDL-devel lib&quot;$whatsurhw&quot;SDL_mixer-devel \<br /> lib&quot;$whatsurhw&quot;zlib-devel lib&quot;$whatsurhw&quot;bzip2-devel mercurial make \<br /> lib&quot;$whatsurhw&quot;jpeg-devel lib&quot;$whatsurhw&quot;gtk+2.0-devel lib&quot;$whatsurhw&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> whatsurhw=&quot;64&quot; <br /> else<br /> whatsurhw=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$whatsurhw&quot;SDL-devel lib&quot;$whatsurhw&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$whatsurhw&quot;bzip2-devel mercurial make lib&quot;$whatsurhw&quot;jpeg62-devel \<br /> lib&quot;$whatsurhw&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> cmake -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf/build &amp;&amp; \<br /> make clean ; \<br /> cd .. &amp;&amp; hg pull ; \<br /> hg update &amp;&amp; \<br /> cd build &amp;&amp; \<br /> cmake -DGPL=ON .. &amp;&amp; \<br /> make<br /> &lt;/pre&gt;<br /> <br /> When the update and compiling finish, go to [[#Backup ECWolf|Backup ECWolf]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo '/usr/games/ecwolf/ecwolf $*' &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exit $?' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt</div> Skyrimguy http://maniacsvault.net/ecwolf/w/index.php?title=Compile_ECWolf_on_Linux&diff=559 Compile ECWolf on Linux 2013-07-06T22:10:04Z <p>Skyrimguy: </p> <hr /> <div>This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.<br /> <br /> == Dependencies ==<br /> <br /> The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.<br /> * [http://cmake.org/ CMake] 2.6<br /> * [http://gcc.gnu.org/ GCC] 4.4.1<br /> * [http://www.gnu.org/software/make/ make]<br /> * [http://www.libsdl.org/ libsdl] 1.2<br /> * [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11<br /> In addition to the above, the following are optional dependencies.<br /> * [http://www.zlib.net/ zlib] 1.2.3<br /> * [http://bzip.org/ bzip2] 1.0.5<br /> * [http://www.ijg.org/ libjpeg] &gt;= 6b<br /> * [http://www.gtk.org/ GTK2] 2<br /> <br /> [http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source.<br /> <br /> Install the following dependencies as superuser:<br /> <br /> === Debian &amp; Ubuntu ===<br /> &lt;pre&gt;<br /> sudo apt-get install cmake g++ libsdl1.2-dev libsdl-mixer1.2-dev \<br /> zlib1g-dev libbz2-dev mercurial make libjpeg-dev libgtk2.0-dev<br /> &lt;/pre&gt;<br /> <br /> === Fedora ===<br /> &lt;pre&gt;<br /> yum install cmake gcc-c++ SDL-devel SDL_mixer-devel zlib-devel \<br /> bzip2-devel mercurial make libjpeg-turbo-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === OpenSUSE ===<br /> &lt;pre&gt;<br /> zypper install cmake gcc-c++ libSDL-devel libSDL_mixer-devel \<br /> zlib-devel libbz2-devel mercurial make libjpeg-devel gtk2-devel<br /> &lt;/pre&gt;<br /> <br /> === Mageia ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> whatsurhw=&quot;64&quot; <br /> else<br /> whatsurhw=&quot;&quot;<br /> fi &amp;&amp; \<br /> urpmi cmake gcc-c++ lib&quot;$whatsurhw&quot;SDL-devel lib&quot;$whatsurhw&quot;SDL_mixer-devel \<br /> lib&quot;$whatsurhw&quot;zlib-devel lib&quot;$whatsurhw&quot;bzip2-devel mercurial make \<br /> lib&quot;$whatsurhw&quot;jpeg-devel lib&quot;$whatsurhw&quot;gtk+2.0-devel lib&quot;$whatsurhw&quot;cairo-devel<br /> &lt;/pre&gt;<br /> <br /> === Arch Linux ===<br /> &lt;pre&gt;<br /> pacman -S --needed cmake gcc sdl sdl_mixer zlib bzip2 mercurial make libjpeg-turbo gtk2<br /> &lt;/pre&gt;<br /> <br /> === Gentoo ===<br /> &lt;pre&gt;<br /> emerge -avn dev-util/cmake sys-devel/gcc media-libs/libsdl media-libs/sdl-mixer \<br /> sys-libs/zlib app-arch/bzip2 dev-vcs/mercurial sys-devel/make media-libs/libjpeg-turbo \<br /> x11-libs/gtk+<br /> &lt;/pre&gt;<br /> <br /> === PCLinuxOS ===<br /> &lt;pre&gt;<br /> if [ &quot;$(uname -m)&quot; = &quot;x86_64&quot; ]; then <br /> whatsurhw=&quot;64&quot; <br /> else<br /> whatsurhw=&quot;&quot;<br /> fi &amp;&amp; \<br /> apt-get install cmake gcc-c++ lib&quot;$whatsurhw&quot;SDL-devel lib&quot;$whatsurhw&quot;SDL_mixer1.2-devel \<br /> zlib1-devel lib&quot;$whatsurhw&quot;bzip2-devel mercurial make lib&quot;$whatsurhw&quot;jpeg62-devel \<br /> lib&quot;$whatsurhw&quot;gtk+2.0_0-devel<br /> &lt;/pre&gt;<br /> <br /> '''Do the following steps as normal user.'''<br /> <br /> == Make ecwolf_build directory ==<br /> &lt;pre&gt;<br /> mkdir -pv $HOME/ecwolf_build<br /> &lt;/pre&gt;<br /> <br /> == Retrieving the Source ==<br /> Use Mercurial to retrieve the latest version of the source.<br /> cd $HOME/ecwolf_build<br /> hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]<br /> <br /> == Compiling ==<br /> It is recommended that you create a build directory in the newly created ecwolf directory.<br /> cd ecwolf<br /> mkdir build<br /> cd build<br /> Run CMake to generate a Makefile. Assuming there were no errors, you should be able to run make to compile.<br /> cmake -DGPL=ON ..<br /> make<br /> An ecwolf binary should be produced.<br /> ./ecwolf<br /> <br /> == Backup ECWolf ==<br /> <br /> Follow this step if you want or manually copy (backup) ecwolf and ecwolf.pk3.<br /> <br /> Make and name a directory with the corresponding ECWolf version/revision and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECWOLF=&quot;$(sed -n 's/.*#define DOTVERSIONSTR_NOREV &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/version.h)\<br /> -r$(sed -n 's/.*#define SVN_REVISION_STRING &quot;\(.*\)&quot;.*/\1/p' \<br /> $HOME/ecwolf_build/ecwolf/src/svnrevision.h)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECWOLF&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECWOLF&quot;<br /> &lt;/pre&gt;<br /> <br /> === Backup ECWolf (Optional) ===<br /> <br /> Make and name a directory with the current year, month, day, hour and minute and copy ecwolf and ecwolf.pk3 to it:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build &amp;&amp; \<br /> BACKUPECW=&quot;$(date +%Y%m%d%H%M)&quot; &amp;&amp; \<br /> mkdir -pv &quot;$BACKUPECW&quot; &amp;&amp; \<br /> cp -v ecwolf/build/{ecwolf,ecwolf.pk3} &quot;$BACKUPECW&quot;<br /> &lt;/pre&gt;<br /> <br /> If you did &quot;Backup ECWolf&quot; or &quot;(Optional)&quot;, the previous files should be located at:<br /> : '''/home/&lt;your username&gt;/ecwolf_build/'''<br /> <br /> == Update ECWolf ==<br /> <br /> When you wish to update ECWolf, copy and paste the following:<br /> &lt;pre&gt;<br /> cd $HOME/ecwolf_build/ecwolf/build &amp;&amp; \<br /> make clean ; \<br /> cd .. &amp;&amp; hg pull ; \<br /> hg update &amp;&amp; \<br /> cd build &amp;&amp; \<br /> cmake -DGPL=ON .. &amp;&amp; \<br /> make<br /> &lt;/pre&gt;<br /> <br /> When the update and compiling finish, go to [[#Backup ECWolf|Backup ECWolf]].<br /> <br /> == Install ECWolf ==<br /> <br /> '''The following steps contain commands that require to be run as superuser with the sudo command.'''<br /> <br /> If you want to install ECWolf, do the following:<br /> <br /> Make /usr/games/ecwolf directory:<br /> &lt;pre&gt;<br /> sudo mkdir -pv /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Copy ecwolf and ecwolf.pk3 to /usr/games/ecwolf:<br /> &lt;pre&gt;<br /> sudo cp -v /home/$USER/ecwolf_build/ecwolf/build/{ecwolf,ecwolf.pk3} /usr/games/ecwolf<br /> &lt;/pre&gt;<br /> <br /> Make ecwolf script, add executable permission and copy it to /usr/bin:<br /> &lt;pre&gt;<br /> cd /tmp &amp;&amp; \<br /> touch ecwolf &amp;&amp; \<br /> echo '#!/bin/bash' &gt;&gt; ecwolf &amp;&amp; \<br /> echo '/usr/games/ecwolf/ecwolf $*' &gt;&gt; ecwolf &amp;&amp; \<br /> echo 'exit $?' &gt;&gt; ecwolf &amp;&amp; \<br /> chmod 755 ecwolf &amp;&amp; \<br /> sudo cp -v ecwolf /usr/bin &amp;&amp; \<br /> rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Now from a terminal you should be able to execute '''ecwolf''' from any user account.<br /> <br /> === Remove ECWolf ===<br /> <br /> To remove the previous installation steps:<br /> <br /> Remove /usr/games/ecwolf directory and all its files:<br /> &lt;pre&gt;<br /> cd /usr/games &amp;&amp; \<br /> sudo rm -rfv ecwolf<br /> &lt;/pre&gt;<br /> <br /> Remove ecwolf script:<br /> &lt;pre&gt;<br /> cd /usr/bin &amp;&amp; \<br /> sudo rm -fv ecwolf<br /> &lt;/pre&gt;<br /> <br /> == Debugging ==<br /> In most cases it is good idea to generate a back trace when ECWolf crashes. To make a debug build of ecwolf simply replace the cmake command with the following.<br /> cmake -DCMAKE_BUILD_TYPE=Debug<br /> make<br /> You should now be able to use gdb to generate a back trace.<br /> gdb ecwolf<br /> GDB has it's own command prompt. Use &quot;run&quot; to start ecwolf and use &quot;bt&quot; to get the back trace after a crash.<br /> (gdb) run<br /> (gdb) bt</div> Skyrimguy