From 7f8a34cc5105e80fcf94218b4ddb5d7784fb9c1e Mon Sep 17 00:00:00 2001 From: d10sfan <4337981+d10sfan@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:57:22 -0600 Subject: [PATCH] Add Woof! (#1095) --- engines/woof/assets/run-woof.sh | 11 +++ engines/woof/build.sh | 29 +++++++ engines/woof/env.sh | 6 ++ engines/woof/vcpkg.json | 7 ++ metadata/packagessniper_v2.json | 135 +++++++++++++++++++++++++++++++- 5 files changed, 187 insertions(+), 1 deletion(-) create mode 100755 engines/woof/assets/run-woof.sh create mode 100755 engines/woof/build.sh create mode 100755 engines/woof/env.sh create mode 100644 engines/woof/vcpkg.json diff --git a/engines/woof/assets/run-woof.sh b/engines/woof/assets/run-woof.sh new file mode 100755 index 000000000..fe971d337 --- /dev/null +++ b/engines/woof/assets/run-woof.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +cd ./woof + +if [[ -z "${SDL_SOUNDFONTS}" ]]; then + echo "Setting default soundfont" + export SDL_SOUNDFONTS="fluid-soundfont-3.1/FluidR3_GM.sf2" +fi + +export LD_LIBRARY_PATH="lib:$LD_LIBRARY_PATH" +./woof "$@" diff --git a/engines/woof/build.sh b/engines/woof/build.sh new file mode 100755 index 000000000..d68ee7a01 --- /dev/null +++ b/engines/woof/build.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +export LDFLAGS=-L"$VCPKG_INSTALLED_PATH/lib" +export LIBRARY_PATH="$VCPKG_INSTALLED_PATH/lib" + +# CLONE PHASE +git clone https://github.com/fabiangreffrath/woof.git source +pushd source +git checkout cf23b4b +popd + +# BUILD PHASE +pushd "source" +mkdir -p build +cd build +cmake \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_PREFIX_PATH="$VCPKG_INSTALLED_PATH" \ + .. +make -j "$(nproc)" +popd + +# COPY PHASE +cp -rfv "source/build/src/woof" "$diststart/common/dist/" +cp -rfv "source/autoload" "$diststart/common/dist/" +cp -rfv "source/docs" "$diststart/common/dist/" +cp -rfv "source/soundfonts" "$diststart/common/dist/" + +cp -rfv assets/* "$diststart/common/dist/" diff --git a/engines/woof/env.sh b/engines/woof/env.sh new file mode 100755 index 000000000..d47f72297 --- /dev/null +++ b/engines/woof/env.sh @@ -0,0 +1,6 @@ + +#!/bin/bash + +export STEAM_APP_ID_LIST="2280 2300 2290" +export LICENSE_PATH="./source/COPYING" +export COMMON_PACKAGE="1" diff --git a/engines/woof/vcpkg.json b/engines/woof/vcpkg.json new file mode 100644 index 000000000..69f911d2d --- /dev/null +++ b/engines/woof/vcpkg.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", + "dependencies": [ + { "name": "fluidsynth", "features": ["pulseaudio"] }, + { "name": "sdl2-mixer", "features": ["fluidsynth"] } + ] +} diff --git a/metadata/packagessniper_v2.json b/metadata/packagessniper_v2.json index 7b84645a3..a0f83dedb 100644 --- a/metadata/packagessniper_v2.json +++ b/metadata/packagessniper_v2.json @@ -589,6 +589,29 @@ } ] }, + { + "name": "Woof!", + "engine_name": "Woof!", + "command": "./woof/run-woof.sh", + "command_args": [ + "-iwad", + "../base/DOOM.WAD" + ], + "download": [ + "woof", + "fluid-soundfont" + ], + "download_config": [ + { + "extract_location": "./woof", + "download_name": "woof" + }, + { + "extract_location": "./woof", + "download_name": "fluid-soundfont" + } + ] + }, { "name": "Eternity Engine", "engine_name": "Eternity Engine", @@ -1103,6 +1126,42 @@ } ] }, + { + "name": "Woof!", + "engine_name": "Woof!", + "commands": [ + { + "cmd": "./woof/run-woof.sh", + "args": [ + "-iwad", + "../base/PLUTONIA.WAD" + ], + "command_name": ".*plutoniam?.conf" + }, + { + "cmd": "./woof/run-woof.sh", + "args": [ + "-iwad", + "../base/TNT.WAD" + ], + "command_name": ".*tntm?.conf" + } + ], + "download": [ + "woof", + "fluid-soundfont" + ], + "download_config": [ + { + "extract_location": "./woof", + "download_name": "woof" + }, + { + "extract_location": "./woof", + "download_name": "fluid-soundfont" + } + ] + }, { "name": "Russian Doom", "engine_name": "Russian Doom", @@ -1839,6 +1898,65 @@ } ] }, + { + "name": "Woof!", + "commands": [ + { + "cmd": "./woof/run-woof.sh", + "args": [ + "-iwad", + "../base/DOOM2.WAD" + ], + "command_name": ".*rerelease" + }, + { + "cmd": "./woof/run-woof.sh", + "args": [ + "-iwad", + "../base/DOOM2.WAD" + ], + "command_name": ".*doom2" + }, + { + "cmd": "./woof/run-woof.sh", + "args": [ + "-iwad", + "../finaldoombase/TNT.WAD" + ], + "command_name": ".*tnt" + }, + { + "cmd": "./woof/run-woof.sh", + "args": [ + "-iwad", + "../finaldoombase/PLUTONIA.WAD" + ], + "command_name": ".*plutonia" + }, + { + "cmd": "/bin/sh", + "args": [ + "-c", + "echo \"Please use gzdoom for master levels.\" > last_error.txt && exit 10" + ], + "command_name": ".*master" + } + ], + "download": [ + "woof", + "fluid-soundfont" + ], + "download_config": [ + { + "extract_location": "./woof", + "download_name": "woof" + }, + { + "extract_location": "./woof", + "download_name": "fluid-soundfont" + } + ] + }, { "name": "Eternity Engine", "commands": [ @@ -9724,6 +9842,21 @@ "controllerSupported": true, "engine_name": "DOOM Retro" }, + { + "engine_link": "https://github.com/fabiangreffrath/woof", + "version": "14.0.0", + "author": "d10sfan", + "author_link": "https://github.com/d10sfan", + "license": "GPLv2", + "license_link": "https://github.com/fabiangreffrath/woof/blob/master/COPYING", + "notices": [ + { + "label": "Downloads FluidR3_GM.sf2 automatically. Can override SDL_SOUNDFONTS in launch options." + } + ], + "controllerSupported": true, + "engine_name": "Woof!" + }, { "engine_link": "https://github.com/odamex/odamex", "version": "0880dd0", @@ -10313,4 +10446,4 @@ "value": "Save Format Not Compatible" } ] -} \ No newline at end of file +}