Skip to content

Windows host: prefer .bat and hidden console for OTP 26 - #8

Merged
dominicletz merged 2 commits into
masterfrom
windows/host-packaging-fixes
Sep 1, 2026
Merged

Windows host: prefer .bat and hidden console for OTP 26#8
dominicletz merged 2 commits into
masterfrom
windows/host-packaging-fixes

Conversation

@dominicletz

@dominicletz dominicletz commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Prefer Mix release bin/*.bat when spawning BEAM (avoids Windows error 193 on the extensionless shell script).
  • Spawn BEAM with a hidden CREATE_NEW_CONSOLE so OTP 26 user/logger get a real console (NUL/invalid handles caused nouser / crash loops).
  • Build the host as a WIN32 GUI app (wWinMain) so the packaged process never shows a terminal.
  • Resolve config as <exe_basename>.ini first (e.g. dDrive.ini for dDrive.exe), then DesktopWebView.ini.

Test plan

  • Rebuild host with scripts/build_windows.ps1 (PE subsystem = GUI)
  • Packaged Diode Collab installer launches host + BEAM and shows the WebView2 window without a host console
  • BEAM PID stays stable (no restart loop)

dominicletz and others added 2 commits August 31, 2026 22:21
CreateProcess must not run the Mix release shell script (error 193).
OTP 26 also needs a real console for user/logger; spawn with a hidden
CREATE_NEW_CONSOLE instead of sharing invalid or NUL stdio handles.

Co-authored-by: Cursor <cursoragent@cursor.com>
Build DesktopWebView as a WIN32 (wWinMain) app so packaged installs
do not open a console. Resolve config as <exe_basename>.ini first so
renamed hosts such as dDrive.exe still load dDrive.ini.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dominicletz
dominicletz merged commit 450f4ec into master Sep 1, 2026
4 checks passed
@dominicletz
dominicletz deleted the windows/host-packaging-fixes branch September 1, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant