Ship the native app window and start from Luminary.exe

A tester saw Edge open and start syncing his Microsoft account; the bundle
carried no WebView2 host, so the launcher fell back to Edge's app mode. The
window host is now built and shipped, the fallback prefers Chrome over Edge, and
the installer's Start Luminary, shortcuts and start-at-login use Luminary.exe so
they no longer depend on Windows Script Host, which policy can disable.
This commit is contained in:
2026-12-01 13:04:37 +00:00
parent 9aff70bd63
commit a4aa43461f
6 changed files with 65 additions and 44 deletions
+4 -2
View File
@@ -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
+16 -5
View File
@@ -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 });
+17 -17
View File
@@ -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
+12 -7
View File
@@ -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 }
+7 -5
View File
@@ -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
+9 -8
View File
@@ -7,8 +7,8 @@ app never looks in this folder.
| File | What to do with it |
| --- | --- |
| `Luminary-<version>-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-<version>-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-<version>-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-<version>-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 <path to LuminaryWindow.exe>` 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.