Windows: embed app icon into the executable file

The app's icon only appeared at runtime (window/taskbar), set programmatically
via QApplication::setWindowIcon(). Explorer showed the generic default icon
for orbithub.exe itself, since that requires an icon baked into the PE file
as a Windows resource at build time -- a completely separate mechanism.

Added packaging/windows/orbithub.ico, rendered directly from the same
createOrbitHubAppIcon() logic used at runtime (via a one-off export tool,
not committed) so the file icon matches what the app actually looks like.
A minimal .rc resource file embeds it, compiled in only for WIN32 builds.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-08 09:49:38 -06:00
co-authored by Claude Sonnet 5
parent b28adf8cbe
commit ac1deac148
3 changed files with 8 additions and 1 deletions
+7 -1
View File
@@ -78,7 +78,7 @@ set(WITH_WINPR_TOOLS OFF CACHE BOOL "" FORCE)
add_subdirectory(third_party/FreeRDP EXCLUDE_FROM_ALL)
add_executable(orbithub WIN32
set(ORBITHUB_SOURCES
src/about_dialog.cpp
src/about_dialog.h
src/app_icon.cpp
@@ -111,6 +111,12 @@ add_executable(orbithub WIN32
src/unsupported_session_backend.h
)
if(WIN32)
list(APPEND ORBITHUB_SOURCES packaging/windows/orbithub.rc)
endif()
add_executable(orbithub WIN32 ${ORBITHUB_SOURCES})
target_link_libraries(orbithub PRIVATE Qt6::Widgets Qt6::Sql)
target_link_libraries(orbithub PRIVATE KodoTerm::KodoTerm)
if(TARGET freerdp AND TARGET winpr)
Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

+1
View File
@@ -0,0 +1 @@
1 ICON "orbithub.ico"