From c280197616aa4020d1f5e04d778c616ddfffddac Mon Sep 17 00:00:00 2001 From: Graham Rowlands Date: Wed, 19 Feb 2014 11:50:35 -0500 Subject: [PATCH] Linux deployment scripts --- deploy/MakefileInstall | 86 ++++++++++++++++++++++++++++++++++++++++++ deploy/deployLinux.sh | 41 ++++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 deploy/MakefileInstall create mode 100755 deploy/deployLinux.sh diff --git a/deploy/MakefileInstall b/deploy/MakefileInstall new file mode 100644 index 0000000..56989ea --- /dev/null +++ b/deploy/MakefileInstall @@ -0,0 +1,86 @@ + +MAKEFILE = Makefile +CURRENT_DIR = $(shell pwd) +INSTALL_FILE = install -m 644 -p +INSTALL_DIR = $(COPY_DIR) +INSTALL_PROGRAM = install -m 755 -p +STRIP = strip +TARGET = muview +# INSTALL ROOT may be set to the desired prefix + +install_target: + @test -d $(INSTALL_ROOT)/usr/local/bin || mkdir -p $(INSTALL_ROOT)/usr/local/bin + -$(INSTALL_PROGRAM) "../$(TARGET)" "$(INSTALL_ROOT)/usr/local/bin/$(TARGET)" + -$(STRIP) "$(INSTALL_ROOT)/usr/local/bin/$(TARGET)" + +uninstall_target: + -$(DEL_FILE) "$(INSTALL_ROOT)/usr/local/bin/$(TARGET)" + -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/bin/ + +install_desktopfile: + @test -d $(INSTALL_ROOT)/usr/share/applications || mkdir -p $(INSTALL_ROOT)/usr/share/applications + -$(INSTALL_FILE) $(CURRENT_DIR)/resources/muview.desktop $(INSTALL_ROOT)/usr/share/applications/ + +uninstall_desktopfile: + -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/applications/muview.desktop + -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/applications/ + +install_iconfile512: + @test -d $(INSTALL_ROOT)/usr/share/icons/hicolor/512x512/apps || mkdir -p $(INSTALL_ROOT)/usr/share/icons/hicolor/512x512/apps + -$(INSTALL_FILE) $(CURRENT_DIR)/resources/512x512/muview.png $(INSTALL_ROOT)/usr/share/icons/hicolor/512x512/apps/ + +uninstall_iconfile512: + -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/icons/hicolor/512x512/apps/muview.png + -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/icons/hicolor/512x512/apps/ + +install_iconfile256: + @test -d $(INSTALL_ROOT)/usr/share/icons/hicolor/256x256/apps || mkdir -p $(INSTALL_ROOT)/usr/share/icons/hicolor/256x256/apps + -$(INSTALL_FILE) $(CURRENT_DIR)/resources/256x256/muview.png $(INSTALL_ROOT)/usr/share/icons/hicolor/256x256/apps/ + +uninstall_iconfile256: + -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/icons/hicolor/256x256/apps/muview.png + -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/icons/hicolor/256x256/apps/ + +install_iconfile128: + @test -d $(INSTALL_ROOT)/usr/share/icons/hicolor/128x128/apps || mkdir -p $(INSTALL_ROOT)/usr/share/icons/hicolor/128x128/apps + -$(INSTALL_FILE) $(CURRENT_DIR)/resources/128x128/muview.png $(INSTALL_ROOT)/usr/share/icons/hicolor/128x128/apps/ + +uninstall_iconfile128: + -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/icons/hicolor/128x128/apps/muview.png + -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/icons/hicolor/128x128/apps/ + +install_iconfile64: + @test -d $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps || mkdir -p $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps + -$(INSTALL_FILE) $(CURRENT_DIR)/resources/64x64/muview.png $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps/ + +uninstall_iconfile64: + -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps/muview.png + -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps/ + +install_iconfile32: + @test -d $(INSTALL_ROOT)/usr/share/icons/hicolor/32x32/apps || mkdir -p $(INSTALL_ROOT)/usr/share/icons/hicolor/32x32/apps + -$(INSTALL_FILE) $(CURRENT_DIR)/resources/32x32/muview.png $(INSTALL_ROOT)/usr/share/icons/hicolor/32x32/apps/ + +uninstall_iconfile32: + -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/icons/hicolor/32x32/apps/muview.png + -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/icons/hicolor/32x32/apps/ + +install_iconfile16: + @test -d $(INSTALL_ROOT)/usr/share/icons/hicolor/16x16/apps || mkdir -p $(INSTALL_ROOT)/usr/share/icons/hicolor/16x16/apps + -$(INSTALL_FILE) $(CURRENT_DIR)/resources/16x16/muview.png $(INSTALL_ROOT)/usr/share/icons/hicolor/16x16/apps/ + +uninstall_iconfile16: + -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/icons/hicolor/16x16/apps/muview.png + -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/icons/hicolor/16x16/apps/ + +install_pixmap: + @test -d $(INSTALL_ROOT)/usr/share/pixmaps || mkdir -p $(INSTALL_ROOT)/usr/share/pixmaps + -$(INSTALL_FILE) $(CURRENT_DIR)/resources/256x256/muview.png $(INSTALL_ROOT)/usr/share/pixmaps/ + +uninstall_pixmap: + -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/pixmaps/muview.png + -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/pixmaps/ + +install: install_desktopfile install_iconfile512 install_iconfile256 install_iconfile128 install_iconfile64 install_iconfile32 install_iconfile16 install_target install_pixmap + +uninstall: uninstall_desktopfile uninstall_iconfile512 uninstall_iconfile256 uninstall_iconfile128 uninstall_iconfile64 uninstall_iconfile32 uninstall_iconfile16 uninstall_target uninstall_pixmap diff --git a/deploy/deployLinux.sh b/deploy/deployLinux.sh new file mode 100755 index 0000000..f0a43d8 --- /dev/null +++ b/deploy/deployLinux.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +VERSION="2.0b3" +NAME="Muview${VERSION}" + +if [ -e muview ] + then + rm muview +fi +if [ -e "${NAME}.tar.bz" ] + then + rm "${NAME}.tar.bz" +fi +# Kill old product +if [ -d $NAME ] + then + echo "Removing $applicationName" + rm -r $NAME +fi + +cd source +make clean +qmake +cd .. +make clean +qmake +make -j20 + +FILES="muview README.md LICENSE" + +mkdir $NAME +# Copy the install-only makefile to deploy directory +cp deploy/MakefileInstall $NAME/Makefile +# Copy the necessary resources, delete extraneous ones +cp -R source/resources $NAME +rm $NAME/resources/muview.icns $NAME/resources/splash*.png +# Copy the rest of the files +cp $FILES $NAME + +tar -cjvf "${NAME}.tar.bz" $NAME +echo "Done deploying!"