Add Mac support

This commit is contained in:
Agel committed 2026-04-10 00:07:16 +02:00
1 parent ad0d7376b3
commit 2568f9089b
4 files changed
+108 -8

No files matched your search

+20 -1
View File
@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
Asteria Qt is a cross-platform desktop book/document reader built with Qt6/C++. It is a reimplementation of [asteria-bookreader](../asteria-bookreader) (Electron/React) using a native Qt stack.
**Target platforms:** Windows and Linux (both required from day one); macOS planned
**Target platforms:** Windows, Linux, and macOS
### Format Support
@@ -89,6 +89,25 @@ System packages installed by the script:
| `libwpd-dev` | Legacy .doc format |
| `python3-venv` | For aqtinstall |
### macOS Build Environment
Requires macOS 12+ with Xcode Command Line Tools (`xcode-select --install`) and [Homebrew](https://brew.sh).
Run `scripts/install-deps-macos.sh` to install Homebrew packages and Qt, then:
```bash
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_PREFIX_PATH=/opt/qt/6.10.3/macos
cmake --build build --parallel
ctest --test-dir build --output-on-failure
```
Homebrew packages installed by the script: `cmake`, `ninja`, `pkg-config`, `uchardet`, `minizip`. Qt 6.10.3 is installed via `aqtinstall` to `/opt/qt/6.10.3/macos` (universal binary, runs on both Apple Silicon and Intel).
macOS builds use Metal for rendering (already handled in `main.cpp` via `Q_OS_MACOS`). macOS cannot be cross-compiled from Linux; CI must run on a native macOS host.
### CI Build Environment
GitLab CI (`.gitlab-ci.yml`), stages: `build` → `package` → `wiki`.