diff --git a/build.sh b/build.sh index 1f4ea27..d561b82 100755 --- a/build.sh +++ b/build.sh @@ -25,7 +25,7 @@ if [ ! -f "$RUST_LIB/libswiftly_core.a" ]; then exit 1 fi -RUST_FLAGS="-import-objc-header $ROOT/core/include/swiftly.h -L $RUST_LIB -lswiftly_core" +RUST_FLAGS=(-import-objc-header "$ROOT/core/include/swiftly.h" -L "$RUST_LIB" -lswiftly_core) # --- App icon from pre-rendered PNGs --- ICONS="$ROOT/assets/icon_sources" @@ -59,7 +59,7 @@ echo "Compiling Swift (release)..." swiftc \ -target arm64-apple-macosx14.0 \ -sdk "$SDK" \ - $RUST_FLAGS \ + "${RUST_FLAGS[@]}" \ -framework Cocoa \ -framework SwiftUI \ -O \ diff --git a/debug.sh b/debug.sh index 5f0d336..348d3e5 100755 --- a/debug.sh +++ b/debug.sh @@ -15,7 +15,7 @@ RUST_LIB="$ROOT/core/target/debug" echo "Building Rust core (debug)..." cd "$ROOT/core" && cargo build cd "$ROOT" -RUST_FLAGS="-import-objc-header $ROOT/core/include/swiftly.h -L $RUST_LIB -lswiftly_core" +RUST_FLAGS=(-import-objc-header "$ROOT/core/include/swiftly.h" -L "$RUST_LIB" -lswiftly_core) # --- Bundle structure --- mkdir -p "$MACOS" "$RESOURCES" @@ -26,7 +26,7 @@ echo "Compiling Swift (debug)..." swiftc \ -target arm64-apple-macosx14.0 \ -sdk "$SDK" \ - $RUST_FLAGS \ + "${RUST_FLAGS[@]}" \ -framework Cocoa \ -framework SwiftUI \ -Onone -g \