Merge remote-tracking branch 'origin/build_scripts'

This commit is contained in:
Marco
2019-07-05 23:11:25 +02:00
6 changed files with 169 additions and 0 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -0,0 +1,47 @@
clear
echo "
===================================
Artemis 3 Deploy Script
LINUX
===================================
"
# Set the correct permissions for Artemis folder
echo "Gaining admin privileges and set folder read/write permission..."
echo ""
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 > log;;
esac
# Generation of shortcut
echo ""
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/
echo "
Link copied in: /home/$USER/.local/share/applications/artemis.desktop
Icon copied in: /usr/share/icons/artemis3.svg
"
;;
n|N) ;;
*) echo "invalid option $REPLY";;
esac
echo "
================================
SETTING COMPLETE
================================
"

View File

@@ -0,0 +1,7 @@
pandas>=0.24.2
certifi>=2019.6.16
aiohttp>=3.5.4
pygame>=1.9.6
QtAwesome>=0.5.7
urllib3>=1.25.3
PyQt5>=5.12.3

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

View File

@@ -0,0 +1,69 @@
@echo off
echo ===================================
echo Artemis 3 Deploy Script
echo WINDOWS
echo ===================================
REM Check and gain admin permissions
IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
) ELSE (
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
)
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params= %*
echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /B
:gotAdmin
pushd "%CD%"
CD /D "%~dp0"
echo:
REM Set the correct permissions for Artemis folder
set artemis_path=%~dp0..\..
icacls "%artemis_path%" /grant %USERNAME%:(OI)(CI)F /T > log
echo Gaining admin privileges and set folder read/write permission... DONE!
REM Download necessary libraries with pip3
echo:
set choice=Y
set /p choice=Install the necessary Python libraries? [Y,N]...
echo:
if /I '%choice%'=='Y' pip3 install -r %~dp0requirements_win.txt --no-color >> log
REM Generation of shortcut
echo:
set choice=Y
set /p choice=Create a desktop shortcut? [Y/N]...
if /I '%choice%'=='N' goto end
IF EXIST "%artemis_path%\Artemis.py" (
ren "%artemis_path%\Artemis.py" "Artemis.pyw"
)
echo Set oWS = WScript.CreateObject("WScript.Shell") > CreateShortcut.vbs
echo sLinkFile = "%USERPROFILE%\Desktop\Artemis.lnk" >> CreateShortcut.vbs
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> CreateShortcut.vbs
echo oLink.TargetPath = "%artemis_path%\Artemis.pyw" >> CreateShortcut.vbs
echo oLink.WorkingDirectory = "%artemis_path%" >> CreateShortcut.vbs
echo oLink.IconLocation = "%~dp0artemis3.ico" >> CreateShortcut.vbs
echo oLink.Save >> CreateShortcut.vbs
cscript /nologo CreateShortcut.vbs
del CreateShortcut.vbs
:end
echo:
echo ================================
echo SETTING COMPLETE
echo ================================
echo:
pause

View File

@@ -0,0 +1,7 @@
pandas>=0.24.2
certifi>=2019.6.16
aiohttp>=3.5.4
pygame>=1.9.6
QtAwesome>=0.5.7
urllib3>=1.25.3
PyQt5>=5.12.3