Skip to content

Windows host-first packaging for DesktopWebView - #20

Merged
dominicletz merged 4 commits into
mainfrom
windows/host-first-packaging
Sep 1, 2026
Merged

Windows host-first packaging for DesktopWebView#20
dominicletz merged 4 commits into
mainfrom
windows/host-first-packaging

Conversation

@dominicletz

@dominicletz dominicletz commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Default windows_layout: :host_first places the native host + .ini at the package root and the Mix release under beam/ (mirrors macOS host-first).
  • Resolve host via host_binary / DESKTOP_HOST_BINARY / DESKTOP_WEBVIEW_BINARY or priv/native/windows/*.exe.
  • Install the host as package.host_executable or <package.name>.exe (e.g. DesktopWebView.exedDrive.exe) and write matching <basename>.ini.
  • Write app_name = <app>.bat in the host ini; keep the BEAM/erl binaries as CUI (host spawns a hidden console).
  • NSIS shortcuts launch the host executable; install/uninstall kill the host instead of heart on host-first.
  • Keep :release_first for legacy wx/heart installers.

Test plan

  • MIX_ENV=prod mix desktop.installer with DESKTOP_HOST_BINARY produces _build/prod/<name>/dDrive.exe + dDrive.ini + beam/
  • NSIS installer shortcuts target the renamed host
  • windows_layout: :release_first still packs flat release + run.vbs

dominicletz and others added 4 commits August 25, 2026 13:02
Default windows_layout places the native host and ini at the package
root with the Mix release under beam/, matching the macOS host-first
layout so NSIS shortcuts launch DesktopWebView.exe without heart.
Prefer bin/<app>.bat in DesktopWebView.ini so hosts spawn correctly.
Skip IMAGE_SUBSYSTEM_WINDOWS_GUI for host-first packages so OTP 26
user/logger can attach a console when the native host starts BEAM.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy DesktopWebView.exe to host_executable or <name>.exe (e.g. dDrive.exe)
and write matching <basename>.ini so taskbar pins and shortcuts keep working.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extract host naming, ini writing, release copy, and redistributable
moves from release_host_first so mix credo stays green in CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dominicletz
dominicletz merged commit f620795 into main Sep 1, 2026
2 checks passed
@dominicletz
dominicletz deleted the windows/host-first-packaging branch September 1, 2026 07:57
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