fix(windows): link the client as a GUI subsystem — no console window on launch
The binary had no windows_subsystem attribute, so it linked as a console (CUI) app and Windows opened a console window alongside the WinUI window on every launch (incl. the MSIX). Add #![cfg_attr(windows, windows_subsystem = "windows")] so the windowed/MSIX launch is window-free (verified: the built exe's PE subsystem flips from WINDOWS_CUI=3 to WINDOWS_GUI=2). To keep the CLI paths usable, main now calls AttachConsole(ATTACH_PARENT_PROCESS) at startup — it binds to an existing parent console only (never creates one), so --headless/--discover still print to the launching terminal while Explorer/MSIX launches stay console-free. Adds the Win32_System_Console windows feature. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -37,6 +37,7 @@ windows = { git = "https://github.com/microsoft/windows-rs", rev = "b4129fcc1ae8
|
||||
"Win32_Graphics_Direct3D11",
|
||||
"Win32_Graphics_Direct3D_Fxc",
|
||||
"Win32_Graphics_Gdi",
|
||||
"Win32_System_Console",
|
||||
"Win32_System_LibraryLoader",
|
||||
"Win32_UI_Input_KeyboardAndMouse",
|
||||
"Win32_UI_WindowsAndMessaging",
|
||||
|
||||
Reference in New Issue
Block a user