diff --git a/packaging/linux/buildpackage.sh b/packaging/linux/buildpackage.sh index c2290bb..d234c55 100755 --- a/packaging/linux/buildpackage.sh +++ b/packaging/linux/buildpackage.sh @@ -142,6 +142,9 @@ install -m 0755 openra-mod.temp "${BUILTDIR}/usr/bin/openra-${MOD_ID}" sed "s/{MODID}/${MOD_ID}/g" include/mod-server.in > openra-mod-server.temp install -m 0755 openra-mod-server.temp "${BUILTDIR}/usr/bin/openra-${MOD_ID}-server" +sed "s/{MODID}/${MOD_ID}/g" include/mod-utility.in > openra-mod-utility.temp +install -m 0755 openra-mod-utility.temp "${BUILTDIR}/usr/bin/openra-${MOD_ID}-utility" + install -m 0755 include/gtk-dialog.py "${BUILTDIR}/usr/bin/gtk-dialog.py" # travis-ci doesn't support mounting FUSE filesystems so extract and run the contents manually @@ -149,4 +152,4 @@ install -m 0755 include/gtk-dialog.py "${BUILTDIR}/usr/bin/gtk-dialog.py" ARCH=x86_64 ./squashfs-root/AppRun "${BUILTDIR}" "${OUTPUTDIR}/${PACKAGING_INSTALLER_NAME}-${TAG}.AppImage" # Clean up -rm -rf openra-mod.temp openra-mod-server.temp temp.desktop temp.xml AppRun.temp libSDL2.so libopenal.so liblua.so appimagetool-x86_64.AppImage squashfs-root "${PACKAGING_APPIMAGE_DEPENDENCIES_TEMP_ARCHIVE_NAME}" "${BUILTDIR}" +rm -rf openra-mod.temp openra-mod-server.temp openra-mod-utility.temp temp.desktop temp.xml AppRun.temp libSDL2.so libopenal.so liblua.so appimagetool-x86_64.AppImage squashfs-root "${PACKAGING_APPIMAGE_DEPENDENCIES_TEMP_ARCHIVE_NAME}" "${BUILTDIR}" diff --git a/packaging/linux/include/AppRun.in b/packaging/linux/include/AppRun.in index 647d6b1..33171d3 100755 --- a/packaging/linux/include/AppRun.in +++ b/packaging/linux/include/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/include/mod-utility.in b/packaging/linux/include/mod-utility.in new file mode 100755 index 0000000..5ed0523 --- /dev/null +++ b/packaging/linux/include/mod-utility.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} "$@"