From d328f099129dc912289f607bd4913fcb44c73627 Mon Sep 17 00:00:00 2001 From: Renken Date: Mon, 8 Jan 2024 21:15:14 +0100 Subject: deploy: shione: init srb2kart --- deploy/shione/srb2kart/README.md | 12 +++++++ deploy/shione/srb2kart/dconfig.cfg | 5 +++ deploy/shione/srb2kart/dkartconfig_base.cfg | 40 +++++++++++++++++++++ deploy/shione/srb2kart/generate_dkartconfig.sh | 49 ++++++++++++++++++++++++++ deploy/shione/srb2kart/mods/000-pre/p1 | 0 deploy/shione/srb2kart/mods/001-chars/c1 | 0 deploy/shione/srb2kart/mods/001-chars/c2 | 0 deploy/shione/srb2kart/mods/002-tracks/t1 | 0 deploy/shione/srb2kart/mods/003-post/po1 | 0 deploy/shione/srb2kart/mods/index/c1 | 1 + deploy/shione/srb2kart/mods/index/c2 | 1 + deploy/shione/srb2kart/mods/index/p1 | 1 + deploy/shione/srb2kart/mods/index/po1 | 1 + deploy/shione/srb2kart/mods/index/t1 | 1 + deploy/shione/srb2kart/setup.sh | 22 ++++++++++++ 15 files changed, 133 insertions(+) create mode 100644 deploy/shione/srb2kart/README.md create mode 100644 deploy/shione/srb2kart/dconfig.cfg create mode 100644 deploy/shione/srb2kart/dkartconfig_base.cfg create mode 100755 deploy/shione/srb2kart/generate_dkartconfig.sh create mode 100644 deploy/shione/srb2kart/mods/000-pre/p1 create mode 100644 deploy/shione/srb2kart/mods/001-chars/c1 create mode 100644 deploy/shione/srb2kart/mods/001-chars/c2 create mode 100644 deploy/shione/srb2kart/mods/002-tracks/t1 create mode 100644 deploy/shione/srb2kart/mods/003-post/po1 create mode 120000 deploy/shione/srb2kart/mods/index/c1 create mode 120000 deploy/shione/srb2kart/mods/index/c2 create mode 120000 deploy/shione/srb2kart/mods/index/p1 create mode 120000 deploy/shione/srb2kart/mods/index/po1 create mode 120000 deploy/shione/srb2kart/mods/index/t1 create mode 100644 deploy/shione/srb2kart/setup.sh (limited to 'deploy') diff --git a/deploy/shione/srb2kart/README.md b/deploy/shione/srb2kart/README.md new file mode 100644 index 0000000..c808807 --- /dev/null +++ b/deploy/shione/srb2kart/README.md @@ -0,0 +1,12 @@ +Quoting [this thread on srb2 +forum](https://mb.srb2.org/threads/dedicated.7063/). + +> Although that's the way it's often been used in practice, it's not actually +> the case: adedserv.cfg is the counterpart of autoexec.cfg; dconfig.cfg of +> config.cfg. This has important implications for setting the masterserver: it +> works in the latter, but by the time the former is executed, it's too late. + + +In this case, I'll put everything in `dconfig.cfg` and see later on if there +are things I can delay to `adedserv.cfg`. I think the mods need to be +broadcasted to the master server? I could be wrong here. diff --git a/deploy/shione/srb2kart/dconfig.cfg b/deploy/shione/srb2kart/dconfig.cfg new file mode 100644 index 0000000..7d2695b --- /dev/null +++ b/deploy/shione/srb2kart/dconfig.cfg @@ -0,0 +1,5 @@ +addfile mods/000-pre/p1 +addfile mods/001-chars/c1 +addfile mods/001-chars/c2 +addfile mods/002-tracks/t1 +addfile mods/003-post/po1 diff --git a/deploy/shione/srb2kart/dkartconfig_base.cfg b/deploy/shione/srb2kart/dkartconfig_base.cfg new file mode 100644 index 0000000..59d86a6 --- /dev/null +++ b/deploy/shione/srb2kart/dkartconfig_base.cfg @@ -0,0 +1,40 @@ +// SRB2Kart configuration file. +execversion "10" +flipcam4 "No" +flipcam3 "No" +flipcam2 "No" +flipcam "No" +homremoval "Yes" +discordinvites "Everyone" +pingmeasurement "Frames" +showping "Always" +maxdelaytimeout "10" +maxdelay "20" +cpusleep "1" +skipmapcheck "Off" +kicktime "10" +jointimeout "210" +nettimeout "210" +blamecfail "Off" +showjoinaddress "On" +allowjoin "On" +http_source "http://shione.net/srb2kart/assets" +downloadspeed "32" +noticedownload "Off" +maxsend "51200" +resynchattempts "2" +maxplayers "16" +kartvoices "Tasteful" +kartdisplayspeed "Off" +kartinvinsfx "SFX" +kartcheck "Yes" +kartminimap "4" +server_contact "renken@shione.net" +servername "shione" +holepunchserver "relay.kartkrew.org" +masterserver_nagattempts "5" +masterserver_token "" +masterserver_debug "Off" +masterserver_timeout "5" +masterserver_update_rate "15" +masterserver "https://ms.kartkrew.org/ms/api" diff --git a/deploy/shione/srb2kart/generate_dkartconfig.sh b/deploy/shione/srb2kart/generate_dkartconfig.sh new file mode 100755 index 0000000..e2799d9 --- /dev/null +++ b/deploy/shione/srb2kart/generate_dkartconfig.sh @@ -0,0 +1,49 @@ +#!/bin/sh + +set -eux + +# Generates the portion of `dconfig.cfg` loading all necessary mod files in the +# correct order. + +# The script assumes a hierarchy demonstrated by the following example. +# mods/ +# 000-pre/ +# 001-chars/ +# 002-tracks/ +# 003-post/ + +# This allows separation of mods based on category such as characters and +# soundtracks but also serves as a poor man's dependency resolution between +# groups of mods e.g., gameplay mods depending on specific characters. The same +# approach can be used to solve dependency between mods found in the same +# category, prefixing the mods with a sequence of digits *should* solve the +# dependency problem e.g., `000-init-mod`, `001-mod-depending-on-000` and +# `002-mod-depending-on-001`. + +# While it shouldn't be hard to support a depth of more than 1 subdirectory, it +# seems impractical to me. + +if [ -e dkartconfig.cfg ]; then + rm -- dkartconfig.cfg +fi + +cp -- dkartconfig_base.cfg dkartconfig.cfg + +# NOTE: `find` does not offer a way to guarantee a desired sort of its output. +find mods -type f -printf 'addfile %p\n' | sort >dkartconfig.cfg + +if [ -e mods/index ]; then + rm -rf -- mods/index +fi + +printf 'regenerating index...\n' +mkdir -- mods/index +cd -- mods/index + +# NOTE: Mods from different categories having the same name are not supported. +# XXX: Please don't use newlines in filenames for the love of god. +find .. -type f -print | while read -r file; do + ln -s "$file" . +done + +cd -- - diff --git a/deploy/shione/srb2kart/mods/000-pre/p1 b/deploy/shione/srb2kart/mods/000-pre/p1 new file mode 100644 index 0000000..e69de29 diff --git a/deploy/shione/srb2kart/mods/001-chars/c1 b/deploy/shione/srb2kart/mods/001-chars/c1 new file mode 100644 index 0000000..e69de29 diff --git a/deploy/shione/srb2kart/mods/001-chars/c2 b/deploy/shione/srb2kart/mods/001-chars/c2 new file mode 100644 index 0000000..e69de29 diff --git a/deploy/shione/srb2kart/mods/002-tracks/t1 b/deploy/shione/srb2kart/mods/002-tracks/t1 new file mode 100644 index 0000000..e69de29 diff --git a/deploy/shione/srb2kart/mods/003-post/po1 b/deploy/shione/srb2kart/mods/003-post/po1 new file mode 100644 index 0000000..e69de29 diff --git a/deploy/shione/srb2kart/mods/index/c1 b/deploy/shione/srb2kart/mods/index/c1 new file mode 120000 index 0000000..2a228a3 --- /dev/null +++ b/deploy/shione/srb2kart/mods/index/c1 @@ -0,0 +1 @@ +../001-chars/c1 \ No newline at end of file diff --git a/deploy/shione/srb2kart/mods/index/c2 b/deploy/shione/srb2kart/mods/index/c2 new file mode 120000 index 0000000..ded63ff --- /dev/null +++ b/deploy/shione/srb2kart/mods/index/c2 @@ -0,0 +1 @@ +../001-chars/c2 \ No newline at end of file diff --git a/deploy/shione/srb2kart/mods/index/p1 b/deploy/shione/srb2kart/mods/index/p1 new file mode 120000 index 0000000..246ebb9 --- /dev/null +++ b/deploy/shione/srb2kart/mods/index/p1 @@ -0,0 +1 @@ +../000-pre/p1 \ No newline at end of file diff --git a/deploy/shione/srb2kart/mods/index/po1 b/deploy/shione/srb2kart/mods/index/po1 new file mode 120000 index 0000000..a72410e --- /dev/null +++ b/deploy/shione/srb2kart/mods/index/po1 @@ -0,0 +1 @@ +../003-post/po1 \ No newline at end of file diff --git a/deploy/shione/srb2kart/mods/index/t1 b/deploy/shione/srb2kart/mods/index/t1 new file mode 120000 index 0000000..5a1373a --- /dev/null +++ b/deploy/shione/srb2kart/mods/index/t1 @@ -0,0 +1 @@ +../002-tracks/t1 \ No newline at end of file diff --git a/deploy/shione/srb2kart/setup.sh b/deploy/shione/srb2kart/setup.sh new file mode 100644 index 0000000..70eb956 --- /dev/null +++ b/deploy/shione/srb2kart/setup.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +set -eux + +# Install both build and runtime dependencies. +# +# Build dependencies are install just in case srb2kart needs to be compiled on +# shione. +apt install \ + make \ + git \ + nasm \ + gcc \ + libsdl2-mixer-dev \ + libpng-dev \ + libcurl4-openssl-dev \ + libgme-dev \ + libopenmpt-dev + +# The user `srb2kart` is used by default here. +su srb2kart +cd -- -- cgit v1.2.3