文件

21 行
963 B
Bash
可执行文件

#!/bin/zsh
set -euo pipefail
cd "${0:A:h:h}"
output_dir=$(mktemp -d /tmp/fcp-beautygirl-osc-tests.XXXXXX)
trap 'rm -rf "$output_dir"' EXIT
plugin_dir="$PWD/FCP-BeautyGirl/FCP-BeautyGirl/Plugin"
sdk_frameworks=/Library/Developer/SDKs/FxPlug.sdk/Library/Frameworks
runtime_frameworks=/Library/Developer/Frameworks
compiler_extra=()
if [[ "${FCP_BEAUTYGIRL_OSC_ASAN:-0}" == 1 ]]; then
compiler_extra=(-fsanitize=address -g)
fi
xcrun clang "${compiler_extra[@]}" -fobjc-arc -fmodules -Wall -Wextra -Wno-unused-parameter \
-mmacosx-version-min=13.0 -I "$plugin_dir" -F "$sdk_frameworks" -F "$runtime_frameworks" \
-Wl,-rpath,"$runtime_frameworks" \
"$plugin_dir/PGFaceSelectOSC.m" tests/osc_tests.m \
-framework Foundation -framework CoreImage -framework CoreGraphics \
-framework CoreMedia -framework CoreVideo -framework IOSurface \
-framework FxPlug -framework PluginManager -o "$output_dir/osc-tests"
"$output_dir/osc-tests" "$plugin_dir/Info.plist"