build: add Linux and Windows build scripts with NSIS installer

build-linux.sh configures and builds via CMake. build-windows.sh builds
in MSYS2/MINGW64, bundles Qt and transitive MinGW DLLs via windeployqt
plus an ldd pass, and produces an NSIS installer (installer.nsi). Ignore
the dist/ output and generated Setup.exe.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Tronax 2026-06-15 02:37:19 +02:00
parent 767b0b50b0
commit 7a4f3f312b
Signed by: Tronax
SSH key fingerprint: SHA256:2pKKXDZucWvaF/GzXNz0FY53EAO1YDLN80bqS+TTz/o
4 changed files with 216 additions and 0 deletions

35
build-linux.sh Executable file
View file

@ -0,0 +1,35 @@
#!/usr/bin/env bash
#
# Build Ultimate Media Tracker on Linux (Qt6 + CMake).
#
# Usage:
# ./build-linux.sh configure + build (Release)
# ./build-linux.sh clean wipe the build dir first
# BUILD_TYPE=Debug ./build-linux.sh
#
set -euo pipefail
cd "$(dirname "$0")"
BUILD_DIR="build"
BUILD_TYPE="${BUILD_TYPE:-Release}"
if [[ "${1:-}" == "clean" ]]; then
echo "==> Removing $BUILD_DIR"
rm -rf "$BUILD_DIR"
fi
# Prefer Ninja for a fresh configure; reuse the existing generator otherwise
# (passing -G on an already-configured dir errors out).
GEN=()
if [[ ! -f "$BUILD_DIR/CMakeCache.txt" ]] && command -v ninja >/dev/null 2>&1; then
GEN=(-G Ninja)
fi
echo "==> Configuring ($BUILD_TYPE)"
cmake -S . -B "$BUILD_DIR" "${GEN[@]}" -DCMAKE_BUILD_TYPE="$BUILD_TYPE"
echo "==> Building"
cmake --build "$BUILD_DIR" -j
echo
echo "==> Done. Binary: $BUILD_DIR/umt"