diff --git a/README.md b/README.md index 6a4ac6f..0f21e02 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Automatischer Windows VServer Setup Installer. Installiert alle benoetigten Programme und Konfigurationen auf einem frischen Windows Server 2022. +Alle Downloads kommen von der eigenen Gitea-Instanz (git.24-music.de) oder offiziellen Quellen — keine Abhaengigkeit von streamerware.de mehr. + ## Was wird installiert? | # | Programm | Quelle | @@ -9,20 +11,20 @@ Automatischer Windows VServer Setup Installer. Installiert alle benoetigten Prog | 1 | Python 3.12.4 | python.org | | 2 | FFmpeg (+ PATH) | gyan.dev | | 3 | WinRAR | win-rar.com | -| 4 | G-Earth | streamerware.de | +| 4 | G-Earth | Gitea: G-Earth | | 5 | VLC Media Player | ftp.fau.de | | 6 | Java 8 (Temurin) | GitHub/Adoptium | | 7 | .NET Framework 4.8 | Microsoft | -| 8 | .NET 6.0 Desktop Runtime | streamerware.de | -| 9 | .NET 8.0 Desktop Runtime | streamerware.de | +| 8 | .NET 6.0 Desktop Runtime | Gitea: dotnet-runtimes | +| 9 | .NET 8.0 Desktop Runtime | Gitea: dotnet-runtimes | | 10 | Google Chrome | Google | -| 11 | Habbo Launcher | streamerware.de | -| 12 | JDownloader 2 + Backup | streamerware.de | -| 13 | Desktop-Ordner (Fertig/Unfertig) + File-Uploader | streamerware.de | -| 14 | Scripte (Rename MKV AVI etc.) | streamerware.de | -| 15 | Twitch VOD Manager | Gitea (latest Release) | -| 16 | Multi-Hoster-Upload | Gitea (latest Release) | -| 17 | Real-Debrid-Downloader | Gitea (latest Release) | +| 11 | Habbo Launcher | Gitea: Habbo-Launcher | +| 12 | JDownloader 2 + Backup | Gitea: JDownloader-Setup | +| 13 | Desktop-Ordner (Fertig/Unfertig) + File-Uploader | Gitea: File-Uploader | +| 14 | Scripte (Rename MKV AVI etc.) | Gitea: xabbo-scripts | +| 15 | Twitch VOD Manager | Gitea: Twitch-VOD-Manager | +| 16 | Multi-Hoster-Upload | Gitea: Multi-Hoster-Upload | +| 17 | Real-Debrid-Downloader | Gitea: real-debrid-downloader | ## Windows-Einstellungen @@ -33,6 +35,22 @@ Automatischer Windows VServer Setup Installer. Installiert alle benoetigten Prog - Windows Update dauerhaft deaktiviert (Services + Registry Policy) - Energiesparplan auf Hoechstleistung +## Gitea Repos + +Alle eigenen Tools werden ueber die Gitea API (latest Release) geladen: + +| Repo | Inhalt | +|------|--------| +| [G-Earth](https://git.24-music.de/Administrator/G-Earth) | Habbo Packet Interceptor | +| [Habbo-Launcher](https://git.24-music.de/Administrator/Habbo-Launcher) | Habbo Hotel Launcher | +| [JDownloader-Setup](https://git.24-music.de/Administrator/JDownloader-Setup) | JD2 Installer + Config Backup | +| [File-Uploader](https://git.24-music.de/Administrator/File-Uploader) | File-Uploader fuer Desktop | +| [xabbo-scripts](https://git.24-music.de/Administrator/xabbo-scripts) | Xabbo Scripte | +| [dotnet-runtimes](https://git.24-music.de/Administrator/dotnet-runtimes) | .NET 6.0 + 8.0 Desktop Runtime | +| [Twitch-VOD-Manager](https://git.24-music.de/Administrator/Twitch-VOD-Manager) | Twitch VOD Manager | +| [Multi-Hoster-Upload](https://git.24-music.de/Administrator/Multi-Hoster-Upload) | Multi-Hoster Upload Tool | +| [real-debrid-downloader](https://git.24-music.de/Administrator/real-debrid-downloader) | Real-Debrid Downloader | + ## Benutzung ### PowerShell Script direkt ausfuehren @@ -41,12 +59,7 @@ Automatischer Windows VServer Setup Installer. Installiert alle benoetigten Prog .\VServerSetup.ps1 ``` -### Kompilierte EXE -Die `VServerSetup-online-console.exe` kann direkt auf dem Server ausgefuehrt werden (als Admin). -**Hinweis:** Die EXE ist eine aeltere Version — das PS1-Script ist aktueller. - ## Dateien - `VServerSetup.ps1` - Hauptscript (Quellcode) -- `jdownloader-backup.zip` - JDownloader 2 Konfiguration/Accounts -- `VServerSetup-online-console.exe` - Kompilierte Version (veraltet) +- `jdownloader-backup.zip` - JDownloader 2 Konfiguration/Accounts (auch auf Gitea) diff --git a/VServerSetup.ps1 b/VServerSetup.ps1 index cb29f2b..61400d2 100644 --- a/VServerSetup.ps1 +++ b/VServerSetup.ps1 @@ -43,6 +43,19 @@ function Unrar-File { } } +function Get-Gitea-Latest-Asset { + param($Repo, $Filter) + $releaseApi = "https://git.24-music.de/api/v1/repos/Administrator/$Repo/releases?limit=1" + $wc = New-Object System.Net.WebClient + $wc.Headers.Add("User-Agent", "Mozilla/5.0") + $release = ($wc.DownloadString($releaseApi) | ConvertFrom-Json)[0] + $asset = $release.assets | Where-Object { $_.name -like $Filter -and $_.name -notlike "*.blockmap" } | Select-Object -First 1 + if ($asset) { + Write-Host " Version: $($release.tag_name)" -ForegroundColor Gray + } + return $asset +} + function Install-Gitea-App { param($Name, $Repo, $StepNum, $DetectPaths, $ProcessName) Write-Host "" @@ -57,18 +70,12 @@ function Install-Gitea-App { try { Write-Host " Hole neueste Version von Gitea..." -ForegroundColor Gray - $releaseApi = "https://git.24-music.de/api/v1/repos/Administrator/$Repo/releases?limit=1" - $wc = New-Object System.Net.WebClient - $wc.Headers.Add("User-Agent", "Mozilla/5.0") - $release = $wc.DownloadString($releaseApi) | ConvertFrom-Json - $setupAsset = $release[0].assets | Where-Object { $_.name -like "*Setup*.exe" -and $_.name -notlike "*.blockmap" } | Select-Object -First 1 - if ($setupAsset) { - $installer = "$tempDir\$($setupAsset.name)" - Write-Host " Version: $($release[0].tag_name)" -ForegroundColor Gray - if (Download-File -Url $setupAsset.browser_download_url -Output $installer) { + $asset = Get-Gitea-Latest-Asset -Repo $Repo -Filter "*Setup*.exe" + if ($asset) { + $installer = "$tempDir\$($asset.name)" + if (Download-File -Url $asset.browser_download_url -Output $installer) { Write-Host " Installiere $Name (silent)..." -ForegroundColor Gray Start-Process -FilePath $installer -ArgumentList "/S" -Wait - # Electron-Apps starten manchmal nach Installation - beenden damit Setup weiterlaeuft if ($ProcessName) { Start-Sleep -Seconds 3 Stop-Process -Name $ProcessName -Force -ErrorAction SilentlyContinue @@ -235,9 +242,9 @@ $net6Installed = (Test-Path "C:\Program Files\dotnet\shared\Microsoft.WindowsDes if ($net6Installed) { Write-Host " Bereits installiert - ueberspringe." -ForegroundColor Gray } else { - $net6Url = "https://streamerware.de/windowsdesktop-runtime-6.0.36-win-x64.exe" $net6Installer = "$tempDir\dotnet6-desktop.exe" - if (Download-File -Url $net6Url -Output $net6Installer) { + $net6Asset = Get-Gitea-Latest-Asset -Repo "dotnet-runtimes" -Filter "*6.0*" + if ($net6Asset -and (Download-File -Url $net6Asset.browser_download_url -Output $net6Installer)) { Write-Host " Installiere .NET 6.0 Desktop Runtime (silent)..." -ForegroundColor Gray Start-Process -FilePath $net6Installer -ArgumentList "/install", "/quiet", "/norestart" -Wait Write-Host " .NET 6.0 Desktop Runtime installiert!" -ForegroundColor Green @@ -251,9 +258,9 @@ $net8Installed = (Test-Path "C:\Program Files\dotnet\shared\Microsoft.WindowsDes if ($net8Installed) { Write-Host " Bereits installiert - ueberspringe." -ForegroundColor Gray } else { - $net8Url = "https://streamerware.de/windowsdesktop-runtime-8.0.23-win-x64.exe" $net8Installer = "$tempDir\dotnet8-desktop.exe" - if (Download-File -Url $net8Url -Output $net8Installer) { + $net8Asset = Get-Gitea-Latest-Asset -Repo "dotnet-runtimes" -Filter "*8.0*" + if ($net8Asset -and (Download-File -Url $net8Asset.browser_download_url -Output $net8Installer)) { Write-Host " Installiere .NET 8.0 Desktop Runtime (silent)..." -ForegroundColor Gray Start-Process -FilePath $net8Installer -ArgumentList "/install", "/quiet", "/norestart" -Wait Write-Host " .NET 8.0 Desktop Runtime installiert!" -ForegroundColor Green @@ -276,23 +283,11 @@ if ($chromeInstalled) { } } -# 11. HABBO LAUNCHER -Write-Host "" -Write-Host "[11/$totalSteps] Habbo Launcher..." -ForegroundColor Yellow -$habboInstalled = (Test-Path "$env:LOCALAPPDATA\Programs\habbo-launcher\Habbo Launcher.exe") -or (Test-Path "C:\Program Files\Habbo Launcher\*") -if ($habboInstalled) { - Write-Host " Bereits installiert - ueberspringe." -ForegroundColor Gray -} else { - $habboUrl = "https://streamerware.de/HabboLauncher-Setup-1.0.80.exe" - $habboInstaller = "$tempDir\HabboLauncher-Setup.exe" - if (Download-File -Url $habboUrl -Output $habboInstaller) { - Write-Host " Installiere Habbo Launcher (silent)..." -ForegroundColor Gray - Start-Process -FilePath $habboInstaller -ArgumentList "/S" -Wait - Start-Sleep -Seconds 3 - Stop-Process -Name "Habbo Launcher" -Force -ErrorAction SilentlyContinue - Write-Host " Habbo Launcher installiert!" -ForegroundColor Green - } -} +# 11. HABBO LAUNCHER (von Gitea) +Install-Gitea-App -Name "Habbo Launcher" -Repo "Habbo-Launcher" ` + -StepNum 11 ` + -DetectPaths @("$env:LOCALAPPDATA\Programs\habbo-launcher\Habbo Launcher.exe", "C:\Program Files\Habbo Launcher\*") ` + -ProcessName "Habbo Launcher" # 12. JDOWNLOADER Write-Host "" @@ -310,9 +305,10 @@ foreach ($p in $jdDetectPaths) { if ($jdPath) { Write-Host " Bereits installiert - ueberspringe." -ForegroundColor Gray } else { - $jdUrl = "https://streamerware.de/JDownloader2Setup_windows-amd64_v21_0_7.exe" + # JDownloader Installer von Gitea holen + $jdAsset = Get-Gitea-Latest-Asset -Repo "JDownloader-Setup" -Filter "*Setup*.exe" $jdInstaller = "$tempDir\JDownloader2Setup.exe" - if (Download-File -Url $jdUrl -Output $jdInstaller) { + if ($jdAsset -and (Download-File -Url $jdAsset.browser_download_url -Output $jdInstaller)) { Write-Host " Installiere JDownloader (silent)..." -ForegroundColor Gray # NICHT -Wait benutzen! Der JD-Installer (install4j) startet JDownloader nach # der Installation und wartet bis JD geschlossen wird. -Wait wuerde das Script @@ -361,11 +357,20 @@ if ($jdPath) { } else { Write-Host " Importiere JD2-Backup..." -ForegroundColor Cyan Write-Host " Ziel: $jdPath" -ForegroundColor Gray + # Backup zuerst lokal suchen, dann von Gitea laden $scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path $backupZip = Join-Path $scriptDir "jdownloader-backup.zip" if (-not (Test-Path $backupZip)) { - Write-Host " WARNUNG: jdownloader-backup.zip nicht neben dem Script gefunden" -ForegroundColor Yellow - Write-Host " Erwarte Datei in: $scriptDir" -ForegroundColor Yellow + Write-Host " Lade Backup von Gitea..." -ForegroundColor Gray + $backupZip = "$tempDir\jdownloader-backup.zip" + try { + $backupAsset = Get-Gitea-Latest-Asset -Repo "JDownloader-Setup" -Filter "*backup*.zip" + if ($backupAsset) { + Download-File -Url $backupAsset.browser_download_url -Output $backupZip | Out-Null + } + } catch { + Write-Host " WARNUNG: Backup konnte nicht von Gitea geladen werden" -ForegroundColor Yellow + } } if (Test-Path $backupZip) { try { @@ -397,10 +402,12 @@ foreach ($folder in @("Fertig", "Unfertig")) { if (Test-Path "$desktopPath\File-Uploader") { Write-Host " File-Uploader bereits vorhanden - ueberspringe." -ForegroundColor Gray } else { - Write-Host " Lade File-Uploader vom Server..." -ForegroundColor Gray - $fileUploaderUrl = "https://streamerware.de/FileUploader.rar" + Write-Host " Hole File-Uploader von Gitea..." -ForegroundColor Gray + try { + $fuAsset = Get-Gitea-Latest-Asset -Repo "File-Uploader" -Filter "*.rar" + } catch { $fuAsset = $null } $uploaderRar = "$tempDir\FileUploader.rar" - if (Download-File -Url $fileUploaderUrl -Output $uploaderRar) { + if ($fuAsset -and (Download-File -Url $fuAsset.browser_download_url -Output $uploaderRar)) { if (Unrar-File -RarPath $uploaderRar -DestPath $desktopPath) { Write-Host " File-Uploader installiert!" -ForegroundColor Green } @@ -413,9 +420,11 @@ Write-Host "[14/$totalSteps] Scripte..." -ForegroundColor Yellow if (Test-Path "$desktopPath\Rename MKV AVI.py") { Write-Host " Bereits vorhanden - ueberspringe." -ForegroundColor Gray } else { - $scripteUrl = "https://streamerware.de/Scripte.rar" + try { + $scriptAsset = Get-Gitea-Latest-Asset -Repo "xabbo-scripts" -Filter "*.rar" + } catch { $scriptAsset = $null } $scripteRar = "$tempDir\Scripte.rar" - if (Download-File -Url $scripteUrl -Output $scripteRar) { + if ($scriptAsset -and (Download-File -Url $scriptAsset.browser_download_url -Output $scripteRar)) { Write-Host " Entpacke Scripte auf Desktop..." -ForegroundColor Gray if (Unrar-File -RarPath $scripteRar -DestPath $desktopPath) { Write-Host " Scripte installiert!" -ForegroundColor Green