diff --git a/packaging/linux/AppRun.in b/packaging/linux/AppRun.in index b0aa976534..b159a359e5 100755 --- a/packaging/linux/AppRun.in +++ b/packaging/linux/AppRun.in @@ -70,7 +70,13 @@ fi # Run the game or server if [ -n "$1" ] && [ "$1" = "--server" ]; then + # Drop the --server argument + shift exec "openra-{MODID}-server" "$@" +elif [ -n "$1" ] && [ "$1" = "--utility" ]; then + # Drop the --utility argument + shift + exec "openra-{MODID}-utility" "$@" else exec "openra-{MODID}" "$@" fi diff --git a/packaging/linux/buildpackage.sh b/packaging/linux/buildpackage.sh index 6c7fd4ba72..c111e6f611 100755 --- a/packaging/linux/buildpackage.sh +++ b/packaging/linux/buildpackage.sh @@ -120,6 +120,9 @@ build_appimage() { 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" + 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" # 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" # 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}" diff --git a/packaging/linux/openra-utility.appimage.in b/packaging/linux/openra-utility.appimage.in new file mode 100755 index 0000000000..c648c6b895 --- /dev/null +++ b/packaging/linux/openra-utility.appimage.in @@ -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} "$@"