diff --git a/Makefile b/Makefile index 41078e5e09..0289b4d610 100644 --- a/Makefile +++ b/Makefile @@ -318,12 +318,16 @@ install-core: default @echo 'DATADIR="$${ROOTDIR}/'"$(datadir)"'"' >> openra @echo 'cd "$${DATADIR}/openra"' >> openra @echo 'exec mono OpenRA.Game.exe "$$@"' >> openra - @$(INSTALL_DIR) "$(BIN_INSTALL_DIR)" @$(INSTALL_PROGRAM) -m +rx openra "$(BIN_INSTALL_DIR)" - @-$(RM) openra + @$(INSTALL_DIR) "$(DESTDIR)$(datadir)/applications" + @$(INSTALL_DATA) packaging/linux/openra.desktop "$(DESTDIR)$(datadir)/applications" + + @$(INSTALL_DIR) "$(DESTDIR)$(datadir)/icons/" + @$(CP_R) packaging/linux/hicolor/ "$(DESTDIR)$(datadir)/icons" + install-tools: tools @-echo "Installing OpenRA tools to $(DATA_INSTALL_DIR)" @$(INSTALL_DIR) "$(DATA_INSTALL_DIR)" @@ -335,16 +339,26 @@ install-tools: tools @echo 'DATADIR="$${ROOTDIR}/'"$(datadir)"'"' >> openra-editor @echo 'cd "$${DATADIR}/openra"' >> openra-editor @echo 'exec mono OpenRA.Editor.exe "$$@"' >> openra-editor - @$(INSTALL_DIR) "$(BIN_INSTALL_DIR)" @$(INSTALL_PROGRAM) -m +rx openra-editor "$(BIN_INSTALL_DIR)" - @-$(RM) openra-editor + @$(INSTALL_DIR) "$(DESTDIR)$(datadir)/applications" + @$(INSTALL_DATA) packaging/linux/openra-editor.desktop "$(DESTDIR)$(datadir)/applications" + uninstall: @-$(RM_R) "$(DATA_INSTALL_DIR)" @-$(RM_F) "$(BIN_INSTALL_DIR)/openra" @-$(RM_F) "$(BIN_INSTALL_DIR)/openra-editor" + @-$(RM_F) "$(DESTDIR)$(datadir)/applications/openra.desktop" + @-$(RM_F) "$(DESTDIR)$(datadir)/applications/openra-editor.desktop" + @-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/16x16/apps/openra.png" + @-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/32x32/apps/openra.png" + @-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/32x32/apps/openra-editor.png" + @-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/48x48/apps/openra.png" + @-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/48x48/apps/openra-editor.png" + @-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/64x64/apps/openra.png" + @-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/128x128/apps/openra.png" help: @echo to compile, run: diff --git a/packaging/linux/buildpackage.sh b/packaging/linux/buildpackage.sh index 4d6228b0cf..87a34c2355 100644 --- a/packaging/linux/buildpackage.sh +++ b/packaging/linux/buildpackage.sh @@ -15,22 +15,11 @@ ROOTDIR=root # Clean up 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 +# Copy files +cd ../.. +make install-all prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDIR" -# Launch scripts (executed by Desura) -cp ../../*.sh "$ROOTDIR/usr/share/openra/" || exit 3 - -# Desktop Icons -mkdir -p $ROOTDIR/usr/share/applications/ -cp *.desktop "$ROOTDIR/usr/share/applications/" - -mkdir -p $ROOTDIR/usr/share/icons/ -cp -r hicolor $ROOTDIR/usr/share/icons/ +cd packaging/linux ( echo "Building Debian package." diff --git a/packaging/linux/openra-bin b/packaging/linux/openra-bin deleted file mode 100755 index 0d4ba2622a..0000000000 --- a/packaging/linux/openra-bin +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -cd /usr/share/openra -mono OpenRA.Game.exe "$@" diff --git a/packaging/linux/openra-editor-bin b/packaging/linux/openra-editor-bin deleted file mode 100755 index cfc55f05f8..0000000000 --- a/packaging/linux/openra-editor-bin +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -cd /usr/share/openra -mono OpenRA.Editor.exe "$@"