install icons, desktop shortcuts and launchers in Makefile
avoid redundancy with package build scripts add uninstall rules
This commit is contained in:
22
Makefile
22
Makefile
@@ -318,12 +318,16 @@ install-core: default
|
|||||||
@echo 'DATADIR="$${ROOTDIR}/'"$(datadir)"'"' >> openra
|
@echo 'DATADIR="$${ROOTDIR}/'"$(datadir)"'"' >> openra
|
||||||
@echo 'cd "$${DATADIR}/openra"' >> openra
|
@echo 'cd "$${DATADIR}/openra"' >> openra
|
||||||
@echo 'exec mono OpenRA.Game.exe "$$@"' >> openra
|
@echo 'exec mono OpenRA.Game.exe "$$@"' >> openra
|
||||||
|
|
||||||
@$(INSTALL_DIR) "$(BIN_INSTALL_DIR)"
|
@$(INSTALL_DIR) "$(BIN_INSTALL_DIR)"
|
||||||
@$(INSTALL_PROGRAM) -m +rx openra "$(BIN_INSTALL_DIR)"
|
@$(INSTALL_PROGRAM) -m +rx openra "$(BIN_INSTALL_DIR)"
|
||||||
|
|
||||||
@-$(RM) openra
|
@-$(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
|
install-tools: tools
|
||||||
@-echo "Installing OpenRA tools to $(DATA_INSTALL_DIR)"
|
@-echo "Installing OpenRA tools to $(DATA_INSTALL_DIR)"
|
||||||
@$(INSTALL_DIR) "$(DATA_INSTALL_DIR)"
|
@$(INSTALL_DIR) "$(DATA_INSTALL_DIR)"
|
||||||
@@ -335,16 +339,26 @@ install-tools: tools
|
|||||||
@echo 'DATADIR="$${ROOTDIR}/'"$(datadir)"'"' >> openra-editor
|
@echo 'DATADIR="$${ROOTDIR}/'"$(datadir)"'"' >> openra-editor
|
||||||
@echo 'cd "$${DATADIR}/openra"' >> openra-editor
|
@echo 'cd "$${DATADIR}/openra"' >> openra-editor
|
||||||
@echo 'exec mono OpenRA.Editor.exe "$$@"' >> openra-editor
|
@echo 'exec mono OpenRA.Editor.exe "$$@"' >> openra-editor
|
||||||
|
|
||||||
@$(INSTALL_DIR) "$(BIN_INSTALL_DIR)"
|
@$(INSTALL_DIR) "$(BIN_INSTALL_DIR)"
|
||||||
@$(INSTALL_PROGRAM) -m +rx openra-editor "$(BIN_INSTALL_DIR)"
|
@$(INSTALL_PROGRAM) -m +rx openra-editor "$(BIN_INSTALL_DIR)"
|
||||||
|
|
||||||
@-$(RM) openra-editor
|
@-$(RM) openra-editor
|
||||||
|
|
||||||
|
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/applications"
|
||||||
|
@$(INSTALL_DATA) packaging/linux/openra-editor.desktop "$(DESTDIR)$(datadir)/applications"
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
@-$(RM_R) "$(DATA_INSTALL_DIR)"
|
@-$(RM_R) "$(DATA_INSTALL_DIR)"
|
||||||
@-$(RM_F) "$(BIN_INSTALL_DIR)/openra"
|
@-$(RM_F) "$(BIN_INSTALL_DIR)/openra"
|
||||||
@-$(RM_F) "$(BIN_INSTALL_DIR)/openra-editor"
|
@-$(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:
|
help:
|
||||||
@echo to compile, run:
|
@echo to compile, run:
|
||||||
|
|||||||
@@ -15,22 +15,11 @@ ROOTDIR=root
|
|||||||
# Clean up
|
# Clean up
|
||||||
rm -rf $ROOTDIR
|
rm -rf $ROOTDIR
|
||||||
|
|
||||||
# Game files
|
# Copy files
|
||||||
mkdir -p $ROOTDIR/usr/bin/
|
cd ../..
|
||||||
cp -T openra-bin $ROOTDIR/usr/bin/openra
|
make install-all prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDIR"
|
||||||
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
|
|
||||||
|
|
||||||
# Launch scripts (executed by Desura)
|
cd packaging/linux
|
||||||
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/
|
|
||||||
|
|
||||||
(
|
(
|
||||||
echo "Building Debian package."
|
echo "Building Debian package."
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
cd /usr/share/openra
|
|
||||||
mono OpenRA.Game.exe "$@"
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
cd /usr/share/openra
|
|
||||||
mono OpenRA.Editor.exe "$@"
|
|
||||||
Reference in New Issue
Block a user