Skip to content

frontend: obs-main Windows startup, crash dialog and portable mode behind host files (#865) - #2176

Merged
zackees merged 2 commits into
masterfrom
facade/865-windows-main
Oct 24, 2026
Merged

zackees merged 2 commits into
masterfrom
facade/865-windows-main

Conversation

@zackees

@zackees zackees commented Oct 24, 2026

Copy link
Copy Markdown
Member

Fixes #865 (slice 3 of 3). Stacked on #2170: review only the last two commits.

Test: the test commit adds an assertion to test_frontend_obs_main_host that the Windows startup hook and portable mode stay undefined off Windows. This is a guard on a refactor, not a failing RED: the macros it checks were already undefined on Linux before this change.

GREEN:

  • A new Windows unity group, frontend.windows-obs-main, holds frontend/utility/obs-main-host-windows.cpp.hpp with obs-main's Windows-only code:

    • the crash dialog and the debug privilege
    • the VC++ runtime check and the process mitigation policies
    • the early DLL/crash setup, including RTWorkQ startup and shutdown
    • the help message box

    main calls obs_main_host_early_init/show_help/shutdown, which have portable defaults. delete_oldest_file loses static so the crash handler can use it.

  • BASE_PATH and ALLOW_PORTABLE_MODE are set by the host headers: macOS and Linux use .., Windows allows portable mode. Elsewhere obs-main keeps its defaults (../.., and portable mode only with ENABLE_PORTABLE_CONFIG).

  • The obs-main PCH loses its OS conditionals. Its Windows and macOS includes moved into the host headers.

Ratchet: frontend/obs-main.cpp.hpp and its PCH leave the baseline; 99 findings remain.

There's no local Windows or macOS frontend build, so CI's platform builds are the first compile of the host files.

@zackees
zackees added this pull request to the merge queue Oct 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 24, 2026
@zackees
zackees force-pushed the facade/865-windows-main branch from ac644cb to 4a2c724 Compare October 24, 2026 15:53
@zackees
zackees enabled auto-merge October 24, 2026 15:53
@zackees
zackees added this pull request to the merge queue Oct 24, 2026
Merged via the queue into master with commit 2f28dc2 Oct 24, 2026
35 checks passed
chriscoveries pushed a commit to chriscoveries/obsrust-fork that referenced this pull request Oct 25, 2026
… PCH (obs-rust#2359)

obs-rust#2176 moved obs-main's Windows startup into its own unity group and
kept obs-app.cpp's include order, shellapi.h before windows.h. In
obs-app.cpp an earlier header had already pulled in windows.h; in
the new group nothing does, so shellapi.h sees no EXTERN_C or
DECLSPEC_IMPORT and the Windows x64 app build fails (C2086/C2146 in
shellapi.h, nightly run 40162888607). PR CI never builds the app, so
only the nightly saw it.
@zackees
zackees deleted the facade/865-windows-main branch October 26, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

facade: frontend/obs-main.cpp: move 30 platform conditionals behind frontend/utility/platform.hpp

1 participant