update linux dep install
This commit is contained in:
1 parent
6f419425c2
commit
5598224141
3 files changed
+46
-42
No files matched your search
@@ -6,7 +6,7 @@ A cross-platform desktop book/document reader built with Qt6/C++. Reimplementati
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Qt 6.4+** (6.4 minimum for QtPdf; 6.5+ recommended)
|
||||
- **Qt 6.10.x** (installed via `aqtinstall` to `/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
|
||||
|
||||
@@ -18,24 +18,17 @@ A cross-platform desktop book/document reader built with Qt6/C++. Reimplementati
|
||||
sudo scripts/install-deps-ubuntu.sh
|
||||
```
|
||||
|
||||
The script installs the following package groups:
|
||||
The script installs Qt 6.10.1 via `aqtinstall` to `/opt/qt/6.10.1/gcc_64`, plus the following apt packages:
|
||||
|
||||
| Group | Packages | Required? |
|
||||
|---|---|---|
|
||||
| Qt6 core | `qt6-base-dev`, `qt6-declarative-dev`, `qt6-tools-dev` | Required |
|
||||
| Qt6 extras | `libqt6svg6-dev`, `qt6-shader-baker` | Required |
|
||||
| Qt6 PDF | `libqt6pdf6-dev` | Optional (PDF support) |
|
||||
| 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 | `libquazip-qt6-dev`, `libminizip-dev` | Required (EPUB/ZIP) |
|
||||
| Archive | `libminizip-dev` | Required (EPUB/ZIP) |
|
||||
| DjVu | `libdjvulibre-dev` | Optional (DjVu support) |
|
||||
| DOC | `libwpd-dev` | Optional (legacy .doc support) |
|
||||
|
||||
After the script runs it prints a CMake verify step — run it to confirm Qt6 is found:
|
||||
|
||||
```bash
|
||||
cmake --find-package -DNAME=Qt6 -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=EXIST
|
||||
```
|
||||
|
||||
### 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.
|
||||
@@ -107,17 +100,23 @@ cd asteria-qt
|
||||
|
||||
## Building
|
||||
|
||||
All build commands run in the **MSYS2 MINGW64** shell on Windows, or a regular terminal on Linux. No extra CMake flags are needed on Windows — MSYS2 installs everything to a standard prefix that CMake finds automatically.
|
||||
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.1/gcc_64` so CMake finds the aqt-installed Qt. On Windows, MSYS2 installs everything to a standard prefix that CMake finds automatically.
|
||||
|
||||
### Command Line
|
||||
|
||||
```bash
|
||||
# Debug build
|
||||
# Debug build (Linux)
|
||||
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/opt/qt/6.10.1/gcc_64
|
||||
cmake --build build --parallel
|
||||
|
||||
# Debug build (Windows — no prefix needed)
|
||||
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
|
||||
cmake --build build --parallel
|
||||
|
||||
# Release build
|
||||
cmake -B build-release -G Ninja -DCMAKE_BUILD_TYPE=Release
|
||||
# Release build (Linux)
|
||||
cmake -B build-release -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/opt/qt/6.10.1/gcc_64
|
||||
cmake --build build-release --parallel
|
||||
|
||||
# Run tests
|
||||
|
||||
Reference in new issue
Block a user