few changes for running on windows
This commit is contained in:
6 files changed
+119
-110
No files matched your search
@@ -1,70 +0,0 @@
|
||||
# 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
|
||||
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install all dependencies for asteria-qt on Windows via MSYS2.
|
||||
# Run this script from the MSYS2 MINGW64 shell:
|
||||
# bash scripts/install-deps-windows.sh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "Installing Qt 6 and dependencies via pacman..."
|
||||
|
||||
pacman -S --needed \
|
||||
mingw-w64-x86_64-gcc \
|
||||
mingw-w64-x86_64-zlib \
|
||||
mingw-w64-x86_64-qt6-base \
|
||||
mingw-w64-x86_64-qt6-declarative \
|
||||
mingw-w64-x86_64-qt6-tools \
|
||||
mingw-w64-x86_64-qt6-shadertools \
|
||||
mingw-w64-x86_64-qt6-svg \
|
||||
mingw-w64-x86_64-cmake \
|
||||
mingw-w64-x86_64-ninja \
|
||||
mingw-w64-x86_64-uchardet \
|
||||
mingw-w64-x86_64-quazip \
|
||||
mingw-w64-x86_64-djvulibre \
|
||||
mingw-w64-x86_64-libwpd
|
||||
|
||||
echo ""
|
||||
echo "Done. Verify with:"
|
||||
echo " qmake6 --version"
|
||||
echo " gcc --version"
|
||||
echo " cmake --version"
|
||||
Reference in new issue
Block a user