update linux dep install

This commit is contained in:
Agel committed 2026-03-17 12:07:44 +00:00
1 parent 6f419425c2
commit 5598224141
3 files changed
+46 -42

No files matched your search

+27 -25
View File
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
# Install all development dependencies for asteria-qt on Ubuntu/Debian.
# Tested on Ubuntu 24.04. Run with sudo or as root.
# Qt 6.10.x is installed via aqtinstall to /opt/qt — the Ubuntu apt repo only
# ships Qt 6.4, which is too old (qt_policy QTP0004 requires Qt 6.8+).
set -euo pipefail
@@ -13,33 +15,18 @@ apt-get install -y \
ninja-build \
git
# ── Qt 6 core development ──────────────────────────────────────────────────────
# qt6-base-dev : Core, Gui, Widgets, Network, SQL, ...
# qt6-declarative-* : QML / Qt Quick
# qt6-tools-* : CMake find_package integration, lupdate, lrelease
# qt6-shadertools : Required by Qt Quick renderer
# qt6-svg-dev : SVG icon support
# ── OpenGL and XKB headers (required by Qt at compile time) ───────────────────
apt-get install -y \
qt6-base-dev \
qt6-base-dev-tools \
qt6-declarative-dev \
qt6-declarative-dev-tools \
qt6-tools-dev \
qt6-tools-dev-tools \
qt6-shadertools-dev \
qt6-svg-dev
# ── Qt 6 PDF (for PDF format support) ─────────────────────────────────────────
apt-get install -y qt6-pdf-dev
libgl1-mesa-dev \
libxkbcommon-dev
# ── Encoding detection ─────────────────────────────────────────────────────────
apt-get install -y libuchardet-dev
# ── ZIP extraction (EPUB, DOCX, ODT) ──────────────────────────────────────────
# QuaZip is the Qt-idiomatic wrapper; minizip is the underlying C lib.
apt-get install -y \
libquazip1-qt6-dev \
libminizip-dev
# minizip is the underlying C lib; QuaZip will be built from source against the
# aqt Qt when EPUB support is added.
apt-get install -y libminizip-dev
# ── DjVu support ───────────────────────────────────────────────────────────────
apt-get install -y libdjvulibre-dev
@@ -47,9 +34,24 @@ apt-get install -y libdjvulibre-dev
# ── Legacy .doc support (libwpd) ───────────────────────────────────────────────
apt-get install -y libwpd-dev
# ── Qt 6.10.1 via aqtinstall ──────────────────────────────────────────────────
# We use a temporary venv so aqtinstall doesn't pollute the system Python env.
apt-get install -y python3-venv
echo ""
echo "All dependencies installed. Qt6 version:"
dpkg -l qt6-base-dev | awk '/^ii/{print $3}'
echo "Installing Qt 6.10.1 via aqtinstall → /opt/qt ..."
python3 -m venv /tmp/aqt-venv
/tmp/aqt-venv/bin/pip install --quiet aqtinstall
/tmp/aqt-venv/bin/aqt install-qt linux desktop 6.10.1 linux_gcc_64 \
--outputdir /opt/qt \
--log /tmp/aqt-install.log
rm -rf /tmp/aqt-venv /tmp/aqt-install.log
echo ""
echo "Verify CMake can find Qt6:"
echo " cmake -B /tmp/qt6-test -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/cmake"
echo "All dependencies installed."
echo ""
echo "Qt 6.10.1 is at /opt/qt/6.10.1/gcc_64"
echo ""
echo "Build with:"
echo " cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/opt/qt/6.10.1/gcc_64"
echo " cmake --build build --parallel"