#!/usr/bin/env bash set -euo pipefail # unoptimised build with -g, launched in the foreground. ROOT="$(cd "$(dirname "$0")/../.." && pwd)" source "$ROOT/scripts/_build-dirs.sh" cd "$ROOT" case "$(uname -s)" in Linux) ;; *) echo "wrong platform: $(uname -s) — use cargo xtask debug" >&2; exit 1;; esac export RUST_BACKTRACE=1 if [ -n "${ACORD_FEATURES:-}" ]; then cargo build -p acord-linux --no-default-features --features "$ACORD_FEATURES" else cargo build -p acord-linux fi EXE="$CARGO_TARGET_DIR/debug/acord" # rasterize the icon next to the exe. if command -v rsvg-convert >/dev/null 2>&1 && [ -f "$ROOT/assets/Acord.svg" ]; then rsvg-convert --width 256 --height 256 "$ROOT/assets/Acord.svg" -o "$CARGO_TARGET_DIR/debug/icon.png" fi pkill -x acord 2>/dev/null || true sleep 0.3 echo echo "Launching $EXE — Rust panics will print below." echo "(Ctrl+C to exit, or quit Acord normally.)" echo "----------------------------------------------------------" exec "$EXE"