-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapollo-run
More file actions
executable file
·36 lines (28 loc) · 928 Bytes
/
Copy pathapollo-run
File metadata and controls
executable file
·36 lines (28 loc) · 928 Bytes
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
30
31
32
33
34
35
36
#!/bin/sh
# Dev launcher: runs the xcodebuild output with MLX frameworks on the dylib path.
set -e
CONFIGURATION=Debug
if [ "$1" = "--release" ]; then
CONFIGURATION=Release
shift
elif [ "$1" = "--debug" ]; then
CONFIGURATION=Debug
shift
fi
DERIVED=build
BUILD_DIR="$(pwd)/$DERIVED/Build/Products/$CONFIGURATION"
if [ ! -d "$BUILD_DIR" ]; then
echo "Build directory not found: $BUILD_DIR"
echo "Did you build first?"
echo "Try: xcodebuild -scheme Apollo -configuration $CONFIGURATION -derivedDataPath $DERIVED -destination 'platform=macOS' build"
exit 1
fi
if [ -d "$BUILD_DIR/Apollo.app" ]; then
exec "$BUILD_DIR/Apollo.app/Contents/MacOS/Apollo" "$@"
fi
if [ -f "$BUILD_DIR/Apollo" ]; then
export DYLD_FRAMEWORK_PATH="$BUILD_DIR/PackageFrameworks:$BUILD_DIR"
exec "$BUILD_DIR/Apollo" "$@"
fi
echo "Build output not found at $BUILD_DIR/Apollo (expected file or .app)."
exit 1