moar ci changes

This commit is contained in:
Agel committed 2026-11-13 10:56:08 +01:00
1 parent 5940d86ed2
commit 1ef94b910a
19 files changed
+1313 -663

No files matched your search

+29 -22
View File
@@ -3,13 +3,13 @@
A cross-platform desktop book/document reader built with Qt6/C++.
Reimplementation of [asteria-bookreader](../asteria-bookreader) (Electron/React) using a native Qt stack.
**Target platforms:** Windows (x86_64 and ARM64), Linux, and macOS.
**Target platforms:** Windows (x86_64 and ARM64), Linux (x86_64 and ARM64), and macOS.
## Prerequisites
- **Qt 6.10.x** (installed via `aqtinstall` to `/opt/qt`; Ubuntu apt only ships 6.4 which is too old)
- **Qt 6.12+** (`6.12.0` installed by default via `aqtinstall` to `/opt/qt`)
- **CMake 3.16+**
- **C++17 compiler** — GCC 10+ or Clang 12+ on Linux; MinGW-w64 (GCC) via MSYS2 on Windows
- **C++17 compiler** — GCC 10+ or Clang 12+ on Linux; MinGW-w64 (GCC/Clang) via MSYS2 or LLVM-MinGW on Windows
## Installing Dependencies
@@ -17,18 +17,18 @@ Reimplementation of [asteria-bookreader](../asteria-bookreader) (Electron/React)
```bash
sudo scripts/install-deps-ubuntu.sh
# Optional: include Linux ARM64 cross-compilation dependencies and Qt 6.12.0 (gcc_arm64)
sudo scripts/install-deps-ubuntu.sh --with-arm64
```
The script installs Qt 6.10.3 via `aqtinstall` to `/opt/qt/6.10.3/gcc_64`, plus the following apt packages:
The script installs Qt 6.12.0 via `aqtinstall` to `/opt/qt/6.12.0/gcc_64`, plus the following apt packages:
| Group | Packages | Required? |
|---|---|---|
| Build tools | `build-essential`, `cmake`, `ninja-build`, `git` | Required |
| Qt compile deps | `libgl1-mesa-dev`, `libxkbcommon-dev` | Required |
| Encoding | `libuchardet-dev` | Required (TXT encoding detection) |
| Archive | `libminizip-dev` | Required (EPUB/ZIP) |
| DjVu | `libdjvulibre-dev` | Optional (DjVu support) |
| DOC | `libwpd-dev` | Optional (legacy .doc support) |
| Build tools | `build-essential`, `cmake`, `ninja-build`, `git`, `pkg-config` | Required |
| Qt compile deps | `libgl-dev`, `libegl-dev`, `libxkbcommon-dev`, `libfontconfig1-dev`, `libfreetype-dev`, `libdbus-1-dev` | Required |
| Encoding | `libuchardet-dev` | Required (TXT/FB2 encoding detection) |
| Archive | `libminizip-dev`, `libarchive-dev`, `zlib1g-dev` | Required (EPUB/FBZ/CBZ/CBR) |
### Windows
@@ -65,7 +65,7 @@ cd /c/path/to/asteria-qt
bash scripts/install-deps-windows.sh
```
The script installs Qt 6.10.3 via `aqtinstall` to `/opt/qt/6.10.3/mingw_64`, plus the following MSYS2 packages:
The script installs Qt 6.12.0 via `aqtinstall` to `/opt/qt/6.12.0/mingw_64`, plus the following MSYS2 packages:
- `mingw-w64-x86_64-gcc` — GCC toolchain
- `mingw-w64-x86_64-zlib` — Compression library
@@ -82,7 +82,7 @@ Verify the installation:
```bash
gcc --version
cmake --version
ls /opt/qt/6.10.3/mingw_64/bin # Should show Qt binaries like qmake6
ls /opt/qt/6.12.0/mingw_64/bin # Should show Qt binaries like qmake6
```
**Step 4 — Clone the repository**
@@ -96,23 +96,30 @@ cd asteria-qt
All build commands run in the **MSYS2 MINGW64** shell on Windows, or a regular terminal on Linux.
On Linux, pass `-DCMAKE_PREFIX_PATH=/opt/qt/6.10.3/gcc_64` so CMake finds the aqt-installed Qt. On Windows, pass `-DCMAKE_PREFIX_PATH=c:\msys64\opt\qt\6.10.3\mingw_64` for the same reason.
On Linux, pass `-DCMAKE_PREFIX_PATH=/opt/qt/6.12.0/gcc_64` so CMake finds the aqt-installed Qt. On Windows, pass `-DCMAKE_PREFIX_PATH=c:\msys64\opt\qt\6.12.0\mingw_64` for the same reason.
### Command Line
```bash
# Debug build (Linux)
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/opt/qt/6.10.3/gcc_64
# Debug build (Linux x86_64)
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/opt/qt/6.12.0/gcc_64
cmake --build build --parallel
# Debug build (Windows)
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=c:\msys64\opt\qt\6.10.3\mingw_64
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=c:\msys64\opt\qt\6.12.0\mingw_64
cmake --build build --parallel
# Release build (Linux)
cmake -B build-release -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/opt/qt/6.10.3/gcc_64
# Release build (Linux x86_64)
cmake -B build-release -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/opt/qt/6.12.0/gcc_64
cmake --build build-release --parallel
# Release build (Linux ARM64 cross-compile)
cmake -B build-linux-arm64 -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=scripts/linux-arm64-toolchain.cmake \
-DCMAKE_PREFIX_PATH=/opt/qt/6.12.0/gcc_arm64 \
-DQT_HOST_PATH=/opt/qt/6.12.0/gcc_64
cmake --build build-linux-arm64 --parallel
# Run tests
ctest --test-dir build --output-on-failure
```
@@ -132,9 +139,9 @@ ctest --test-dir build --output-on-failure
2. Go to **Settings → Build, Execution, Deployment → CMake**
3. In the **Debug** and **Release** profiles, add to **CMake options**:
```
-DCMAKE_PREFIX_PATH=/opt/qt/6.10.3/gcc_64
-DCMAKE_PREFIX_PATH=/opt/qt/6.12.0/gcc_64
```
This is where `install-deps-ubuntu.sh` installs Qt 6.10.3 via aqtinstall.
This is where `install-deps-ubuntu.sh` installs Qt 6.12.0 via aqtinstall.
4. CLion auto-detects the system GCC toolchain — no toolchain configuration needed
5. To add a **Release** profile: click `+` to duplicate, change **Build type** to `Release`, same CMake options
6. Build: `Ctrl+F9` | Run: `Shift+F10`
@@ -150,7 +157,7 @@ ctest --test-dir build --output-on-failure
- In the Debug profile, set **Toolchain** to the MSYS2 MinGW toolchain created above
3. In the **Debug** and **Release** profiles, add to **CMake options**:
```
-DCMAKE_PREFIX_PATH=c:\msys64\opt\qt\6.10.3\mingw_64
-DCMAKE_PREFIX_PATH=c:\msys64\opt\qt\6.12.0\mingw_64
```
3. Build: `Ctrl+F9` | Run: `Shift+F10`
@@ -166,5 +173,5 @@ ctest --test-dir build --output-on-failure
1. File → Open File or Project → select `CMakeLists.txt`
2. Configure the kit under Edit → Preferences → Kits
3. On Windows: add a kit pointing to MSYS2's Qt (`C:\msys64\mingw64`) and MinGW compiler and `-DCMAKE_PREFIX_PATH=c:\msys64\opt\qt\6.10.3\mingw_64` to the CMake options
3. On Windows: add a kit pointing to MSYS2's Qt (`C:\msys64\mingw64`) and MinGW compiler and `-DCMAKE_PREFIX_PATH=c:\msys64\opt\qt\6.12.0\mingw_64` to the CMake options
4. Build: `Ctrl+B` / `⌘B` | Run: `Ctrl+R` / `⌘R`