deploy: shione: init srb2kart
This commit is contained in:
parent
1d54e783ae
commit
d328f09912
15 changed files with 133 additions and 0 deletions
12
deploy/shione/srb2kart/README.md
Normal file
12
deploy/shione/srb2kart/README.md
Normal file
|
@ -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.
|
5
deploy/shione/srb2kart/dconfig.cfg
Normal file
5
deploy/shione/srb2kart/dconfig.cfg
Normal file
|
@ -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
|
40
deploy/shione/srb2kart/dkartconfig_base.cfg
Normal file
40
deploy/shione/srb2kart/dkartconfig_base.cfg
Normal file
|
@ -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"
|
49
deploy/shione/srb2kart/generate_dkartconfig.sh
Executable file
49
deploy/shione/srb2kart/generate_dkartconfig.sh
Executable file
|
@ -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 -- -
|
0
deploy/shione/srb2kart/mods/000-pre/p1
Normal file
0
deploy/shione/srb2kart/mods/000-pre/p1
Normal file
0
deploy/shione/srb2kart/mods/001-chars/c1
Normal file
0
deploy/shione/srb2kart/mods/001-chars/c1
Normal file
0
deploy/shione/srb2kart/mods/001-chars/c2
Normal file
0
deploy/shione/srb2kart/mods/001-chars/c2
Normal file
0
deploy/shione/srb2kart/mods/002-tracks/t1
Normal file
0
deploy/shione/srb2kart/mods/002-tracks/t1
Normal file
0
deploy/shione/srb2kart/mods/003-post/po1
Normal file
0
deploy/shione/srb2kart/mods/003-post/po1
Normal file
1
deploy/shione/srb2kart/mods/index/c1
Symbolic link
1
deploy/shione/srb2kart/mods/index/c1
Symbolic link
|
@ -0,0 +1 @@
|
|||
../001-chars/c1
|
1
deploy/shione/srb2kart/mods/index/c2
Symbolic link
1
deploy/shione/srb2kart/mods/index/c2
Symbolic link
|
@ -0,0 +1 @@
|
|||
../001-chars/c2
|
1
deploy/shione/srb2kart/mods/index/p1
Symbolic link
1
deploy/shione/srb2kart/mods/index/p1
Symbolic link
|
@ -0,0 +1 @@
|
|||
../000-pre/p1
|
1
deploy/shione/srb2kart/mods/index/po1
Symbolic link
1
deploy/shione/srb2kart/mods/index/po1
Symbolic link
|
@ -0,0 +1 @@
|
|||
../003-post/po1
|
1
deploy/shione/srb2kart/mods/index/t1
Symbolic link
1
deploy/shione/srb2kart/mods/index/t1
Symbolic link
|
@ -0,0 +1 @@
|
|||
../002-tracks/t1
|
22
deploy/shione/srb2kart/setup.sh
Normal file
22
deploy/shione/srb2kart/setup.sh
Normal file
|
@ -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 --
|
Loading…
Reference in a new issue