Add a --utility argument to the AppImages.

This commit is contained in:
Paul Chote
2018-12-06 04:48:05 +00:00
committed by Oliver Brakmann
parent 224377f078
commit 9f30e2ecb0
3 changed files with 15 additions and 1 deletions

View File

@@ -70,7 +70,13 @@ fi
# Run the game or server # Run the game or server
if [ -n "$1" ] && [ "$1" = "--server" ]; then if [ -n "$1" ] && [ "$1" = "--server" ]; then
# Drop the --server argument
shift
exec "openra-{MODID}-server" "$@" exec "openra-{MODID}-server" "$@"
elif [ -n "$1" ] && [ "$1" = "--utility" ]; then
# Drop the --utility argument
shift
exec "openra-{MODID}-utility" "$@"
else else
exec "openra-{MODID}" "$@" exec "openra-{MODID}" "$@"
fi fi

View File

@@ -120,6 +120,9 @@ build_appimage() {
sed "s/{MODID}/${MOD_ID}/g" openra-server.appimage.in > openra-mod-server.temp sed "s/{MODID}/${MOD_ID}/g" openra-server.appimage.in > openra-mod-server.temp
install -m 0755 openra-mod-server.temp "${APPDIR}/usr/bin/openra-${MOD_ID}-server" install -m 0755 openra-mod-server.temp "${APPDIR}/usr/bin/openra-${MOD_ID}-server"
sed "s/{MODID}/${MOD_ID}/g" openra-utility.appimage.in > openra-mod-utility.temp
install -m 0755 openra-mod-utility.temp "${APPDIR}/usr/bin/openra-${MOD_ID}-utility"
install -m 0755 gtk-dialog.py "${APPDIR}/usr/bin/gtk-dialog.py" install -m 0755 gtk-dialog.py "${APPDIR}/usr/bin/gtk-dialog.py"
# travis-ci doesn't support mounting FUSE filesystems so extract and run the contents manually # travis-ci doesn't support mounting FUSE filesystems so extract and run the contents manually
@@ -141,4 +144,4 @@ build_appimage "cnc" "Tiberian Dawn"
build_appimage "d2k" "Dune 2000" build_appimage "d2k" "Dune 2000"
# Clean up # Clean up
rm -rf openra-mod.temp openra-mod-server.temp temp.desktop temp.xml AppRun.temp appimagetool-x86_64.AppImage squashfs-root "${BUILTDIR}" rm -rf openra-mod.temp openra-mod-server.temp openra-mod-utility.temp temp.desktop temp.xml AppRun.temp appimagetool-x86_64.AppImage squashfs-root "${BUILTDIR}"

View File

@@ -0,0 +1,5 @@
#!/bin/sh
# OpenRA.Utility relies on keeping the original working directory, so don't change directory
HERE="$(dirname "$(readlink -f "${0}")")"
mono --debug ${HERE}/../lib/openra/OpenRA.Utility.exe {MODID} "$@"