mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-16 14:12:39 +00:00
eb9acd9b56
* Merge MacOS jobs * Code signing * rpath hack * Upgrade macOS VM to 13 * Update llvm compiler * Update to macOS Sonoma * Update build-mac.sh * Remove unnecessary version check * Disable Homebrew cache * Use macosx_version_min * Downgrade min version and VM to 13 * Force -D__MAC_OS_X_VERSION_MIN_REQUIRED=130000 * Ignore -Welaborated-enum-base in display_sleep * Move compiler version to env variable * Enable auto-updater on macOS ARM64
22 lines
506 B
Bash
22 lines
506 B
Bash
#!/bin/sh
|
|
|
|
file_path=$(find "$1/Contents/MacOS" -type f -print0 | head -n 1)
|
|
|
|
if [ -z "$file_path" ]; then
|
|
echo "No executable file found in $1/Contents/MacOS" >&2
|
|
exit 1
|
|
fi
|
|
|
|
|
|
target_architecture="$(lipo "$file_path" -archs)"
|
|
|
|
if [ -z "$target_architecture" ]; then
|
|
exit 1
|
|
fi
|
|
|
|
# shellcheck disable=SC3045
|
|
find "$1" -type f -print0 | while IFS= read -r -d '' file; do
|
|
echo Thinning "$file" -> "$target_architecture"
|
|
lipo "$file" -thin "$target_architecture" -output "$file" || true
|
|
done
|