Initial
This commit is contained in:
commit
4d52c8cc60
6 files changed
+508
No files matched your search
Executable
+55
@@ -0,0 +1,55 @@
|
||||
#!/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.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
apt-get update
|
||||
|
||||
# ── Build tools ────────────────────────────────────────────────────────────────
|
||||
apt-get install -y \
|
||||
build-essential \
|
||||
cmake \
|
||||
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
|
||||
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
|
||||
|
||||
# ── 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
|
||||
|
||||
# ── DjVu support ───────────────────────────────────────────────────────────────
|
||||
apt-get install -y libdjvulibre-dev
|
||||
|
||||
# ── Legacy .doc support (libwpd) ───────────────────────────────────────────────
|
||||
apt-get install -y libwpd-dev
|
||||
|
||||
echo ""
|
||||
echo "All dependencies installed. Qt6 version:"
|
||||
dpkg -l qt6-base-dev | awk '/^ii/{print $3}'
|
||||
echo ""
|
||||
echo "Verify CMake can find Qt6:"
|
||||
echo " cmake -B /tmp/qt6-test -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/cmake"
|
||||
@@ -0,0 +1,70 @@
|
||||
# Install all development dependencies for asteria-qt on Windows.
|
||||
# Requires: winget (Windows 10 1709+) and an internet connection.
|
||||
# Run in an elevated (Administrator) PowerShell session.
|
||||
#
|
||||
# After running this script you must add Qt to your PATH / CMAKE_PREFIX_PATH.
|
||||
# The default Qt install path is: C:\Qt\6.x.x\msvc2022_64\
|
||||
|
||||
#Requires -RunAsAdministrator
|
||||
Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
# ── Build tools ────────────────────────────────────────────────────────────────
|
||||
Write-Host "Installing build tools..." -ForegroundColor Cyan
|
||||
|
||||
# Visual Studio Build Tools 2022 (C++ compiler, MSBuild)
|
||||
winget install --id Microsoft.VisualStudio.2022.BuildTools --silent --override `
|
||||
"--wait --quiet --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"
|
||||
|
||||
# CMake
|
||||
winget install --id Kitware.CMake --silent
|
||||
|
||||
# Ninja
|
||||
winget install --id Ninja-build.Ninja --silent
|
||||
|
||||
# Git
|
||||
winget install --id Git.Git --silent
|
||||
|
||||
# ── Qt 6 ───────────────────────────────────────────────────────────────────────
|
||||
Write-Host ""
|
||||
Write-Host "Qt 6 cannot be installed via winget in a fully unattended way." -ForegroundColor Yellow
|
||||
Write-Host "Install it manually using the Qt Online Installer:" -ForegroundColor Yellow
|
||||
Write-Host " https://www.qt.io/download-open-source" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
Write-Host "In the installer, select Qt 6.7+ and check these components:" -ForegroundColor Yellow
|
||||
Write-Host " - MSVC 2022 64-bit"
|
||||
Write-Host " - Qt PDF"
|
||||
Write-Host " - Qt Quick / Qt Declarative (included by default)"
|
||||
Write-Host " - Qt SVG"
|
||||
Write-Host " - Qt Shader Tools"
|
||||
Write-Host ""
|
||||
Write-Host "After installing, set CMAKE_PREFIX_PATH in your build commands:" -ForegroundColor Yellow
|
||||
Write-Host ' cmake -B build -DCMAKE_PREFIX_PATH="C:\Qt\6.7.0\msvc2022_64"' -ForegroundColor Cyan
|
||||
|
||||
# ── vcpkg (for third-party C++ libs) ──────────────────────────────────────────
|
||||
Write-Host ""
|
||||
Write-Host "Installing vcpkg for third-party libraries..." -ForegroundColor Cyan
|
||||
|
||||
$vcpkgDir = "C:\vcpkg"
|
||||
if (-not (Test-Path $vcpkgDir)) {
|
||||
git clone https://github.com/microsoft/vcpkg.git $vcpkgDir
|
||||
& "$vcpkgDir\bootstrap-vcpkg.bat" -disableMetrics
|
||||
} else {
|
||||
Write-Host "vcpkg already present at $vcpkgDir" -ForegroundColor Green
|
||||
}
|
||||
|
||||
# ── Third-party libraries via vcpkg ───────────────────────────────────────────
|
||||
Write-Host ""
|
||||
Write-Host "Installing third-party libraries via vcpkg (x64-windows)..." -ForegroundColor Cyan
|
||||
|
||||
$vcpkg = "$vcpkgDir\vcpkg.exe"
|
||||
& $vcpkg install `
|
||||
uchardet:x64-windows `
|
||||
quazip:x64-windows `
|
||||
minizip:x64-windows `
|
||||
djvulibre:x64-windows `
|
||||
libwpd:x64-windows
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Done. Add vcpkg toolchain to your CMake configure command:" -ForegroundColor Green
|
||||
Write-Host " -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake" -ForegroundColor Cyan
|
||||
Reference in new issue
Block a user