feat: Worker V2 Flet GUI mit Feature-Parität und neuem Installer
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Rippy: Nativer Windows-Transcode-Worker - Installation OHNE Docker.
|
||||
# Rippy: Nativer Windows-Transcode-Worker - Installation OHNE Docker.
|
||||
#
|
||||
# Was das Skript tut (alles nach -InstallDir, Standard "C:\Program Files\Rippy Worker"):
|
||||
# 1. Prüft Python (3.10+), legt ein venv an, installiert die Abhängigkeiten
|
||||
@@ -190,10 +190,10 @@ venv\Scripts\celery.exe -A celery_app worker --loglevel=info -Q transcode $poolA
|
||||
"@
|
||||
Set-Content -Path "start-worker.bat" -Value $bat -Encoding ASCII
|
||||
|
||||
# 7. Tray-Start (empfohlen): Symbol neben der Uhr, kein Konsolenfenster
|
||||
# 7. GUI-Start (empfohlen): Modernes natives Fenster, kein Konsolenfenster
|
||||
$trayBat = @"
|
||||
@echo off
|
||||
rem Rippy-Worker mit Tray-Symbol - verbindet sich mit $RippyHost
|
||||
rem Rippy-Worker GUI - verbindet sich mit $RippyHost
|
||||
cd /d "%~dp0"
|
||||
set REDIS_URL=redis://${RippyHost}:6379/0
|
||||
set DATABASE_URL=postgresql://rippy:rippy@${RippyHost}:5432/rippy
|
||||
@@ -203,10 +203,10 @@ set RIPPY_TRAY_HOST=$RippyHost
|
||||
set RIPPY_SLOTS=$Slots
|
||||
set TZ=UTC
|
||||
${mapZeile}set PATH=%~dp0;%PATH%
|
||||
start "" venv\Scripts\pythonw.exe tray.py
|
||||
start "" venv\Scripts\pythonw.exe gui.py
|
||||
"@
|
||||
Set-Content -Path "start-tray.bat" -Value $trayBat -Encoding ASCII
|
||||
Write-Host "start-worker.bat + start-tray.bat erzeugt."
|
||||
Set-Content -Path "start-gui.bat" -Value $trayBat -Encoding ASCII
|
||||
Write-Host "start-worker.bat + start-gui.bat erzeugt."
|
||||
|
||||
# 8. Deinstaller - MUSS-Kriterium: rückstandsfrei entfernbar
|
||||
$uninstall = @"
|
||||
@@ -245,7 +245,7 @@ if (-not `$schreibbar -and -not `$istAdmin) {
|
||||
}
|
||||
|
||||
Get-CimInstance Win32_Process | Where-Object {
|
||||
`$_.ExecutablePath -like "`$PSScriptRoot*"
|
||||
`$_.ExecutablePath -like "`$PSScriptRoot*" -or `$_.CommandLine -like "*gui.py*" -or `$_.CommandLine -like "*tray.py*"
|
||||
} | ForEach-Object { Stop-Process -Id `$_.ProcessId -Force -ErrorAction SilentlyContinue }
|
||||
Start-Sleep 2
|
||||
# Autostart-Verknüpfung entfernen - BEIDE möglichen Orte, weil die
|
||||
@@ -324,23 +324,21 @@ if ($Autostart) {
|
||||
# eine Warnung; der Worker läuft davon unberührt.
|
||||
if (-not $KeineDesktopVerknuepfung) {
|
||||
try {
|
||||
$programme = [Environment]::GetFolderPath("ProgramFiles")
|
||||
$maschinenweit = $ziel.StartsWith($programme, "OrdinalIgnoreCase")
|
||||
$desktopDir = if ($maschinenweit) {
|
||||
[Environment]::GetFolderPath("CommonDesktopDirectory")
|
||||
if ($KeineDesktopVerknuepfung) {
|
||||
Write-Host "Desktop-Verknüpfung auf Wunsch übersprungen."
|
||||
} else {
|
||||
[Environment]::GetFolderPath("Desktop")
|
||||
$desktop = Join-Path ([Environment]::GetFolderPath("Desktop")) "Rippy Worker.lnk"
|
||||
$wshell = New-Object -ComObject WScript.Shell
|
||||
$shortcut = $wshell.CreateShortcut($desktop)
|
||||
$shortcut.TargetPath = (Join-Path $ziel "start-gui.bat")
|
||||
$shortcut.WorkingDirectory = $ziel
|
||||
$shortcut.WindowStyle = 7
|
||||
if (Test-Path (Join-Path $ziel "rippy.ico")) {
|
||||
$shortcut.IconLocation = (Join-Path $ziel "rippy.ico")
|
||||
}
|
||||
$shortcut.Save()
|
||||
Write-Host "Desktop-Verknüpfung 'Rippy Worker' erstellt."
|
||||
}
|
||||
$wsh = New-Object -ComObject WScript.Shell
|
||||
$lnk = $wsh.CreateShortcut((Join-Path $desktopDir "Rippy Worker.lnk"))
|
||||
$lnk.TargetPath = (Join-Path $ziel "start-tray.bat")
|
||||
$lnk.WorkingDirectory = $ziel
|
||||
$lnk.Description = "Rippy Encoding-Worker starten (Symbol neben der Uhr)"
|
||||
$lnk.WindowStyle = 7
|
||||
$ico = Join-Path $ziel "rippy.ico"
|
||||
if (Test-Path $ico) { $lnk.IconLocation = $ico }
|
||||
$lnk.Save()
|
||||
Write-Host "Verknüpfung 'Rippy Worker' auf dem Desktop angelegt."
|
||||
} catch {
|
||||
Write-Host "HINWEIS: Desktop-Verknüpfung ging nicht ($($_.Exception.Message))." -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user