Skip to content

How to build and setup on Raspberry PI.md

tx00100xt edited this page Apr 21, 2023 · 10 revisions

How to build and setup on Raspberry PI 3B/3B+/4/400

Note: The build of the game for Raspberry PI OS 32-bit and 64-bit is identical. For the 32-bit version, you can optionally specify the -DUSE_I386_NASM_ASM=FALSE key for cmake.

Installing dependencies

sudo apt-get update -y --allow-releaseinfo-change
sudo apt-get install --no-install-recommends -y git bison flex cmake make gcc libc6-dev libsdl2-dev libogg-dev libvorbis-dev zlib1g-dev

Getting the source code

git clone https://github.com/tx00100xt/SeriousSamClassic.git
git clone https://github.com/tx00100xt/SeriousSamAlphaRemake.git

Getting Aplha Remake Data

for var in a b c d; do wget https://github.com/tx00100xt/serioussam-mods/raw/main/SamTFE-SSA/SeriousSamAlphaRemake_v1.5.tar.xz.parta$var; done; cat SeriousSamAlphaRemake_v1.5.tar.xz.part* > SeriousSamAlphaRemake_v1.5.tar.xz
tar -xJvpf SeriousSamAlphaRemake_v1.5.tar.xz -C SeriousSamClassic/SamTFE
rm SeriousSamClassic/SamTFE/Mods/SSA/Bin/libEntities.so
rm SeriousSamClassic/SamTFE/Mods/SSA/Bin/libGame.so

Getting XPLUS Data

for var in a b c; do wget https://github.com/tx00100xt/serioussam-mods/raw/main/SamTFE-XPLUS/SamTFE-XPLUS.tar.xz.parta$var; done; cat SamTFE-XPLUS.tar.xz.part* > SamTFE-XPLUS.tar.xz
tar -xJvpf SamTFE-XPLUS.tar.xz -C SeriousSamClassic/SamTFE

for var in a b c; do wget https://github.com/tx00100xt/serioussam-mods/raw/main/SamTSE-XPLUS/SamTSE-XPLUS.tar.xz.parta$var; done; cat SamTSE-XPLUS.tar.xz.part* > SamTSE-XPLUS.tar.xz
tar -xJvpf SamTSE-XPLUS.tar.xz -C SeriousSamClassic/SamTSE

Building SamTFE and SamTFE XPLUS:

cd SeriousSamClassic/SamTFE/Sources
mkdir build
mkdir build-xplus
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DRPI4=TRUE -DTFE=TRUE -DUSE_I386_NASM_ASM=FALSE .. # -DUSE_I386_NASM_ASM=FALSE need for 32-bit OS
make ecc
make -j4
cd ..
cp -vfr Entities/PlayerWeaponsHD.es Entities/PlayerWeapons.es
cd build-xplus
cmake -DCMAKE_BUILD_TYPE=Release -DRPI4=TRUE -DTFE=TRUE -DUSE_I386_NASM_ASM=FALSE ..  # -DUSE_I386_NASM_ASM=FALSE need for 32-bit OS
make ecc
make -j4

Place the resulting binaries and libraries from build and build/Debug into the SamTFE/Bin folder

cd ..
cd build
cp -vfr Debug/*.so ../../Bin
cp -vfr {SeriousSam,DedicatedServer,MakeFONT} ../../Bin

Place the resulting libraries libEntities.so and libGame.so from build-xplus/Debug into the SamTFE/Mods/XPLUS/Bin folder

cd ..
cd build-xplus
cp -vfr Debug/libEntities.so ../../Mods/XPLUS/Bin
cp -vfr Debug/libGame.so ../../Mods/XPLUS/Bin
cd ../../../../

Building SamTSE and SamTSE XPLUS:

cd SeriousSamClassic/SamTSE/Sources
mkdir build
mkdir build-xplus
cd build-standart
cmake -DCMAKE_BUILD_TYPE=Release -DRPI4=TRUE -DUSE_I386_NASM_ASM=FALSE ..  # -DUSE_I386_NASM_ASM=FALSE need for 32-bit OS
make ecc
make -j4
cd ..
cp -vfr EntitiesMP/PlayerWeaponsHD.es EntitiesMP/PlayerWeapons.es
cd build-xplus
cmake -DCMAKE_BUILD_TYPE=Release -DRPI4=TRUE -DUSE_I386_NASM_ASM=FALSE ..  # -DUSE_I386_NASM_ASM=FALSE need for 32-bit OS
make ecc
make -j4

Place the resulting binaries and libraries from build and build/Debug into the SamTFE/Bin folder

cd ..
cd build
cp -vfr Debug/*.so ../../Bin
cp -vfr {SeriousSam,DedicatedServer,MakeFONT} ../../Bin

Place the resulting libraries libEntitiesMP.so and libGameMP.so from build-xplus/Debug into the SamTFE/Mods/XPLUS/Bin folder

cd ..
cd build-xplus
cp -vfr Debug/libEntitiesMP.so ../../Mods/XPLUS/Bin
cp -vfr Debug/libGameMP.so ../../Mods/XPLUS/Bin
cd ../../../../

Build for SeriousSamAlphaRemake:

cd SeriousSamAlphaRemake/Sources
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DTFE=TRUE -DRPI4=TRUE ..
make ecc
make -j4

Place the resulting libraries libEntities.so and libGame.so from build/Debug into the SamTFE/Mods/SSA/Bin folder

cp -vfr Debug/libEntities.so ../../Mods/SSA/Bin
cp -vfr Debug/libGame.so ../../Mods/SSA/Bin
cd ../../../../

Game resources

To start the game, you'll need the original resurces of a licensed copy of Serious Sam: The First Encounter and Serious Sam: The Second Encounter.

Steam version.

If you have a digital copy of the game on Steam then the resources can be found in ~/.local/share/Steam/SteamApps/common/Serious Sam Classic The Second Encounter/ (the default Steam game installation directory on Linux).

cd SeriousSamClassic
cp -vfr "~/.local/share/Steam/SteamApps/common/Serious Sam Classic The First Encounter/"{*.gro,Levels,Help} SamTFE
cp -vfr "~/.local/share/Steam/SteamApps/common/Serious Sam Classic The Second Encounter/"{*.gro,Levels,Help} SamTSE

GOG version.

If you bought a digital on GOG, you can unpack the resources with the innoextract CLI tool. To install innoextract via your package manager, run:

sudo apt-get install innoextract

Copy files "setup_serious_sam_the_first_encounter_2.0.0.10.exe" and "setup_serious_sam_the_second_encounter_2.1.0.8.exe" to a directory SeriousSamClassic and run the following commands:

cd SeriousSamClassic
innoextract --gog setup_serious_sam_the_first_encounter_2.0.0.10.exe
cp -vfr "app/"{*.gro,Levels,Help} SamTFE
rm setup_serious_sam_the_first_encounter_2.0.0.10.exe
rm -rf app
rm -rf tmp
innoextract --gog setup_serious_sam_the_second_encounter_2.1.0.8.exe
cp -vfr "app/"{*.gro,Levels,Help} SamTSE
rm setup_serious_sam_the_first_encounter_2.0.0.10.exe
rm -rf app
rm -rf tmp
rm -rf commonappdata

Physical version.

If you bought a physical copy of the game and you have an ISO of your disk, you can unpack the resources with the any archive manager. Game resources are located in the Install directory of the disk. Just copy all the *.gro files from there, as well as the Levels directory to directories SeriousSamClassic/SamTFE and SeriousSamClassic/SamTSE, respectively, for games Serious Sam: The First Encounter and Serious Sam: The Second Encounter.

Launching the game.

To start the game, use the script:

run_game.sh

or

run_game_hud.sh 

if you need to monitor MangoHUD.