Added shell script for compiling
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -417,3 +417,6 @@ Temporary Items
|
|||||||
.apdisk
|
.apdisk
|
||||||
__MACOSX/
|
__MACOSX/
|
||||||
*.icloud
|
*.icloud
|
||||||
|
|
||||||
|
# Build output
|
||||||
|
/output/
|
||||||
|
|||||||
33
build.sh
Normal file
33
build.sh
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user