Internal
Public Access
Same root cause as the earlier Windows exe icon fix: add_executable() never set MACOSX_BUNDLE, so on macOS this produced a bare Mach-O binary rather than a proper .app bundle -- and without a bundle there's no Info.plist/.icns mechanism for Finder to show a custom icon at all. Added packaging/macos/orbithub.icns, rendered at up to 1024px directly from the same createOrbitHubAppIcon() logic used at runtime (via a one-off export tool, not committed) so it matches what the app actually looks like. CMake's MACOSX_BUNDLE keyword and MACOSX_BUNDLE_ICON_FILE wire it into an auto-generated Info.plist; both keywords are no-ops on other platforms. The profile database uses QStandardPaths::AppDataLocation, not the executable's own path, so this doesn't affect where existing profiles are found. Build output on macOS changes from build/orbithub to build/orbithub.app (launch with `open build/orbithub.app`); docs/BUILDING.md updated to match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
109 lines
3.0 KiB
Markdown
109 lines
3.0 KiB
Markdown
# Building OrbitHub (C++ / Qt6 Widgets)
|
|
|
|
Run all commands from the repository root unless noted.
|
|
|
|
## Requirements
|
|
|
|
Minimum toolchain requirements on all platforms:
|
|
- CMake 3.21+
|
|
- C++17 compiler toolchain
|
|
- Qt 6.2+ with `Widgets` and `Sql` modules (dynamic linking)
|
|
- OpenSSH client available on `PATH` (required for SSH sessions)
|
|
|
|
## Linux (Ubuntu / Mint)
|
|
|
|
```bash
|
|
sudo apt update
|
|
sudo apt install -y \
|
|
build-essential cmake ninja-build git pkg-config \
|
|
qt6-base-dev qt6-base-dev-tools qt6-tools-dev qt6-tools-dev-tools \
|
|
openssh-client libssl-dev zlib1g-dev
|
|
|
|
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
|
|
cmake --build build
|
|
./build/orbithub
|
|
```
|
|
|
|
## macOS (Homebrew)
|
|
|
|
```bash
|
|
xcode-select --install
|
|
brew update
|
|
brew install cmake ninja pkg-config qt@6 openssh openssl@3
|
|
|
|
cmake -S . -B build -G Ninja \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_PREFIX_PATH="$(brew --prefix qt@6);$(brew --prefix openssl@3)"
|
|
cmake --build build
|
|
open build/orbithub.app
|
|
```
|
|
|
|
## Windows 11 (PowerShell + MSVC + vcpkg)
|
|
|
|
Install required software:
|
|
|
|
```powershell
|
|
winget install -e --id Git.Git
|
|
winget install -e --id Kitware.CMake
|
|
winget install -e --id Ninja-build.Ninja
|
|
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
|
|
winget install -e --id Microsoft.VisualStudio.2022.BuildTools `
|
|
--override "--quiet --wait --norestart --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.Windows11SDK.22621"
|
|
```
|
|
|
|
Install dependencies via vcpkg:
|
|
|
|
```powershell
|
|
git clone https://github.com/microsoft/vcpkg C:\dev\vcpkg
|
|
C:\dev\vcpkg\bootstrap-vcpkg.bat
|
|
C:\dev\vcpkg\vcpkg.exe install qtbase:x64-windows openssl:x64-windows zlib:x64-windows
|
|
```
|
|
|
|
Open `x64 Native Tools Command Prompt for VS 2022` (or Developer PowerShell), then build:
|
|
|
|
```powershell
|
|
cmake -S . -B build -G Ninja `
|
|
-DCMAKE_BUILD_TYPE=Release `
|
|
-DCMAKE_TOOLCHAIN_FILE=C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake `
|
|
-DVCPKG_TARGET_TRIPLET=x64-windows
|
|
cmake --build build
|
|
```
|
|
|
|
Run (ensures DLL paths from vcpkg are present):
|
|
|
|
```powershell
|
|
C:\dev\vcpkg\vcpkg.exe env --triplet x64-windows -- .\build\orbithub.exe
|
|
```
|
|
|
|
If you already have `Qt 6` from the Qt installer and do not want vcpkg Qt, you can point CMake at that Qt install with `-DCMAKE_PREFIX_PATH=...`, but you still need compatible `OpenSSL` and `zlib` development libraries for the embedded FreeRDP build.
|
|
|
|
## Notes
|
|
|
|
- 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/<toolchain>` to CMake.
|
|
- Build output executable:
|
|
- Linux: `build/orbithub`
|
|
- macOS: `build/orbithub.app` (a proper app bundle, launch with `open build/orbithub.app`)
|
|
- Windows: `build\\orbithub.exe`
|
|
|
|
## Linux Packaging
|
|
|
|
Build a Debian package (`.deb`) from the current Linux build:
|
|
|
|
```bash
|
|
./packaging/linux/build-deb.sh
|
|
```
|
|
|
|
Output path:
|
|
- `dist/orbithub_<version>_<arch>.deb`
|
|
|
|
Build a Flatpak bundle:
|
|
|
|
```bash
|
|
sudo apt-get install -y flatpak flatpak-builder
|
|
./packaging/flatpak/build-flatpak.sh
|
|
```
|
|
|
|
Output path:
|
|
- `dist/flatpak/io.orbithub.OrbitHub.flatpak`
|