feat(windows): system-tray launcher for vizd.exe (vizd-tray) - #158
Merged
Conversation
Add a Windows-only SetConsoleCtrlHandler that returns TRUE on CTRL_CLOSE_EVENT so the tray launcher can hide the console window instead of vizd being terminated when the user closes it. CTRL_C_EVENT still falls through to the appbase SIGINT handler for a clean shutdown.
A tiny static Go launcher (GUI subsystem) that runs vizd.exe sharing its console so vizd keeps its colored log output, and adds a tray icon with Open window / Close vizd / Enable autostart / Quit. Closing the console hides it to the tray instead of stopping the node.
Add a setup-go + go build step (static, -H windowsgui) and attach the resulting vizd-tray.exe to the Windows release next to vizd.exe.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a system-tray launcher for the Windows
vizd.exenode, so closing the console window hides the node to the tray instead of stopping it.vizd-tray(contrib/windows/vizd-tray/, Go, static, GUI subsystem): runsvizd.exe -d datasharing its console (keeps vizd's colored log output), tray menu Open window / Close vizd / Enable autostart / Quit. Autostart writes aHKCU\...\Runentry; closing the console (X) hides it to the tray.vizdpatch (programs/vizd/main.cpp): Windows-onlySetConsoleCtrlHandlerthat survivesCTRL_CLOSE_EVENT(returns TRUE), so the launcher can hide the window.CTRL_C_EVENTstill falls through to the appbase SIGINT handler for a clean shutdown.windows-release.yml):setup-go+go build -H windowsguistep,vizd-tray.exeattached to the Windows release next tovizd.exe.Safety
vizdpatch is entirely inside#ifdef _WIN32— it is compiled out on Linux, so thevizd:latestDocker image is functionally unchanged (no consensus / no HF14 impact).-fsyntax-onlyonmain.cpp(Linux, EXIT 0) andCGO_ENABLED=0 GOOS=windows go build+go veton the launcher.Note
The desktop bundle (start-viz.bat, config.ini, bundled clients) still lives on the
pmbranch; master's Windows release is barevizd.exe+cli_wallet.exe. This PR shipsvizd-tray.exealongside them.🤖 Generated with Claude Code