rem ------------------------------------------------------------
rem Installationsroutine
rem ------------------------------------------------------------

rem --- Option: Download in ein temporäres Verzeichnis
rem --- Kann für z.B. für GLPI abgeschaltet werden
set SAVEPATH=%SYSTEMDRIVE%\TEMP\install
MKDIR %SAVEPATH% & CD /D %SAVEPATH%

rem --- Download Basis-URL, Dateiname und TEMP-Verzeichnis
set VERS=1.2.4
set BASEURL=https://github.com/xournalpp/xournalpp/releases/download/v%VERS%
set PROG=xournalpp-%VERS%-windows.zip

rem --- Lade Installationsdatei herunter
curl -kL %BASEURL%/%PROG% -o %SAVEPATH%\%PROG%

rem --- Entpacke .ZIP
powershell.exe -command "Expand-Archive -Force -Path %PROG% -DestinationPath . "

rem --- Silent-Installation des Programms:
xournalpp-%VERS%-windows.exe /S


rem --- Installiere C++ Redistibutable
rem set BASEURL=https://support.ostrachhelp.de/OstrachHELP/setup_windows/raw/branch/main/essentiell
rem set PROG=VC_redist.x64.exe
rem curl -kL %BASEURL%/%PROG% -o %SAVEPATH%\%PROG% & %PROG% /Q

rem ---- Beispiele ---------------------------------------------
rem %PROG% /S
rem %PROG% /VERYSILENT /NORESTART /ALLUSERS
rem %PROG% /install /quiet /norestart
rem %SYSTEMDRIVE%\windows\system32\msiexec /i "%PROG%" /passive /l %SAVEPATH%\%PROG%.log 
