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/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..951bbab23c 100644 --- a/packaging/linux/buildpackage.sh +++ b/packaging/linux/buildpackage.sh @@ -18,12 +18,17 @@ rm -rf $ROOTDIR # Game files mkdir -p $ROOTDIR/usr/bin/ cp -T openra-bin $ROOTDIR/usr/bin/openra +cp -T openra-editor-bin $ROOTDIR/usr/bin/openra-editor 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 +cp desura* "$ROOTDIR/usr/share/openra/" || exit 3 + # Desktop Icons mkdir -p $ROOTDIR/usr/share/applications/ -cp openra.desktop "$ROOTDIR/usr/share/applications/" +cp *.desktop "$ROOTDIR/usr/share/applications/" mkdir -p $ROOTDIR/usr/share/icons/ cp -r hicolor $ROOTDIR/usr/share/icons/ diff --git a/packaging/linux/desura_launch_Editor.sh b/packaging/linux/desura_launch_Editor.sh new file mode 100755 index 0000000000..9806cf8ff7 --- /dev/null +++ b/packaging/linux/desura_launch_Editor.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +cd "`dirname "\`readlink -f "$0"\`"`" + +if [ -e "desura_prelaunch.sh" ]; then + . 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/packaging/linux/desura_launch_Play.sh b/packaging/linux/desura_launch_Play.sh new file mode 100755 index 0000000000..7420c915e1 --- /dev/null +++ b/packaging/linux/desura_launch_Play.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +cd "`dirname "\`readlink -f "$0"\`"`" + +if [ -e "desura_prelaunch.sh" ]; then + . 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/packaging/linux/hicolor/32x32/apps/openra-editor.png b/packaging/linux/hicolor/32x32/apps/openra-editor.png new file mode 100644 index 0000000000..3b2fa799a8 Binary files /dev/null and b/packaging/linux/hicolor/32x32/apps/openra-editor.png differ diff --git a/packaging/linux/hicolor/48x48/apps/openra-editor.png b/packaging/linux/hicolor/48x48/apps/openra-editor.png new file mode 100644 index 0000000000..44796bbbe9 Binary files /dev/null and b/packaging/linux/hicolor/48x48/apps/openra-editor.png differ diff --git a/packaging/linux/openra-editor-bin b/packaging/linux/openra-editor-bin new file mode 100755 index 0000000000..cfc55f05f8 --- /dev/null +++ b/packaging/linux/openra-editor-bin @@ -0,0 +1,3 @@ +#!/bin/sh +cd /usr/share/openra +mono OpenRA.Editor.exe "$@" diff --git a/packaging/linux/openra-editor.desktop b/packaging/linux/openra-editor.desktop new file mode 100644 index 0000000000..f1a378a0b8 --- /dev/null +++ b/packaging/linux/openra-editor.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=OpenRA Map Editor +GenericName=Tile based RTS game map editor +Comment=Import legacy maps and create new ones from scratch +Icon=openra-editor +Exec=openra-editor +Terminal=false +Categories=Game;StrategyGame; \ No newline at end of file diff --git a/packaging/linux/rpm/openra.spec b/packaging/linux/rpm/openra.spec index d23dc7f836..b472fc4eb0 100644 --- a/packaging/linux/rpm/openra.spec +++ b/packaging/linux/rpm/openra.spec @@ -10,6 +10,7 @@ URL: http://open-ra.org Group: Amusements/Games Packager: Matthew Bowra-Dean Requires: mono-core mono-devel SDL openal +Suggests: Cg Prefix: /usr Source: %{name}-%{version}.tar.gz Buildroot: /tmp/openra