diff --git a/windows/README.md b/windows/README.md index 0ce3b6d..9849fa4 100644 --- a/windows/README.md +++ b/windows/README.md @@ -37,8 +37,10 @@ not assumed: | `node.exe` (v24.22.2) | only Windows system DLLs (`KERNEL32`, `ADVAPI32`, `WS2_32`, `CRYPT32`, `USER32`, …) — statically linked C runtime, so **no Visual C++ Redistributable** | | `libvips-42.dll` + `sharp` | the Universal C Runtime (`api-ms-win-crt-*`), included in Windows 10/11; older Windows needs KB2999226 | | `libraw.wasm` | a browser with WebAssembly | -| launcher (`.cmd`/`.vbs`) | Windows PowerShell 5.1, included in Windows 10/11 | -| Develop module | a current browser with WebGL2 (Edge, Chrome, Firefox) | +| `Luminary.exe` launcher | only Windows system DLLs; no PowerShell, no Windows Script Host | +| launcher (`.cmd`/`.vbs` fallback) | Windows PowerShell 5.1, included in Windows 10/11 | +| `LuminaryWindow.exe` | the Microsoft Edge WebView2 runtime that ships with Windows 10/11 (window engine only; no browser UI, profile or account) | +| Develop module | WebGL2, provided by WebView2 (or by the fallback browser) | So: a clean Windows 10/11 x64 machine, a browser, and ~250 MB where the data folder lives. No VC++ redist, no .NET, no admin prompt. The setup exe installs diff --git a/windows/build.mjs b/windows/build.mjs index 98d791d..d8e60e9 100644 --- a/windows/build.mjs +++ b/windows/build.mjs @@ -445,6 +445,19 @@ function writeVersion(bundle, pkg, launcher, nodeVersion, nodeHash, nodeSize) { function writeBundleReadme(bundle, info) { const start = info.launcher === 'go' ? 'Luminary.exe' : 'Luminary.cmd (or Luminary.vbs for no console window)'; + const windowLine = info.nativeWindow + ? 'Window: opens in its own window: no browser, no tabs, no address bar, and\n' + + ' no Edge profile or Microsoft account' + : 'Window: opens in a chromeless Edge/Chrome window; "Luminary.cmd -Browser"\n' + + ' for a normal tab'; + const windowRequirement = info.nativeWindow + ? ' - The Microsoft Edge WebView2 runtime, which Windows 10 and 11 install with\n' + + ' Edge. It is the window engine only: no browser is opened and no Edge\n' + + ' profile, account or synced settings are used. If it is missing the window\n' + + ' says so and links to the one-time download.\n' + + ' - WebGL2 for the Develop module (WebView2 provides it).' + : ' - A current browser (Edge, Chrome or Firefox) with WebGL2 for the Develop\n' + + ' module.'; const body = `Luminary ${info.version} for Windows (x64) — portable bundle ================================================= @@ -458,13 +471,11 @@ Repair: "Luminary.cmd -Repair" downloads node.exe again and verifies its sha Sign-in: none — single-user desktop mode, no account setup Network: not needed — the app and its service run on this PC, so it starts and runs with the network disconnected -Window: opens in its own window (native when bundled, else chromeless Edge/Chrome); - "Luminary.cmd -Browser" for a normal tab +${windowLine} Requirements - Windows 10 or 11, 64-bit. - - A current browser (Edge, Chrome or Firefox) with WebGL2 for the Develop - module. +${windowRequirement} - Nothing else. Node.js is included as node.exe, and no .NET, Visual C++ Redistributable, admin rights or installer is needed. - About 250 MB free where the data folder lives. @@ -782,7 +793,7 @@ async function main() { } const info = writeVersion(bundle, pkg, launcher, options.node, node.hash, statSync(bundledNode).size); - writeBundleReadme(bundle, { ...info, launcher }); + writeBundleReadme(bundle, { ...info, launcher, nativeWindow: Boolean(options.webview2) }); const zipPath = path.join(options.out, `Luminary-${pkg.version}-win-x64.zip`); rmSync(zipPath, { force: true }); diff --git a/windows/installer.nsi b/windows/installer.nsi index b1147f2..8af7e48 100644 --- a/windows/installer.nsi +++ b/windows/installer.nsi @@ -81,11 +81,19 @@ VIAddVersionKey "LegalCopyright" "MIT licensed" !define MUI_FINISHPAGE_SHOWREADME_TEXT "Show the Windows readme" !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED -!if /FileExists "${SOURCE_DIR}/Luminary.vbs" - !define MUI_FINISHPAGE_RUN "$INSTDIR\Luminary.vbs" +; The native launcher first: it needs no Windows Script Host (which group +; policy can disable, leaving "Start Luminary" doing nothing) and opens no +; console. The .vbs, then the .cmd, are only fallbacks for old bundles. +!if /FileExists "${SOURCE_DIR}/Luminary.exe" + !define APP_LAUNCH "$INSTDIR\Luminary.exe" !else - !define MUI_FINISHPAGE_RUN "$INSTDIR\Luminary.cmd" + !if /FileExists "${SOURCE_DIR}/Luminary.vbs" + !define APP_LAUNCH "$INSTDIR\Luminary.vbs" + !else + !define APP_LAUNCH "$INSTDIR\Luminary.cmd" + !endif !endif +!define MUI_FINISHPAGE_RUN "${APP_LAUNCH}" !define MUI_FINISHPAGE_RUN_TEXT "Start ${APP_NAME}" !insertmacro MUI_PAGE_WELCOME @@ -143,12 +151,12 @@ Section "Luminary (required)" SEC_MAIN WriteUninstaller "$INSTDIR\Uninstall.exe" CreateDirectory "$SMPROGRAMS\Luminary" - !if /FileExists "${SOURCE_DIR}/Luminary.vbs" - CreateShortCut "$SMPROGRAMS\Luminary\Luminary.lnk" "$INSTDIR\Luminary.vbs" "" "$INSTDIR\Luminary.ico" 0 + CreateShortCut "$SMPROGRAMS\Luminary\Luminary.lnk" "${APP_LAUNCH}" "" "$INSTDIR\Luminary.ico" 0 + !if /FileExists "${SOURCE_DIR}/Luminary.exe" + CreateShortCut "$SMPROGRAMS\Luminary\Stop Luminary.lnk" "$INSTDIR\Luminary.exe" "-Stop" "$INSTDIR\Luminary.ico" 0 !else - CreateShortCut "$SMPROGRAMS\Luminary\Luminary.lnk" "$INSTDIR\Luminary.cmd" "" "$INSTDIR\Luminary.ico" 0 + CreateShortCut "$SMPROGRAMS\Luminary\Stop Luminary.lnk" "$INSTDIR\Stop Luminary.cmd" "" "$INSTDIR\Luminary.ico" 0 !endif - CreateShortCut "$SMPROGRAMS\Luminary\Stop Luminary.lnk" "$INSTDIR\Stop Luminary.cmd" "" "$INSTDIR\Luminary.ico" 0 CreateShortCut "$SMPROGRAMS\Luminary\Luminary data folder.lnk" "$LOCALAPPDATA\Luminary\data" "" "$INSTDIR\Luminary.ico" 0 WriteRegStr HKCU "${APP_KEY}" "InstallDir" "$INSTDIR" @@ -168,19 +176,11 @@ Section "Luminary (required)" SEC_MAIN SectionEnd Section "Desktop shortcut" SEC_DESKTOP - !if /FileExists "${SOURCE_DIR}/Luminary.vbs" - CreateShortCut "$DESKTOP\Luminary.lnk" "$INSTDIR\Luminary.vbs" "" "$INSTDIR\Luminary.ico" 0 - !else - CreateShortCut "$DESKTOP\Luminary.lnk" "$INSTDIR\Luminary.cmd" "" "$INSTDIR\Luminary.ico" 0 - !endif + CreateShortCut "$DESKTOP\Luminary.lnk" "${APP_LAUNCH}" "" "$INSTDIR\Luminary.ico" 0 SectionEnd Section "Start Luminary when I sign in" SEC_STARTUP - !if /FileExists "${SOURCE_DIR}/Luminary.vbs" - WriteRegStr HKCU "${RUN_KEY}" "Luminary" '"$INSTDIR\Luminary.vbs"' - !else - WriteRegStr HKCU "${RUN_KEY}" "Luminary" '"$INSTDIR\Luminary.cmd"' - !endif + WriteRegStr HKCU "${RUN_KEY}" "Luminary" '"${APP_LAUNCH}"' SectionEnd !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN diff --git a/windows/launcher/Luminary.ps1 b/windows/launcher/Luminary.ps1 index 0027253..d0c487a 100644 --- a/windows/launcher/Luminary.ps1 +++ b/windows/launcher/Luminary.ps1 @@ -156,8 +156,20 @@ function Open-Browser([string]$url) { # Edge is part of Windows 10/11, so a chromeless app window costs no extra # runtime. Chrome is the second choice; anything else falls back to a tab. +# Chrome first, then Edge: both are Chromium, but Edge's first run asks for a +# Microsoft account and starts syncing settings, which reads as an unwanted +# browser taking over the machine. function Find-AppWindowBrowser { $candidates = @() + if ($env:LOCALAPPDATA) { + $candidates += (Join-Path $env:LOCALAPPDATA 'Google\Chrome\Application\chrome.exe') + } + if ($env:ProgramFiles) { + $candidates += (Join-Path $env:ProgramFiles 'Google\Chrome\Application\chrome.exe') + } + if (${env:ProgramFiles(x86)}) { + $candidates += (Join-Path ${env:ProgramFiles(x86)} 'Google\Chrome\Application\chrome.exe') + } if (${env:ProgramFiles(x86)}) { $candidates += (Join-Path ${env:ProgramFiles(x86)} 'Microsoft\Edge\Application\msedge.exe') } @@ -166,13 +178,6 @@ function Find-AppWindowBrowser { } if ($env:LOCALAPPDATA) { $candidates += (Join-Path $env:LOCALAPPDATA 'Microsoft\Edge\Application\msedge.exe') - $candidates += (Join-Path $env:LOCALAPPDATA 'Google\Chrome\Application\chrome.exe') - } - if ($env:ProgramFiles) { - $candidates += (Join-Path $env:ProgramFiles 'Google\Chrome\Application\chrome.exe') - } - if (${env:ProgramFiles(x86)}) { - $candidates += (Join-Path ${env:ProgramFiles(x86)} 'Google\Chrome\Application\chrome.exe') } foreach ($candidate in $candidates) { if ($candidate -and (Test-Path -LiteralPath $candidate)) { return $candidate } diff --git a/windows/launcher/go/main.go b/windows/launcher/go/main.go index 6667260..88a5a04 100644 --- a/windows/launcher/go/main.go +++ b/windows/launcher/go/main.go @@ -582,8 +582,10 @@ func openBrowser(url string) { _ = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start() } -// Edge ships with Windows 10/11, so a chromeless app window costs no extra -// runtime. Chrome is the second choice; anything else falls back to a tab. +// Chrome comes first, then Edge: both are Chromium and cost no extra runtime, +// but starting Edge prompts for the Microsoft account and settings sync, which +// reads as an unwanted browser taking over the machine. Anything else falls +// back to a normal tab. func findAppBrowser() string { candidates := []string{} add := func(dir string, rest ...string) { @@ -591,12 +593,12 @@ func findAppBrowser() string { candidates = append(candidates, filepath.Join(append([]string{dir}, rest...)...)) } } - for _, key := range []string{"ProgramFiles(x86)", "ProgramFiles", "LOCALAPPDATA"} { - add(os.Getenv(key), "Microsoft", "Edge", "Application", "msedge.exe") - } for _, key := range []string{"LOCALAPPDATA", "ProgramFiles", "ProgramFiles(x86)"} { add(os.Getenv(key), "Google", "Chrome", "Application", "chrome.exe") } + for _, key := range []string{"ProgramFiles(x86)", "ProgramFiles", "LOCALAPPDATA"} { + add(os.Getenv(key), "Microsoft", "Edge", "Application", "msedge.exe") + } for _, candidate := range candidates { if info, err := os.Stat(candidate); err == nil && info.Size() > 0 { return candidate diff --git a/windows/releases/README.md b/windows/releases/README.md index 41d394d..8950032 100644 --- a/windows/releases/README.md +++ b/windows/releases/README.md @@ -7,8 +7,8 @@ app never looks in this folder. | File | What to do with it | | --- | --- | | `Luminary--win-x64-setup.exe` | Copy to the Windows PC and run it. Per-user install, no admin prompt: Start-menu shortcuts, optional desktop shortcut and start-at-login, and an uninstaller that keeps `%LOCALAPPDATA%\Luminary\data`. | -| `Luminary--win-x64.zip` | The portable alternative: extract, then run `Luminary.cmd` (or `Luminary.vbs`) from the extracted `Luminary` folder. `README-windows.txt` inside the zip is the end-user guide. | -| `LuminaryWindow.exe` inside the zip | optional native window (WebView2); the launcher uses it automatically when present, and starting it directly forwards to the launcher | +| `Luminary--win-x64.zip` | The portable alternative: extract, then run `Luminary.exe` from the extracted `Luminary` folder. `README-windows.txt` inside the zip is the end-user guide. | +| `LuminaryWindow.exe` inside the zip | the app window (WebView2): no browser is opened, so it cannot pull in an Edge profile or Microsoft account. The launcher uses it automatically, and starting it directly forwards to the launcher | | `SHA256SUMS.txt` | Check a copy did not corrupt: `certutil -hashfile Luminary--win-x64-setup.exe SHA256` | ## Rebuilding this folder @@ -24,7 +24,7 @@ stages and zips **outside** the checkout (`~/.cache/luminary-windows`, or artifact. Old versions are not deleted, so remove the ones you no longer ship. Add `--webview2 ` for the native window; without it -the zip is about half the size (49 MB) and uses the Edge/Chrome app window. +the zip is about 65 MB smaller and falls back to an Edge/Chrome app window. ## Before a deploy @@ -35,8 +35,9 @@ publish only when you are actually shipping a build. ## What a Windows user needs -Windows 10/11 x64 and a current browser (Edge, Chrome or Firefox) with WebGL2. -Node.js, .NET and the Visual C++ Redistributable are **not** required — they are -bundled or part of Windows. The native window needs the Microsoft Edge WebView2 -runtime, which Windows 10/11 already has alongside Edge. See `../README.md` for -the import-level audit. +Windows 10/11 x64. Node.js, .NET and the Visual C++ Redistributable are **not** +required — they are bundled or part of Windows. The app window uses the +Microsoft Edge WebView2 runtime, which Windows 10/11 install with Edge; it is +the window engine only, so no browser window, profile or account is used. The +Develop module needs WebGL2, which WebView2 provides. See `../README.md` for the +import-level audit.