The Windows ARM64 release package failed to launch on startup due to missing runtime DLLs (libdbus-1-3.dll, libmd4c.dll, zlib1.dll, libzstd.dll). This failure stemmed from several architectural and CI pipeline issues: 1. CMake unconditionally linked Qt6::DBus whenever available in the sysroot, introducing an unnecessary dependency on Qt6DBus.dll and libdbus-1-3.dll on Windows, even though D-Bus portal dialogs are only used on Linux. 2. The Docker build environment installed MSYS2 ARM64 Qt packages via an unchecked shell loop against a hardcoded package list. This missed crucial transitive runtime dependencies (such as md4c, zlib-ng-compat, libb2, and ICU) and failed silently when downloads or extractions broke. 3. Windows packaging lacked PE import verification, allowing broken packages with unresolved dynamic links to be produced and published without warning. To fix these issues and make image management more accessible: - Restrict Qt6::DBus detection and linking in CMakeLists.txt to Linux only, eliminating the D-Bus dependency from Windows builds. - Introduce scripts/download-mingw-arm64-qt.py to parse the MSYS2 clangarm64 database, resolve the complete transitive dependency graph, and verify essential runtime DLLs during the Docker image build. - Introduce scripts/verify-windows-dlls.py and integrate it into packaging/package-windows.sh to validate PE imports across the executable and bundled Qt plugins, failing packaging if any non-system DLL is missing. - Expose FORCE_REBUILD_IMAGE as a typed GitLab CI pipeline input (spec: inputs) to provide an interactive dropdown when triggering manual pipelines in the UI, and trigger container rebuilds when the download script changes. - Update AGENTS.md documentation to reflect the new dependency and packaging verification workflows.
Asteria Qt
A cross-platform desktop book/document reader built with Qt6/C++. Reimplementation of asteria-bookreader (Electron/React) using a native Qt stack.
Target platforms: Windows (x86_64 and ARM64), Linux, and macOS.
Prerequisites
- Qt 6.10.x (installed via
aqtinstallto/opt/qt; Ubuntu apt only ships 6.4 which is too old) - CMake 3.16+
- C++17 compiler — GCC 10+ or Clang 12+ on Linux; MinGW-w64 (GCC) via MSYS2 on Windows
Installing Dependencies
Linux (Ubuntu/Debian)
sudo scripts/install-deps-ubuntu.sh
The script installs Qt 6.10.3 via aqtinstall to /opt/qt/6.10.3/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) |
Windows
All Windows dependencies — Qt 6, MinGW-w64, CMake, Ninja, and all third-party libraries — are installed through MSYS2, a Linux-like environment for Windows with a proper package manager (pacman). This ensures everything is compiled with the same GCC toolchain with no ABI mismatches.
Step 1 — Install Git for Windows
Download and install from git-scm.com/download/win. During setup:
- Select "Git from the command line and also from 3rd-party software" (recommended PATH option)
- Use the default options for everything else
Step 2 — Install MSYS2
Download and run the installer from msys2.org. Use the default install path (C:\msys64).
After installation, open the MSYS2 MINGW64 shell (search the Start menu for "MSYS2 MINGW64" — use this shell, not MSYS2 MSYS or UCRT64) and update the package database:
pacman -Syu
The shell will likely close itself partway through. Reopen it and run the update again to finish:
pacman -Syu
Step 3 — Install Qt 6 and all dependencies
In the MSYS2 MINGW64 shell, navigate to the project folder and run the install script (MSYS2 mounts Windows drives as /c/, /d/ etc.):
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:
mingw-w64-x86_64-gcc— GCC toolchainmingw-w64-x86_64-zlib— Compression librarymingw-w64-x86_64-cmake— CMake build systemmingw-w64-x86_64-ninja— Ninja build toolmingw-w64-x86_64-uchardet— Character encoding detectionmingw-w64-x86_64-minizip— ZIP archive supportmingw-w64-x86_64-quazip— Qt ZIP integrationmingw-w64-x86_64-djvulibre— DjVu document supportmingw-w64-x86_64-libwpd— WordPerfect document support
Verify the installation:
gcc --version
cmake --version
ls /opt/qt/6.10.3/mingw_64/bin # Should show Qt binaries like qmake6
Step 4 — Clone the repository
git clone https://github.com/your-org/asteria-qt.git
cd asteria-qt
Building
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.
Command Line
# Debug build (Linux)
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/opt/qt/6.10.3/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 --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
cmake --build build-release --parallel
# Run tests
ctest --test-dir build --output-on-failure
Running
./build/asteria-qt # Linux
./build/asteria-qt.exe # Windows (run from MSYS2 MINGW64 shell)
CLion
Linux
- Open the project root folder (File → Open) — CLion detects
CMakeLists.txtautomatically - Go to Settings → Build, Execution, Deployment → CMake
- In the Debug and Release profiles, add to CMake options:
This is where
-DCMAKE_PREFIX_PATH=/opt/qt/6.10.3/gcc_64install-deps-ubuntu.shinstalls Qt 6.10.3 via aqtinstall. - CLion auto-detects the system GCC toolchain — no toolchain configuration needed
- To add a Release profile: click
+to duplicate, change Build type toRelease, same CMake options - Build:
Ctrl+F9| Run:Shift+F10
Windows
- Configure the toolchain — Settings → Build, Execution, Deployment → Toolchains:
- Click
+→ MinGW - Set C Compiler to
C:\msys64\mingw64\bin\gcc.exe - Set C++ Compiler to
C:\msys64\mingw64\bin\g++.exe - Leave Debugger set to Bundled — MSYS2's GDB can be newer than CLion supports
- Click
- Configure CMake — Settings → Build, Execution, Deployment → CMake:
- In the Debug profile, set Toolchain to the MSYS2 MinGW toolchain created above
- In the Debug and Release profiles, add to CMake options:
-DCMAKE_PREFIX_PATH=c:\msys64\opt\qt\6.10.3\mingw_64 - Build:
Ctrl+F9| Run:Shift+F10
VSCode
- Install extensions: C/C++, CMake Tools
- Open the project root
- CMake Tools detects
CMakeLists.txtautomatically - On Windows: when prompted to select a kit, choose the MSYS2 MinGW64 GCC kit (points to
C:\msys64\mingw64\bin\gcc.exe) - Build:
Ctrl+Shift+B| Run:F5(withlaunch.json) or CMake Tools' Run button
Qt Creator
- File → Open File or Project → select
CMakeLists.txt - Configure the kit under Edit → Preferences → Kits
- 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_64to the CMake options - Build:
Ctrl+B/⌘B| Run:Ctrl+R/⌘R