Skip to content

Commit

Permalink
Unified macOS bundle: use binary plist from x64 build (macos 10.9+). …
Browse files Browse the repository at this point in the history
…Ignore the newer (binary) NIBArchive introduced with macOS 10.13.
  • Loading branch information
marceltaeumel committed Jan 17, 2024
1 parent d6c1fe0 commit 23f93f1
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions helpers_bundles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -216,22 +216,33 @@ create_unified_vm_macOS() {
# echo ln -s `readlink "$A/$f"` "$O/$f"
elif [ ! -f "$A/$f" ]; then
echo "$A/$f does not exist; how come?"
elif [[ ! "$f" =~ ^.*MainMenu.nib$ ]] && [ ! -f "$B/$f" ]; then
elif [[ ! "$f" =~ ^.*MainMenu\.nib$ ]] && [ ! -f "$B/$f" ]; then
echo "$B/$f does not exist; how come?"
else
case `file -b "$A/$f"` in
Mach-O*)
lipo -create -output "$O/$f" "$A/$f" "$B/$f";;
*)
if [[ "$f" =~ ^.*MainMenu.nib$ ]] || [ cmp -s "$A/$f" "$B/$f" ]; then
if [ -f "$B/$f" ] && (cmp -s "$A/$f" "$B/$f"); then
cp "$A/$f" "$O/$f"
else
echo "EXCLUDING $f because it differs"
case "$f" in
*.plist)
echo "EXCLUDING $f because it differs"
MISMATCHINGPLISTS="$MISMATCHINGPLISTS $f"
;;
*MainMenu.nib)
# Use old binary plist from x64 bundle.
# Ignore NIBArchive keyedobjects-101300.nib.
# Ignore NIBArchive MainMenu.nib from ARM bundle.
if [ -d "$B/$f" ]; then
cp "$B/$f/keyedobjects.nib" "$O/$f"
else
echo "$B/$f should be a directory; how come?"
fi
;;
*.nib)
echo "REPLACING $f because it differs"
MISMATCHINGNIBS="$MISMATCHINGNIBS $f"
echo "using $B version"
cp "$B/$f" "$O/$f"
Expand Down

0 comments on commit 23f93f1

Please sign in to comment.