Building (Belenos)

From Trisquel Enhancement Project
Jump to: navigation, search
Main: Software Building

Executables can be stripped using the following commands:

sudo apt-get update
sudo apt-get --no-install-recommends install debhelper
mkdir debian
echo Package: ../dir/exec_name>debian/control
echo Architecture: any>>debian/control
echo 9 >debian/compat
dh_strip

Furthermore, they can be compressed using the following commands:

sudo apt-get install upx-ucl
upx --lzma dir/exec_name

Replace dir/exec_name with the path to executable you want to strip/compress (e.g. overture.bin or doom3/doom.x86).

To package the resulting files as downloadable content, use the following commands:

7zr a -mx=9 dir_name.7z dir_name
rm -fr dir_name

Replace dir_name with the name of the directory you want to package (e.g. doom3).

ath9k_htc firmware[edit]

Note: Since 22 December 2013, Trisquel includes the "open-ath9k-htc-firmware" packaged in its repository, and comes pre-installed by default. These instructions are therefore needed only if you want to build and use the latest development version.

Prepare
sudo apt-get update
sudo apt-get --no-install-recommends install make gcc libc6-dev m4 cmake
wget https://github.com/qca/open-ath9k-htc-firmware/archive/master.zip
unzip master
rm -f master.zip
cd open-ath9k-htc-firmware-master
Build
make toolchain
make -C target_firmware
Clean
mkdir ../firmware
mv docs target_firmware/*.fw *.TXT README ../firmware
cd ..
rm -fr open-ath9k-htc-firmware-master

Pre-compiled binaries (arch-independent) can be downloaded here, or here. The official GitHub page with the released source code is here.

Brány Skeldalu (Gates of Skeldal)[edit]

Prepare
sudo apt-get update
sudo apt-get --no-install-recommends install subversion g++ libsdl-mixer1.2-dev make
svn co http://svn.code.sf.net/p/skeldal/code/branches/next_ghost
cd next_ghost
Build
./configure
make
make -C tools
Clean
mkdir -p ../skeldal/tools
mv icons README skeldal ../skeldal
mv tools/{demus{,.sh},musinfo} ../skeldal/tools
cd ..
rm -fr next_ghost

Pre-compiled binaries (both 32/64-bit) can be downloaded here, or here. Source code of the GNU/Linux port is available through the official SourceForge page here.

CorsixTH[edit]

Pre-requisite: libx264-120, libopencv-core2.3, libopencv-imgproc2.3 (use GDebi to install them)

Prepare
sudo add-apt-repository ppa:jon-severinsson/ffmpeg
sudo sed -i s/trusty/precise/ /etc/apt/sources.list.d/jon-severinsson-ffmpeg*	# removes audio clipping from intro cutscene
sudo apt-get update
sudo apt-get --no-install-recommends install cmake make g++ libluajit-5.1-dev libsdl-mixer1.2-dev libavdevice-dev libswscale-dev libpostproc-dev libswresample-dev libfreetype6-dev libwxgtk3.0-dev ant openjdk-7-jdk
wget https://github.com/CorsixTH/CorsixTH/archive/v0.40.tar.gz
tar xf v0.40.tar.gz
rm -f v0.40.tar.gz
cd CorsixTH-0.40
Build
cmake .
make
mv CorsixTH/CorsixTH{,_SDL}
cmake -DWITH_OPENGL=ON -DBUILD_ANIMVIEWER=ON -DBUILD_MAPEDITOR=ON
make
mv CorsixTH/CorsixTH{,_OpenGL}
ant -f LevelEdit
Clean
mkdir -p ../CorsixTH/lib
mv LevelEdit/README{,-LevelEdit}.txt
mv AnimView/AnimView{,.ico} CorsixTH/{Bitmap,Levels,Lua,changelog.txt,CorsixTH{.ico,.lua,_OpenGL,_SDL},*.svg} LevelEdit/{dist/*,README-LevelEdit.txt} MapEdit/MapEdit{,.ico} CONTRIBUTING.txt LICENSE.txt README.txt ../CorsixTH
cp /usr/lib/`arch|sed s/i686/i386/`-linux-gnu/{libavformat.so.53,libavcodec.so.53,libavutil.so.51,libswresample.so.0,libx264.so.120} ../CorsixTH/lib
for I in AnimView CorsixTH_{OpenGL,SDL} MapEdit;do echo LD_LIBRARY_PATH=lib ./$I>../CorsixTH/$I.sh;done
echo java -jar LevelEdit.jar>../CorsixTH/LevelEdit.sh
cd ..
rm -fr CorsixTH-0.40

Pre-compiled binaries (both 32/64-bit) can be downloaded here, or here. Source code is available through GitHub here.

Doom 3[edit]

Note: Since SDL2 has broken full-screen support (aspect ratio is ignored), version 1.2 is used instead. To fix crackling noise in the sound (Open Sound System only), run "echo drivers=oss>~/.alsoftrc" from Terminal.

Prepare
sudo apt-get update
sudo apt-get --no-install-recommends install cmake make g++ libjpeg-turbo8-dev libvorbis-dev libopenal-dev libsdl1.2-dev
wget https://github.com/dhewm/dhewm3/archive/master.zip
unzip master
rm -f master.zip
cd dhewm3-master/neo
Build
cmake -DCMAKE_BUILD_TYPE=MinSizeRel
make
Clean
mkdir ../../dhewm3
mv dhewm3{,.`arch`}
mv dhewm3.`arch` *.so ../*.{md,txt} ../../dhewm3
cd ../..
rm -fr dhewm3-master

Pre-compiled binaries (both 32/64-bit) can be downloaded here, or here. Source code is available through GitHub here.

Doom 3 BFG Edition[edit]

Note: To fix crackling noise in the sound (Open Sound System only), run "echo drivers=oss>~/.alsoftrc" from Terminal

Prepare
sudo apt-get update
sudo apt-get --no-install-recommends install cmake make g++ libavformat-dev libswscale-dev libsdl2-dev libopenal-dev
wget https://github.com/RobertBeckebans/RBDOOM-3-BFG/archive/138a2118bbd643b70ba7e5a56be1f22f3178896a.zip -O master.zip	# for a little smoother performance
unzip master
rm -f master.zip
cd RBDOOM-3-BFG*/neo
Build
cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DSDL2=ON
make
Clean
mkdir "../../Doom 3 BFG Edition"
mv RBDoom3BFG{,.`arch`}
mv RBDoom3BFG.`arch` ../*.txt "../../Doom 3 BFG Edition"
cd ../..
rm -fr RBDOOM-3-BFG*

Pre-compiled binaries (both 32/64-bit) can be downloaded here, or here. Source code is available through GitHub here.

Fabother World[edit]

Prepare
sudo apt-get update
sudo apt-get --no-install-recommends install make libsdl1.2-dev g++
wget https://github.com/fabiensanglard/Another-World-Bytecode-Interpreter/archive/master.zip
unzip master
rm -f master.zip
cd Another-World-Bytecode-Interpreter-master
Build
make
Clean
mkdir "../Fabother World"
mv COPYING game README* "../Fabother World"
cd ..
rm -fr Another-World-Bytecode-Interpreter-master

Pre-compiled binaries (both 32/64-bit) can be downloaded here, or here. Source code is available through GitHub here.

Fish Fillets Clone[edit]

Prepare
sudo apt-get update
sudo apt-get --no-install-recommends install make gcc libcairo2-dev liblua5.1-0-dev
wget http://www.olsak.net/mirek/ff-clone/ff-clone-1.1.tgz
tar xf ff-clone-1.1.tgz
rm -f ff-clone-1.1.tgz
cd ff-clone-1.1
Build
LDFLAGS=-lm make
Clean
mkdir ../ff-clone
mv data svg_src COPYING dokumentace ff-clone ../ff-clone
echo ./ff-clone -d data>../ff-clone/ff-clone.sh
cd ..
rm -fr ff-clone-1.1

Pre-compiled binaries (both 32/64-bit) can be downloaded here, or here. The official website of the game is here.

HandBrake[edit]

Prepare
sudo apt-get update
sudo apt-get --no-install-recommends install make libtool g++ libxml2-dev libx264-dev libass-dev libmp3lame-dev libtheora-dev libvorbis-dev libsamplerate0-dev libbz2-dev intltool libgtk-3-dev libnotify-dev libdbus-glib-1-dev libgudev-1.0-dev
wget http://downloads.sourceforge.net/project/handbrake/0.10.0/HandBrake-0.10.0.tar.bz2
tar xf HandBrake*.tar.bz2
rm -f HandBrake*.tar.bz2
cd HandBrake-0.10.0
Build
./configure --disable-fdk-aac
make -C build
Clean
mkdir ../HandBrake
mv build/{gtk/src/ghb,HandBrakeCLI} AUTHORS COPYING CREDITS NEWS README.pod THANKS TRANSLATIONS ../HandBrake
cd ..
rm -fr HandBrake-0.10.0

Pre-compiled binaries (both 32/64-bit) can be downloaded here, or here. The official website of the application is here.

Holyspirit: Act of Faith (demo)[edit]

Note: Once built, run the download_data.sh script to obtain the game data files (requires subversion to be installed). Note that this does not include HolyEditor and Holyspirit Launcher since they are currently broken.

Pre-requisite: libglew1.6 (use GDebi to install it)

Prepare
sudo add-apt-repository ppa:sonkun/sfml-stable
sudo sed -i s/trusty/precise/ /etc/apt/sources.list.d/sonkun-sfml-stable*
sudo apt-get update
sudo apt-get --no-install-recommends install subversion cmake make g++-4.6 libsfml-dev=2.0.0-1ppa3~precise-1 libxrandr-dev libfreetype6-dev libglew-dev libjpeg-turbo8-dev libsndfile1-dev libopenal-dev
svn co http://svn.code.sf.net/p/lechemindeladam/code/trunk --depth files
cd trunk
svn co http://svn.code.sf.net/p/lechemindeladam/code/trunk/{distribution,Source}
wget https://github.com/JonnyJD/PKGBUILDs/raw/master/holyspirit-svn/backspace.patch
patch -p1<backspace.patch
sed -i 121,123s/#// CMakeLists.txt
Build
CC=gcc-4.6 CXX=g++-4.6 cmake .
make
Clean
mkdir ../Holyspirit
mv Source/{Holyspirit.png,Licence.txt} *.conf credits.txt *.ini Holyspirit Liste_des_references_des_touches.txt README ../Holyspirit
echo svn export http://svn.code.sf.net/p/lechemindeladam/code/trunk/Data>../Holyspirit/download_data.sh
sed -i 's|/usr/local/share/games/holyspirit/||' ../Holyspirit/holyspirit.ini
sed -i -e '/^brightness:/s/ .*/ 0/' -e '/^contrast:/s/ .*/ 1/' -e '/^music_volume:/s/ .*/ 100/' ../Holyspirit/configuration.conf	# fixes colors and turns on music
cd ..
rm -fr trunk

Pre-compiled binaries (both 32/64-bit) can be downloaded here, or here. Source code is available through SourceForge here.

Penumbra: Overture[edit]

Note: The Newton2 port of the HPL1 engine is broken and incompletable. Because of that, the master branch is used.

Prepare
sudo apt-get update
sudo apt-get --no-install-recommends install make g++-4.6 cmake libvorbis-dev libsdl-ttf2.0-dev libfltk1.3-dev libsdl-image1.2-dev libalut-dev
mkdir FrictionalGames
cd FrictionalGames
wget https://github.com/FrictionalGames/OALWrapper/archive/master.zip -O OALWrapper.zip
wget https://github.com/FrictionalGames/HPL1Engine/archive/master.zip -O HPL1Engine.zip
wget https://github.com/FrictionalGames/PenumbraOverture/archive/master.zip -O PenumbraOverture.zip
wget http://www.angelcode.com/angelscript/sdk/files/angelscript_2.7.1b.zip
wget http://developer.download.nvidia.com/cg/Cg_3.1/Cg-3.1_April2012_x86.tgz
wget http://web.archive.org/web/20140327131622/http://newtondynamics.com/downloads/newtonLinux-1.53.tar.gz
tar xf Cg-3.1_April2012_x86.tgz ./usr/{include,lib}
tar xf newtonLinux-1.53.tar.gz newtonSDK/sdk/{libNewton.a,Newton.h}
unp *.zip
rm -f *.*
rename s/-master// *
sed -i -e 241s/128/4096/ -e 242s/2/8/ HPL1Engine/sources/game/Game.cpp
sed -i -e 409s/64/4096/ -e 410s/4/8/ PenumbraOverture/Init.cpp
cd sdk/angelscript/projects/gnuc
sudo ln -s gcc-4.6 /usr/bin/gcc
Build
make
mkdir -p ../../../../dependencies/{include,lib/linux}
mv ../../{include/*,../../{usr/include/*,newtonSDK/sdk/*.h,dependencies/include}}
mv ../../{lib/*.a,../../{usr/lib/*,newtonSDK/sdk/*.a,dependencies/lib/linux}}
cd ../../../../PenumbraOverture
CC=gcc-4.6 CXX=g++-4.6 cmake -DCMAKE_CXX_FLAGS=-fpermissive -DCMAKE_BUILD_TYPE=MinSizeRel	# first parameter needed for a successful compilation
make
Clean
mv overture.bin ../..
cd ../..
rm -fr FrictionalGames

Pre-compiled binary executable can be downloaded here, or here. The official GitHub page with the released source code is here. The above instructions applies only to the 32-bit version of Trisquel.

ResidualVM Tools[edit]

Prepare
sudo apt-get update
sudo apt-get --no-install-recommends install g++ make zlib1g-dev
wget https://github.com/residualvm/residualvm-tools/archive/master.zip
unzip master
rm -f master.zip
cd residualvm-tools-master
Build
./configure
make
Clean
mkdir ../residualvm-tools
mv doc formats animb2txt AUTHORS bm2bmp COPYING* COPYRIGHT cosb2cos delua diffr imc2wav int2flt luac meshb2obj mklab patchex patchr set2fig setb2set sklb2txt til2bmp unlab vima ../residualvm-tools
cd ..
rm -fr residualvm-tools-master

Pre-compiled binaries (both 32/64-bit) can be downloaded here, or here. Source code is available through GitHub here.

TwinEngine[edit]

Prepare
sudo apt-get update
sudo apt-get --no-install-recommends install subversion make gcc libsdl-mixer1.2-dev libsdl-ttf2.0-dev
svn export http://twin-e.googlecode.com/svn/trunk
cd trunk/src
Build
make
Clean
mkdir ../../TwinEngine
mv twin-e ../{bin/*,AUTHORS,CHANGES,COPYING,README} ../../TwinEngine
cd ../..
rm -fr trunk

Pre-compiled binaries (both 32/64-bit) can be downloaded here, or here. Source code is available through Google Code here.

Wargus[edit]

Note: Once built, use the "sh extract_data.sh PATH_TO_DATA" command to extract the game data files (requires freepats, timidity and ffmpeg2theora to be installed). Also note that newer revisions are incompatible with older saved states as well as progress in the game will not be preserved.

Prepare
sudo apt-get update
sudo apt-get --no-install-recommends install bzr cmake make g++ libsdl1.2-dev libtolua++5.1-dev libvorbis-dev libtheora-dev libgtk2.0-dev
bzr branch lp:stratagus -r8936	# later revisions are broken
bzr branch lp:wargus -r1778	# later revisions are broken
cd stratagus
Build
cmake .
make
cd ../wargus
cmake -DCMAKE_PROGRAM_PATH=../stratagus -DCMAKE_INCLUDE_PATH=../stratagus/gameheaders
make
Clean
mkdir ../Wargus
mv ../stratagus/stratagus campaigns maps scripts COPYING* README wargus.png wartool ../Wargus
echo './wartool -m -v "$1" .'>../Wargus/extract_data.sh
cd ..
rm -fr stratagus wargus

Pre-compiled binaries (both 32/64-bit) can be downloaded here, or here. Source code is available through Launchpad here.

webp-npapi[edit]

Note: The resulting file should be placed in ~/.mozilla/plugins folder, so that it can be detected by the browser

Prepare
sudo apt-get update
sudo apt-get --no-install-recommends install subversion make libgtk2.0-dev g++ libwebp-dev
wget -rl1 -nd -A.en-US.linux-`uname -m`.sdk.tar.bz2 http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/latest/sdk
tar xf xulrunner*.sdk.tar.bz2
rm -f xulrunner*.sdk.tar.bz2
svn co http://webp-npapi-linux.googlecode.com/svn/trunk
cd trunk
sed -i '20,21s|../..|../xulrunner-sdk|' webp-npapi.h CPlugin.h
sed -i '64s/NP_EXPORT(char\*)/const char\*/' webp-npapi.cpp
sed -i '11s/$(LDFLAGS) $(OBJECTS)/$(OBJECTS) $(LDFLAGS)/' Makefile
Build
make
Clean
mv webp-npapi.so ../webp-npapi-`arch`.so
cd ..
rm -fr trunk xulrunner-sdk

Pre-compiled binary (both 32/64-bit) can be downloaded here, or here. Source code is available through Google Code here.