Skip to content

Commit 0228b88

Browse files
committed
Add a --utility argument to the AppImage.
1 parent 8a1f1a9 commit 0228b88

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

packaging/linux/buildpackage.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,14 @@ install -m 0755 openra-mod.temp "${BUILTDIR}/usr/bin/openra-${MOD_ID}"
142142
sed "s/{MODID}/${MOD_ID}/g" include/mod-server.in > openra-mod-server.temp
143143
install -m 0755 openra-mod-server.temp "${BUILTDIR}/usr/bin/openra-${MOD_ID}-server"
144144

145+
sed "s/{MODID}/${MOD_ID}/g" include/mod-utility.in > openra-mod-utility.temp
146+
install -m 0755 openra-mod-utility.temp "${BUILTDIR}/usr/bin/openra-${MOD_ID}-utility"
147+
145148
install -m 0755 include/gtk-dialog.py "${BUILTDIR}/usr/bin/gtk-dialog.py"
146149

147150
# travis-ci doesn't support mounting FUSE filesystems so extract and run the contents manually
148151
./appimagetool-x86_64.AppImage --appimage-extract
149152
ARCH=x86_64 ./squashfs-root/AppRun "${BUILTDIR}" "${OUTPUTDIR}/${PACKAGING_INSTALLER_NAME}-${TAG}.AppImage"
150153

151154
# Clean up
152-
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}"
155+
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}"

packaging/linux/include/AppRun.in

+6
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,13 @@ fi
7070

7171
# Run the game or server
7272
if [ -n "$1" ] && [ "$1" = "--server" ]; then
73+
# Drop the --server argument
74+
shift
7375
exec "openra-{MODID}-server" "$@"
76+
elif [ -n "$1" ] && [ "$1" = "--utility" ]; then
77+
# Drop the --utility argument
78+
shift
79+
exec "openra-{MODID}-utility" "$@"
7480
else
7581
exec "openra-{MODID}" "$@"
7682
fi
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
# OpenRA.Utility relies on keeping the original working directory, so don't change directory
4+
HERE="$(dirname "$(readlink -f "${0}")")"
5+
mono --debug ${HERE}/../lib/openra/OpenRA.Utility.exe {MODID} "$@"

0 commit comments

Comments
 (0)