24 lines
898 B
Bash
Executable File
24 lines
898 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
configuration="${1:-Debug}"
|
|
launch="${2:-}"
|
|
if [[ "$#" -gt 2 || ( -n "$launch" && "$launch" != "--no-launch" ) ]]; then
|
|
echo "Usage: $0 [Debug|Release] [--no-launch]" >&2
|
|
exit 2
|
|
fi
|
|
case "$configuration" in
|
|
Debug|Release) ;;
|
|
*) echo "Usage: $0 [Debug|Release] [--no-launch]" >&2; exit 2 ;;
|
|
esac
|
|
source Scripts/build-paths.sh
|
|
mkdir -p "$base"
|
|
xcodebuild ARCHS=arm64 ENABLE_HARDENED_RUNTIME=NO CODE_SIGN_IDENTITY=- CODE_SIGN_STYLE=Manual DEVELOPMENT_TEAM= -project AIStudio.xcodeproj -scheme AIStudio -configuration "$configuration" \
|
|
-destination 'platform=macOS,arch=arm64' -derivedDataPath "$derived" \
|
|
-clonedSourcePackagesDirPath "$base/Packages" -disablePackageRepositoryCache build
|
|
app="$derived/Build/Products/$configuration/AIStudio.app"
|
|
printf 'App: %s\n' "$app"
|
|
if [[ "$launch" != "--no-launch" ]]; then
|
|
open -n "$app"
|
|
fi
|