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>
35 lines
889 B
Bash
Executable file
35 lines
889 B
Bash
Executable file
#!/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"
|