40 lines
889 B
Bash
Executable File
40 lines
889 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
DERIVED_DATA="${DERIVED_DATA:-$PWD/build}"
|
|
|
|
echo "=== BUILDING KJMIX PRO ==="
|
|
|
|
xcodebuild \
|
|
-project "KJMix Pro.xcodeproj" \
|
|
-scheme "KJMix Pro" \
|
|
-configuration Debug \
|
|
-destination 'platform=macOS' \
|
|
-derivedDataPath "$DERIVED_DATA" \
|
|
CODE_SIGNING_ALLOWED=NO \
|
|
build "$@"
|
|
|
|
APP_PATH="$DERIVED_DATA/Build/Products/Debug/KJMix Pro.app"
|
|
|
|
if [[ ! -d "$APP_PATH" ]]; then
|
|
echo "ERROR: Application not found: $APP_PATH"
|
|
exit 1
|
|
fi
|
|
|
|
EXECUTABLE=$(/usr/libexec/PlistBuddy \
|
|
-c "Print CFBundleExecutable" \
|
|
"$APP_PATH/Contents/Info.plist")
|
|
|
|
EXECUTABLE_PATH="$APP_PATH/Contents/MacOS/$EXECUTABLE"
|
|
|
|
if [[ ! -x "$EXECUTABLE_PATH" ]]; then
|
|
echo "ERROR: Executable not found: $EXECUTABLE_PATH"
|
|
exit 1
|
|
fi
|
|
|
|
echo "=== BUILD SUCCESSFUL ==="
|
|
echo "=== LAUNCHING KJMIX PRO ==="
|
|
|
|
exec "$EXECUTABLE_PATH" |