feat(installer): kein Konsolenfenster (.vbs-Starter) + Rippy-Icon im Installer-Fenster
Ampel / ampel (push) Successful in 28s
Ampel / ampel (push) Successful in 28s
Commander-Wunsch: kein Konsolenfenster + Icon. - Starter ist jetzt eine .vbs (statt .bat): wscript startet PowerShell mit Fensterstil 0 = KOMPLETT versteckt, kein Konsolenfenster. Nur das WinForms-Installer-Fenster erscheint. Download-Datei: rippy-worker-setup.vbs (weiter CLIENT-seitig mit eingetragener LAN-IP erzeugt). - install-gui.ps1: Fenster-Icon = Rippy-Disc (zur Laufzeit gezeichnet, Indigo-Kreis + weisses Loch) — erscheint in Titelleiste + Taskleiste. (Die Datei selbst kann Windows-bedingt kein Icon tragen — nur .exe/.lnk.) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -91,28 +91,28 @@ export default function WorkerVerwaltung() {
|
||||
})
|
||||
}
|
||||
|
||||
// Grafischer Installer: erzeugt eine .bat CLIENT-seitig mit der eingetragenen
|
||||
// LAN-IP (der Browser kennt sie, die API nicht sicher). Doppelklick lädt den
|
||||
// WinForms-Installer von Rippy und startet ihn — kein CLI mehr.
|
||||
// Grafischer Installer: erzeugt eine .vbs CLIENT-seitig mit der eingetragenen
|
||||
// LAN-IP (der Browser kennt sie, die API nicht sicher). Doppelklick startet
|
||||
// via wscript PowerShell KOMPLETT VERSTECKT (kein Konsolenfenster) und lädt
|
||||
// den WinForms-Installer von Rippy — nur das Installer-Fenster erscheint.
|
||||
const guiInstallerHerunterladen = () => {
|
||||
const host = rippyHost.trim()
|
||||
if (!host) { toast('error', 'Erst die LAN-IP der Rippy-Maschine eintragen'); return }
|
||||
const psInner = `try { Invoke-WebRequest 'http://${host}/api/worker-setup/windows-gui' -OutFile ($env:TEMP + '\\rippy-gui.ps1') -UseBasicParsing; & ($env:TEMP + '\\rippy-gui.ps1') -RippyHost '${host}' } catch { Write-Host $_.Exception.Message -ForegroundColor Red; Read-Host 'Fehler - Enter zum Schliessen' }`
|
||||
const bat = [
|
||||
'@echo off',
|
||||
'title Rippy Worker Setup',
|
||||
'echo.',
|
||||
`echo Starte grafischen Rippy-Worker-Installer von ${host} ...`,
|
||||
'echo.',
|
||||
`powershell -NoProfile -ExecutionPolicy Bypass -STA -Command "${psInner}"`,
|
||||
const ps = `try { Invoke-WebRequest 'http://${host}/api/worker-setup/windows-gui' -OutFile ($env:TEMP + '\\rippy-gui.ps1') -UseBasicParsing; & ($env:TEMP + '\\rippy-gui.ps1') -RippyHost '${host}' } catch { Add-Type -AssemblyName System.Windows.Forms; [void][System.Windows.Forms.MessageBox]::Show($_.Exception.Message, 'Rippy Installer') }`
|
||||
// VBScript verdoppelt innere Anführungszeichen; Fensterstil 0 = versteckt
|
||||
const psEscaped = ps.replace(/"/g, '""')
|
||||
const vbs = [
|
||||
"' Rippy Encoding-Worker - grafische Installation (ohne Konsolenfenster)",
|
||||
'Set sh = CreateObject("WScript.Shell")',
|
||||
`sh.Run "powershell -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -STA -Command ""${psEscaped}""", 0, False`,
|
||||
].join('\r\n')
|
||||
const blob = new Blob([bat], { type: 'application/octet-stream' })
|
||||
const blob = new Blob([vbs], { type: 'application/octet-stream' })
|
||||
const a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = 'rippy-worker-setup.bat'
|
||||
a.download = 'rippy-worker-setup.vbs'
|
||||
document.body.appendChild(a); a.click(); a.remove()
|
||||
URL.revokeObjectURL(a.href)
|
||||
toast('success', 'rippy-worker-setup.bat heruntergeladen — doppelklicken zum Installieren')
|
||||
toast('success', 'rippy-worker-setup.vbs heruntergeladen — doppelklicken zum Installieren')
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -232,11 +232,12 @@ export default function WorkerVerwaltung() {
|
||||
Fenster ausfüllen, „Installieren". Braucht nur Python 3.10+ auf dem PC — kein Docker, kein git.
|
||||
</p>
|
||||
<Button variant="amber" onClick={guiInstallerHerunterladen} disabled={!rippyHost.trim()}>
|
||||
<Download size={16} /> Grafischen Installer herunterladen (.bat)
|
||||
<Download size={16} /> Grafischen Installer herunterladen
|
||||
</Button>
|
||||
<p className="text-xs text-slate-500 dark:text-slate-400">
|
||||
Windows warnt beim Doppelklick evtl. („Windows hat Ihren PC geschützt") → „Weitere Informationen"
|
||||
→ „Trotzdem ausführen". Die .bat lädt den Installer nur von deiner Rippy-Maschine.
|
||||
Öffnet direkt das Installer-Fenster — kein Konsolenfenster. Windows warnt beim Doppelklick evtl.
|
||||
(„Windows hat Ihren PC geschützt") → „Weitere Informationen" → „Trotzdem ausführen". Die Datei
|
||||
lädt den Installer nur von deiner Rippy-Maschine.
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user