90 lines
2.1 KiB
Batchfile
90 lines
2.1 KiB
Batchfile
@echo off
|
|
REM Element Desktop Setup Script for Windows
|
|
REM Doppelklick zum Ausführen
|
|
|
|
setlocal enabledelayedexpansion
|
|
|
|
echo ========================================
|
|
echo Element Desktop Konfiguration Setup
|
|
echo ========================================
|
|
echo.
|
|
|
|
REM Config-Verzeichnis
|
|
set APPDATA_PATH=%APPDATA%\Element
|
|
set CONFIG_FILE=%APPDATA_PATH%\config.json
|
|
|
|
REM Erstelle Verzeichnis falls nicht vorhanden
|
|
if not exist "%APPDATA_PATH%" (
|
|
echo Erstelle Element Verzeichnis...
|
|
mkdir "%APPDATA_PATH%"
|
|
)
|
|
|
|
REM Erstelle config.json
|
|
echo Erstelle config.json...
|
|
(
|
|
echo {
|
|
echo "configUrl": "https://axion1337.chat/config.json",
|
|
echo "brand": "aXion1337.Chat",
|
|
echo "default_theme": "aXion1337 Dark",
|
|
echo "show_labs_settings": true,
|
|
echo "features": {
|
|
echo "feature_qr_code_login": true
|
|
echo },
|
|
echo "setting_defaults": {
|
|
echo "custom_themes": []
|
|
echo }
|
|
echo }
|
|
) > "%CONFIG_FILE%"
|
|
|
|
echo Config erstellt: %CONFIG_FILE%
|
|
echo.
|
|
|
|
REM Versuche Element zu installieren/starten
|
|
echo Überprüfe Element Desktop Installation...
|
|
|
|
REM Methode 1: Über Microsoft Store (wenn verfügbar)
|
|
where element >nul 2>nul
|
|
if %ERRORLEVEL% == 0 (
|
|
echo Starte Element Desktop...
|
|
start element
|
|
timeout /t 2 >nul
|
|
echo Done!
|
|
pause
|
|
exit /b 0
|
|
)
|
|
|
|
REM Methode 2: WinGet (Falls installiert)
|
|
winget list --name "Element" >nul 2>nul
|
|
if %ERRORLEVEL% == 0 (
|
|
echo WinGet gefunden. Installiere Element...
|
|
winget install Element.Element --silent
|
|
echo Starte Element...
|
|
timeout /t 3 >nul
|
|
start element
|
|
pause
|
|
exit /b 0
|
|
)
|
|
|
|
REM Methode 3: Chocolatey (Falls installiert)
|
|
choco list element >nul 2>nul
|
|
if %ERRORLEVEL% == 0 (
|
|
echo Chocolatey gefunden. Installiere Element...
|
|
choco install element -y
|
|
echo Starte Element...
|
|
timeout /t 3 >nul
|
|
start element
|
|
pause
|
|
exit /b 0
|
|
)
|
|
|
|
REM Fallback: Manueller Download
|
|
echo.
|
|
echo Element Desktop konnte nicht automatisch installiert werden.
|
|
echo Bitte installiere Element Desktop manuell:
|
|
echo https://element.io/download
|
|
echo.
|
|
echo Deine config.json wurde erstellt unter:
|
|
echo %CONFIG_FILE%
|
|
echo.
|
|
pause
|