From 79a0dabda75454a27c0998d70dfa04b1d5e51e49 Mon Sep 17 00:00:00 2001 From: Marco Date: Wed, 26 Jun 2019 20:07:52 +0200 Subject: [PATCH] Deploy script fo Linux --- .gitignore | 1 - deploy/Linux/deploy_linux.sh | 30 ++++++++++++++++++++++++++++++ deploy/Windows/deploy_win.bat | 2 +- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 deploy/Linux/deploy_linux.sh diff --git a/.gitignore b/.gitignore index c7dd40d..b951b30 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,5 @@ pyinstaller_cmd.txt themes/.current_theme launch.bat designer.bat -*.sh default_pics/ .vscode/ diff --git a/deploy/Linux/deploy_linux.sh b/deploy/Linux/deploy_linux.sh new file mode 100644 index 0000000..0e152c0 --- /dev/null +++ b/deploy/Linux/deploy_linux.sh @@ -0,0 +1,30 @@ +clear +# Set the correct permissions for Artemis folder +sudo chmod 700 $PWD/../../ +# Download necessary libraries with pip3 +read -p "Install the necessary Python libraries? [Y,N] " doit +case $doit in + y|Y) pip3 install -r requirements_lin.txt --user ;; +esac + +# Generation of shortcut +read -p "Create a desktop shortcut? [Y/N] " doit +case $doit in + y|Y) +cat << EOR > /home/$USER/.local/share/applications/artemis.desktop +#!/usr/bin/env xdg-open +[Desktop Entry] +Name=Artemis +StartupWMClass=artemis3 +Exec=sh -c "cd $PWD/../../ && python3 artemis.py" +Terminal=False +Icon=artemis3 +Type=Application +EOR +sudo cp ./artemis3.svg /usr/share/icons/ + ;; + n|N) ;; + *) echo "invalid option $REPLY";; +esac +echo "" +echo "SETTING COMPLETE!" diff --git a/deploy/Windows/deploy_win.bat b/deploy/Windows/deploy_win.bat index a9f0529..d5fe279 100644 --- a/deploy/Windows/deploy_win.bat +++ b/deploy/Windows/deploy_win.bat @@ -34,7 +34,7 @@ set /p choice=Download necessary Python libraries? [Y]/N if /I '%choice%'=='Y' pip3 install -r %~dp0requirements_win.txt echo: -REM Create a shortcut +REM Generation of shortcut set choice=Y set /p choice=Create a desktop shortcut? [Y]/N if /I '%choice%'=='N' goto end