diff --git a/deploy.sh b/deploy.sh index 4fe7b3d..888fe2a 100755 --- a/deploy.sh +++ b/deploy.sh @@ -37,7 +37,7 @@ fi export stk_version="latest" export bzflag_version="2.4" export mindustry_version="latest" -export odamex_version="10.2.0" +export odamex_version="latest" export openhv_version="latest" export teeworlds_version="latest" export teeworldsddrace_version="16.1" diff --git a/scripts/deploy_odamex.sh b/scripts/deploy_odamex.sh index 9a55ffa..bf4530b 100755 --- a/scripts/deploy_odamex.sh +++ b/scripts/deploy_odamex.sh @@ -21,23 +21,55 @@ if [ -e /etc/systemd/system/odamex.service ]; then systemctl stop odamex fi +if [ -z ${odamex_version} ] || [ "${odamex_version}" = "latest" ]; then + odamex_version=$(curl -s https://api.github.com/repos/odamex/odamex/releases/latest | jq -r '.["tag_name"]') +fi + # Install ODAMEX -apt install --assume-yes libsdl2-dev libsdl2-mixer-dev cmake deutex freedoom +apt install --assume-yes libsdl2-dev libsdl2-mixer-dev cmake deutex freedoom libpng-dev mkdir -p ${TMPDIR:-/tmp}/odamex-build -curl --location https://downloads.sourceforge.net/project/odamex/Odamex/${odamex_version}/odamex-src-${odamex_version}.tar.xz | tar --extract --xz --no-same-owner --directory="${TMPDIR:-/tmp}/odamex-build" +curl --location https://github.com/odamex/odamex/releases/download/${odamex_version}/odamex-src-${odamex_version}.tar.gz | tar --extract --gz --no-same-owner --directory="${TMPDIR:-/tmp}/odamex-build" mkdir ${TMPDIR:-/tmp}/odamex-build/odamex-src-${odamex_version}/build cd ${TMPDIR:-/tmp}/odamex-build/odamex-src-${odamex_version}/build -cmake -DBUILD_CLIENT=OFF -DBUILD_LAUNCHER=OFF -DCMAKE_INSTALL_PREFIX=/opt/odamex-${odamex_version} .. +cmake -DBUILD_CLIENT=OFF -DBUILD_SERVER=ON -DBUILD_LAUNCHER=OFF -DCMAKE_INSTALL_PREFIX=/opt/odamex-${odamex_version} .. make make install + +# Build AppImage +mkdir -p AppDir +cmake -DBUILD_CLIENT=ON -DBUILD_SERVER=OFF -DBUILD_LAUNCHER=OFF -DCMAKE_INSTALL_PREFIX=AppDir .. +make +make install +curl -O --location 'https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage' +curl -O --location 'https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage' +chmod +x linuxdeploy-plugin-appimage-x86_64.AppImage linuxdeploy-x86_64.AppImage +mkdir -p AppDir/usr/share/applications +cat > AppDir/usr/share/applications/odamex.desktop < AppDir/AppRun < ${TMPDIR:-/tmp}/doomxmas.zip; then -# unzip -o -d /usr/share/games/doom/ ${TMPDIR:-/tmp}/doomxmas.zip -# fi - proto="http" if [ x"$NOSSL" = "x" ] || [ $NOSSL -ne 1 ]; then proto="https" @@ -51,12 +83,11 @@ set sv_website "${proto}://${DOMAINNAME}/" set sv_downloadsites "${proto}://${DOMAINNAME}/wads/" set rcon_password "${systempassword}" set sv_gametype "0" -set sv_skill "5" +set sv_skill "3" set sv_maxplayers "32" -set sv_monstersrespawn 1 +set sv_monstersrespawn 120 set sv_warmup 1 set sv_countdown 5 -wad doomxmas.wad EOF chown -R ${systemuser}: /home/${systemuser}/.odamex/ @@ -75,6 +106,10 @@ User=${systemuser} WantedBy=multi-user.target EOF +# Make wads available for download +mkdir -p /var/www/html/wads +cp -r /usr/share/games/doom/freedoom?.wad /var/www/html/wads + systemctl daemon-reload systemctl enable --now odamex.service diff --git a/website/help_odamex.html b/website/help_odamex.html index 05acf78..66c8557 100644 --- a/website/help_odamex.html +++ b/website/help_odamex.html @@ -3,6 +3,7 @@ layout: help game: odamex download_link: https://odamex.net/ --- +

An AppImage for Linux was automatically generated: Odamex-x86_64.AppImage

Tips