From 35c6ccfee848b197b5199951a1316940aacd1436 Mon Sep 17 00:00:00 2001 From: niklascfw Date: Sat, 8 Aug 2026 02:13:39 +0200 Subject: [PATCH] Added shell script for compiling --- .gitignore | 3 +++ build.sh | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 build.sh diff --git a/.gitignore b/.gitignore index f71d7c2..0e0322f 100644 --- a/.gitignore +++ b/.gitignore @@ -417,3 +417,6 @@ Temporary Items .apdisk __MACOSX/ *.icloud + +# Build output +/output/ diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..10a4fb0 --- /dev/null +++ b/build.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT="$(cd "$(dirname "$0")" && pwd)" +OUTPUT_DIR="$ROOT/output" +PROJECT="$ROOT/BadBuilder/BadBuilder.csproj" + +mkdir -p "$OUTPUT_DIR" + +publish() { + local rid="$1" + local name="$2" + + echo "Publishing $name ($rid)..." + dotnet publish "$PROJECT" \ + -c Release \ + -r "$rid" \ + -p:SelfContained=false \ + -p:PublishSingleFile=true \ + -o "$OUTPUT_DIR/tmp-$rid" + + mv "$OUTPUT_DIR/tmp-$rid/BadBuilder.exe" "$OUTPUT_DIR/$name" + rm -rf "$OUTPUT_DIR/tmp-$rid" + echo " -> $OUTPUT_DIR/$name" +} + +publish "win-x64" "BadBuilder-AMD64.exe" +publish "win-x86" "BadBuilder-x86.exe" +publish "win-arm64" "BadBuilder-ARM64.exe" + +echo +echo "Done. Binaries in $OUTPUT_DIR:" +ls -lh "$OUTPUT_DIR"/BadBuilder-*.exe