58 lines
2.6 KiB
Bash
Executable File
58 lines
2.6 KiB
Bash
Executable File
#!/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
|
|
|
|
apt-get update
|
|
|
|
# ── Build tools ────────────────────────────────────────────────────────────────
|
|
apt-get install -y \
|
|
build-essential \
|
|
cmake \
|
|
ninja-build \
|
|
git
|
|
|
|
# ── OpenGL and XKB headers (required by Qt at compile time) ───────────────────
|
|
apt-get install -y \
|
|
libgl1-mesa-dev \
|
|
libxkbcommon-dev
|
|
|
|
# ── Encoding detection ─────────────────────────────────────────────────────────
|
|
apt-get install -y libuchardet-dev
|
|
|
|
# ── ZIP extraction (EPUB, DOCX, ODT) ──────────────────────────────────────────
|
|
# 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
|
|
|
|
# ── 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 "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 "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"
|