29 lines
815 B
Bash
Executable File
29 lines
815 B
Bash
Executable File
#!/bin/zsh
|
|
set -euo pipefail
|
|
|
|
script_dir=${0:A:h}
|
|
project_root=${script_dir:h:h}
|
|
source_file="$script_dir/project_quint_input.cpp"
|
|
bundle_root="$project_root/Assets/ProjectQuint/Plugins/macOS/ProjectQuintInput.bundle"
|
|
output_file="$bundle_root/Contents/MacOS/ProjectQuintInput"
|
|
|
|
mkdir -p "${output_file:h}"
|
|
/usr/bin/xcrun --sdk macosx clang++ \
|
|
-std=c++17 \
|
|
-O3 \
|
|
-DNDEBUG \
|
|
-fvisibility=hidden \
|
|
-mmacosx-version-min=12.0 \
|
|
-arch arm64 \
|
|
-arch x86_64 \
|
|
-dynamiclib \
|
|
-install_name '@rpath/ProjectQuintInput' \
|
|
-framework ApplicationServices \
|
|
"$source_file" \
|
|
-o "$output_file"
|
|
|
|
/usr/bin/lipo "$output_file" -verify_arch arm64 x86_64
|
|
/usr/bin/codesign --force --sign - "$bundle_root"
|
|
/usr/bin/codesign --verify --strict "$bundle_root"
|
|
echo "Built Universal ProjectQuintInput: $output_file"
|