-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexport.sh
More file actions
executable file
·29 lines (26 loc) · 1.2 KB
/
Copy pathexport.sh
File metadata and controls
executable file
·29 lines (26 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
# Convenience wrapper for the CUDA / no-CUDA build profiles (see
# Directory.Build.targets). Usage:
# ./export.sh linux # with CUDA (default)
# ./export.sh linux --no-cuda
# ./export.sh windows
# ./export.sh windows --no-cuda
# ./export.sh macos # --no-cuda accepted but ignored: no CUDA
# # backend exists for macOS either way
set -euo pipefail
platform="${1:-}"
cuda=true
[ "${2:-}" = "--no-cuda" ] && cuda=false
case "$platform-$cuda" in
linux-true) preset="Linux x64"; out="Export/Linux_x64/SharpCompanion.x86_64" ;;
linux-false) preset="Linux x64"; out="Export/Linux_x64_nocuda/SharpCompanion.x86_64" ;;
windows-true) preset="Windows Desktop x64"; out="Export/Windows_x64/SharpCompanion.exe" ;;
windows-false) preset="Windows Desktop x64"; out="Export/Windows_x64_nocuda/SharpCompanion.exe" ;;
macos-*) preset="macOS"; out="Export/MacOS/SharpCompanion.app" ;;
*)
echo "Usage: $0 <linux|windows|macos> [--no-cuda]" >&2
exit 1
;;
esac
mkdir -p "$(dirname "$out")"
IncludeCuda="$cuda" godot-mono --headless --export-release "$preset" "$out"