chore: init
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
title RuneLite EssentialsPlus Updater
|
||||
color 0B
|
||||
|
||||
echo.
|
||||
echo ========================================================
|
||||
echo RuneLite EssentialsPlus Updater
|
||||
echo ========================================================
|
||||
echo.
|
||||
|
||||
set "SCRIPT_DIR=%~dp0"
|
||||
set "TARGET_JAR=%SCRIPT_DIR%RuneLite.jar"
|
||||
set "OLD_JAR=%SCRIPT_DIR%RuneLite.jar.old"
|
||||
set "TMP_JAR=%SCRIPT_DIR%RuneLite.jar.tmp"
|
||||
set "DOWNLOAD_URL=https://gapspace.de/Hikyu/Runelite-EssentialsPlus/raw/branch/master/RuneLite.jar"
|
||||
|
||||
:: -----------------------------------------------------------
|
||||
:: Schritt 1: Bestehende Version sichern
|
||||
:: -----------------------------------------------------------
|
||||
echo [1/3] Sichere bestehende Version...
|
||||
if exist "%TARGET_JAR%" (
|
||||
if exist "%OLD_JAR%" del /f /q "%OLD_JAR%" 2>nul
|
||||
move /y "%TARGET_JAR%" "%OLD_JAR%" >nul
|
||||
if !errorlevel! equ 0 (
|
||||
echo - Alte Version gesichert als: RuneLite.jar.old
|
||||
) else (
|
||||
echo [!] FEHLER: Konnte RuneLite.jar nicht verschieben.
|
||||
echo Bitte schliesse RuneLite / Bolt Launcher und versuche es erneut.
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
) else (
|
||||
echo - Keine vorherige RuneLite.jar gefunden (Neuinstallation).
|
||||
)
|
||||
|
||||
echo.
|
||||
|
||||
:: -----------------------------------------------------------
|
||||
:: Schritt 2: Neueste Version herunterladen
|
||||
:: -----------------------------------------------------------
|
||||
echo [2/3] Lade neueste Version herunter...
|
||||
echo Quelle: %DOWNLOAD_URL%
|
||||
echo.
|
||||
|
||||
if exist "%TMP_JAR%" del /f /q "%TMP_JAR%" 2>nul
|
||||
|
||||
where curl >nul 2>nul
|
||||
if !errorlevel! equ 0 (
|
||||
curl -# -L -f -o "%TMP_JAR%" "%DOWNLOAD_URL%"
|
||||
) else (
|
||||
echo (Verwende PowerShell fuer Download...)
|
||||
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%TMP_JAR%')"
|
||||
)
|
||||
|
||||
if not exist "%TMP_JAR%" (
|
||||
echo.
|
||||
echo [!] FEHLER: Download fehlgeschlagen!
|
||||
if exist "%OLD_JAR%" (
|
||||
echo Stelle alte Version wieder her...
|
||||
move /y "%OLD_JAR%" "%TARGET_JAR%" >nul
|
||||
)
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Datei fertigstellen
|
||||
move /y "%TMP_JAR%" "%TARGET_JAR%" >nul
|
||||
|
||||
echo.
|
||||
|
||||
:: -----------------------------------------------------------
|
||||
:: Schritt 3: Fertigstellung
|
||||
:: -----------------------------------------------------------
|
||||
echo [3/3] Aktualisierung erfolgreich abgeschlossen!
|
||||
echo - Datei: RuneLite.jar
|
||||
echo.
|
||||
|
||||
:: Optional: Falls im Bolt Launcher Verzeichnis, auch custom-runelite.jar synchronisieren
|
||||
if exist "%LOCALAPPDATA%\bolt-launcher" (
|
||||
copy /y "%TARGET_JAR%" "%LOCALAPPDATA%\bolt-launcher\custom-runelite.jar" >nul 2>nul
|
||||
)
|
||||
if exist "%APPDATA%\bolt-launcher" (
|
||||
copy /y "%TARGET_JAR%" "%APPDATA%\bolt-launcher\custom-runelite.jar" >nul 2>nul
|
||||
)
|
||||
|
||||
color 0A
|
||||
echo ========================================================
|
||||
echo Bereit! Du kannst RuneLite jetzt starten.
|
||||
echo ========================================================
|
||||
echo.
|
||||
pause
|
||||
Reference in New Issue
Block a user