From 28d740dfc3efb3be2e3e08be7b17f2e69b460682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Thu, 21 Mar 2013 09:41:10 +0100 Subject: [PATCH] Desura compatibility - create launch scripts for Desura - that access local installation launch scripts - clean up /usr/* launch scripts created during make install --- Makefile | 3 +++ desura_launch_Editor.sh | 24 ++++++++++++++++++++++++ desura_launch_Play.sh | 24 ++++++++++++++++++++++++ launch-editor.sh | 2 ++ launch-game.sh | 2 ++ packaging/linux/buildpackage.sh | 3 +++ 6 files changed, 58 insertions(+) create mode 100755 desura_launch_Editor.sh create mode 100755 desura_launch_Play.sh create mode 100755 launch-editor.sh create mode 100755 launch-game.sh diff --git a/Makefile b/Makefile index 0a5ff9610e..2d6a087fef 100644 --- a/Makefile +++ b/Makefile @@ -270,6 +270,9 @@ install: all @$(INSTALL_PROGRAM) -m +rx openra $(BIN_INSTALL_DIR) @$(INSTALL_PROGRAM) -m +rx openra-editor $(BIN_INSTALL_DIR) + @-rm openra + @-rm openra-editor + uninstall: @-rm -r $(INSTALL_DIR) @-rm $(DESTDIR)$(bindir)/openra diff --git a/desura_launch_Editor.sh b/desura_launch_Editor.sh new file mode 100755 index 0000000000..006119aced --- /dev/null +++ b/desura_launch_Editor.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +cd "`dirname "$(readlink -f "$0")"`" + +if [ -e "desura_prelaunch.sh" ]; then + source desura_prelaunch.sh +fi + +BIN_PATH="$HOME/.desura/games/openra/launch-editor.sh" +ARGS= +# TODO: This is crap. +libSDL_Path="$HOME/.desura/tools/63/" +libopenal_Path="$HOME/.desura/tools/73/" +libCgGL_PATH="$HOME/.desura/tools/78/" +libCg_PATH="$HOME/.desura/tools/79/" +libfreetype_Path="$HOME/.desura/tools/92/" +libGLU_Path="$HOME/.desura/tools/93/" +libalut_Path="$HOME/.desura/tools/195/" + +if [ -n $ARGS ]; then + LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$libSDL_Path:$libopenal_Path:$libCgGL_PATH:$libCg_PATH:$libfreetype_Path:$libGLU_Path:$libalut_Path $BIN_PATH $ARGS $@ +else + LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$libSDL_Path:$libopenal_Path:$libCgGL_PATH:$libCg_PATH:$libfreetype_Path:$libGLU_Path:$libalut_Path $BIN_PATH $@ +fi \ No newline at end of file diff --git a/desura_launch_Play.sh b/desura_launch_Play.sh new file mode 100755 index 0000000000..b1422ae0ad --- /dev/null +++ b/desura_launch_Play.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +cd "`dirname "$(readlink -f "$0")"`" + +if [ -e "desura_prelaunch.sh" ]; then + source desura_prelaunch.sh +fi + +BIN_PATH="$HOME/.desura/games/openra/launch-game.sh" +ARGS= +# TODO: This is crap. +libSDL_Path="$HOME/.desura/tools/63/" +libopenal_Path="$HOME/.desura/tools/73/" +libCgGL_PATH="$HOME/.desura/tools/78/" +libCg_PATH="$HOME/.desura/tools/79/" +libfreetype_Path="$HOME/.desura/tools/92/" +libGLU_Path="$HOME/.desura/tools/93/" +libalut_Path="$HOME/.desura/tools/195/" + +if [ -n $ARGS ]; then + LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$libSDL_Path:$libopenal_Path:$libCgGL_PATH:$libCg_PATH:$libfreetype_Path:$libGLU_Path:$libalut_Path $BIN_PATH $ARGS $@ +else + LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$libSDL_Path:$libopenal_Path:$libCgGL_PATH:$libCg_PATH:$libfreetype_Path:$libGLU_Path:$libalut_Path $BIN_PATH $@ +fi \ No newline at end of file diff --git a/launch-editor.sh b/launch-editor.sh new file mode 100755 index 0000000000..f700b0ff9c --- /dev/null +++ b/launch-editor.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec mono OpenRA.Editor.exe "$@" \ No newline at end of file diff --git a/launch-game.sh b/launch-game.sh new file mode 100755 index 0000000000..0dd3c1788e --- /dev/null +++ b/launch-game.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec mono OpenRA.Game.exe "$@" diff --git a/packaging/linux/buildpackage.sh b/packaging/linux/buildpackage.sh index 05334a49ee..16c1c1b7ef 100644 --- a/packaging/linux/buildpackage.sh +++ b/packaging/linux/buildpackage.sh @@ -21,6 +21,9 @@ cp -T openra-bin $ROOTDIR/usr/bin/openra mkdir -p $ROOTDIR/usr/share/openra/ cp -R $BUILTDIR/* "$ROOTDIR/usr/share/openra/" || exit 3 +# Desura launch scripts +cp ../../*.sh "$ROOTDIR/usr/share/openra/" || exit 3 + # Desktop Icons mkdir -p $ROOTDIR/usr/share/applications/ cp openra.desktop "$ROOTDIR/usr/share/applications/"