diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ad513e..f353f38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,7 +115,19 @@ if(WIN32) list(APPEND ORBITHUB_SOURCES packaging/windows/orbithub.rc) endif() -add_executable(orbithub WIN32 ${ORBITHUB_SOURCES}) +if(APPLE) + list(APPEND ORBITHUB_SOURCES packaging/macos/orbithub.icns) + set_source_files_properties(packaging/macos/orbithub.icns PROPERTIES + MACOSX_PACKAGE_LOCATION "Resources" + ) + set(MACOSX_BUNDLE_ICON_FILE orbithub.icns) + set(MACOSX_BUNDLE_BUNDLE_NAME "OrbitHub") + set(MACOSX_BUNDLE_GUI_IDENTIFIER "io.orbithub.OrbitHub") + set(MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION}") + set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}") +endif() + +add_executable(orbithub WIN32 MACOSX_BUNDLE ${ORBITHUB_SOURCES}) target_link_libraries(orbithub PRIVATE Qt6::Widgets Qt6::Sql) target_link_libraries(orbithub PRIVATE KodoTerm::KodoTerm) diff --git a/docs/BUILDING.md b/docs/BUILDING.md index 48e87d4..f3a6aed 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -35,7 +35,7 @@ cmake -S . -B build -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_PREFIX_PATH="$(brew --prefix qt@6);$(brew --prefix openssl@3)" cmake --build build -./build/orbithub +open build/orbithub.app ``` ## Windows 11 (PowerShell + MSVC + vcpkg) @@ -82,7 +82,8 @@ If you already have `Qt 6` from the Qt installer and do not want vcpkg Qt, you c - OrbitHub builds vendored `KodoTerm`, `libvterm`, and `FreeRDP` from `third_party/`. - If Qt is installed in a custom location, pass `-DCMAKE_PREFIX_PATH=/path/to/Qt/6.x.x/` to CMake. - Build output executable: - - Linux/macOS: `build/orbithub` + - Linux: `build/orbithub` + - macOS: `build/orbithub.app` (a proper app bundle, launch with `open build/orbithub.app`) - Windows: `build\\orbithub.exe` ## Linux Packaging diff --git a/packaging/macos/orbithub.icns b/packaging/macos/orbithub.icns new file mode 100644 index 0000000..7193010 Binary files /dev/null and b/packaging/macos/orbithub.icns differ