Vendor the Shockolate engine and build it via a Docker image with every
build / build (push) Failing after 5s

dependency (SDL2, SDL2_mixer, fluidsynth-lite, a MIDI soundfont)
prebuilt, so compiling the engine needs no network access - just the
image and the engine source. Add res/assets/extract_assets.sh to pull
the game's data files out of a purchased GOG installer, and a Makefile
that assembles a runnable dist/ from the two.

Also add `make package`, which builds a redistributable tarball that
omits the proprietary game assets (shipping res/GET_ASSETS.txt instead)
plus license information for both the MIT tooling and the GPLv3 engine,
and a Gitea Actions workflow that builds and publishes it to
dl.ladkau.de on every push.
This commit is contained in:
ml
2026-07-19 15:43:38 +02:00
parent 3ed6400466
commit a5ec8db5f7
826 changed files with 214554 additions and 0 deletions
+80
View File
@@ -0,0 +1,80 @@
#!/usr/bin/env bash
# Setting up
set -euo pipefail
SDL_version=2.0.9
SDL2_mixer_version=2.0.4
function build_sdl {
curl -O https://www.libsdl.org/release/SDL2-${SDL_version}.tar.gz
tar xf SDL2-${SDL_version}.tar.gz
pushd SDL2-${SDL_version}
./configure "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32" --prefix=${install_dir}/built_sdl
make -j2
make install
popd
}
function build_sdl_mixer {
curl -O https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-${SDL2_mixer_version}.tar.gz
tar xf SDL2_mixer-${SDL2_mixer_version}.tar.gz
pushd SDL2_mixer-${SDL2_mixer_version}
export SDL2_CONFIG="${install_dir}/built_sdl/bin/sdl2-config"
./configure "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32" --prefix=${install_dir}/built_sdl_mixer
make -j2
make install
popd
}
function build_fluidsynth {
git clone https://github.com/EtherTyper/fluidsynth-lite.git
pushd fluidsynth-lite
# force compilation of dynamic library
sed -i'' -e 's/DLL\"\ off/DLL\"\ on/' CMakeLists.txt
# force 32bit compilation
sed -i'' -e 's/\${GNUCC_WARNING_FLAGS}/-m32 \${GNUCC_WARNING_FLAGS}/' CMakeLists.txt
# if building fluidsynth fails, move on without it
set +e
cmake .
cmake --build .
# download a soundfont that's close to the Windows default everyone knows
curl -o music.sf2 http://rancid.kapsi.fi/windows.sf2
set -e
popd
}
# Actual script starts here
if [ -d ./build_ext/ ]; then
echo A directory named build_ext already exists.
echo Please remove it if you want to recompile.
exit
fi
mkdir ./build_ext/
cd ./build_ext/
install_dir=$(pwd)
build_fluidsynth
build_sdl
build_sdl_mixer
cd ..
mkdir -p ./res/
# move the soundfont to the correct place if we successfully built fluidsynth
for i in build_ext/fluidsynth-lite/*.sf2; do [ -f "$i" ] || break; mv $i res/; done;
+80
View File
@@ -0,0 +1,80 @@
#!/usr/bin/env bash
# Setting up
set -euo pipefail
SDL_version=2.0.9
SDL2_mixer_version=2.0.4
function build_sdl {
curl -O https://www.libsdl.org/release/SDL2-${SDL_version}.tar.gz
tar xf SDL2-${SDL_version}.tar.gz
pushd SDL2-${SDL_version}
./configure --prefix=${install_dir}/built_sdl
make -j2
make install
popd
}
function build_sdl_mixer {
curl -O https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-${SDL2_mixer_version}.tar.gz
tar xf SDL2_mixer-${SDL2_mixer_version}.tar.gz
pushd SDL2_mixer-${SDL2_mixer_version}
export SDL2_CONFIG="${install_dir}/built_sdl/bin/sdl2-config"
./configure --prefix=${install_dir}/built_sdl_mixer
make -j2
make install
popd
}
function build_fluidsynth {
git clone https://github.com/EtherTyper/fluidsynth-lite.git
pushd fluidsynth-lite
# force compilation of dynamic library
sed -i'' -e 's/DLL\"\ off/DLL\"\ on/' CMakeLists.txt
# force 32bit compilation
# sed -i'' -e 's/\${GNUCC_WARNING_FLAGS}/-m32 \${GNUCC_WARNING_FLAGS}/' CMakeLists.txt
# if building fluidsynth fails, move on without it
set +e
cmake .
cmake --build .
# download a soundfont that's close to the Windows default everyone knows
curl -o music.sf2 http://rancid.kapsi.fi/windows.sf2
set -e
popd
}
# Actual script starts here
if [ -d ./build_ext/ ]; then
echo A directory named build_ext already exists.
echo Please remove it if you want to recompile.
exit
fi
mkdir ./build_ext/
cd ./build_ext/
install_dir=$(pwd)
build_fluidsynth
build_sdl
build_sdl_mixer
cd ..
mkdir -p ./res/
# move the soundfont to the correct place if we successfully built fluidsynth
for i in build_ext/fluidsynth-lite/*.sf2; do [ -f "$i" ] || break; mv $i res/; done;
+6
View File
@@ -0,0 +1,6 @@
Shockolate - Portable System Shock
============
1. Copy `res/` folder of original System Shock to this directory
2. Install SDL2, SDL2_mixer and Fluidsynth by running `./install_<bits>bit_sdl.sh` where `<bits>` is 32 or 64, depending on your system capabilities. Linux needs `sudo` for this script.
3. Run Shockolate `./run.sh`
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
export LD_LIBRARY_PATH="$(pwd)/lib"
./systemshock "$@"
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
export DYLD_LIBRARY_PATH="$(pwd)/lib"
./systemshock "$@"