From 8de787b3eac8436e0e2ceb28435f6e6ea565788b Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 8 Jul 2026 13:22:28 -0500 Subject: [PATCH] folders. --- distribution/macos/create_macos_build_ava.sh | 23 ++++++++++------- .../macos/create_macos_pr_build_ava.sh | 25 +++++++++++-------- 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/distribution/macos/create_macos_build_ava.sh b/distribution/macos/create_macos_build_ava.sh index 10dffc2b4..ae010b34e 100755 --- a/distribution/macos/create_macos_build_ava.sh +++ b/distribution/macos/create_macos_build_ava.sh @@ -153,18 +153,23 @@ TOTAL_SIZE=$((STAGING_SIZE + PADDING)) dd if=/dev/zero of="$UNCOMPRESSED_DMG" bs=1 count=0 seek="$TOTAL_SIZE" status=none mkfs.hfsplus -v "Ryujinx" "$UNCOMPRESSED_DMG" -shopt -s dotglob -for f in "$DMG_FOLDER"/*; do - [[ -e "$f" ]] || continue - FILE_NAME=$(basename "$f") - dmg-hfsplus "$UNCOMPRESSED_DMG" add "$f" "/$FILE_NAME" - if [[ -d "$f" ]]; then - dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "/$FILE_NAME" 0755 +find "$DMG_FOLDER" -mindepth 1 -type d | sort | while IFS= read -r src; do + dst="/${src#"$DMG_FOLDER"/}" + + dmg-hfsplus "$UNCOMPRESSED_DMG" mkdir "$dst" + dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "$dst" 0755 +done +find "$DMG_FOLDER" -mindepth 1 -type f | while IFS= read -r src; do + dst="/${src#"$DMG_FOLDER"/}" + + dmg-hfsplus "$UNCOMPRESSED_DMG" add "$src" "$dst" + + if [[ -x "$f" ]]; then + dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "$dst" 0755 else - dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "/$FILE_NAME" 0644 + dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "$dst" 0644 fi done -shopt -u dotglob # https://developer.apple.com/library/archive/technotes/tn/tn1150.html # kHasCustomIcon diff --git a/distribution/macos/create_macos_pr_build_ava.sh b/distribution/macos/create_macos_pr_build_ava.sh index c0440a228..215971f11 100644 --- a/distribution/macos/create_macos_pr_build_ava.sh +++ b/distribution/macos/create_macos_pr_build_ava.sh @@ -149,22 +149,27 @@ TOTAL_SIZE=$((STAGING_SIZE + PADDING)) dd if=/dev/zero of="$UNCOMPRESSED_DMG" bs=1 count=0 seek="$TOTAL_SIZE" status=none mkfs.hfsplus -v "Ryujinx" "$UNCOMPRESSED_DMG" -shopt -s dotglob -for f in "$DMG_FOLDER"/*; do - [[ -e "$f" ]] || continue - FILE_NAME=$(basename "$f") - strace dmg-hfsplus "$UNCOMPRESSED_DMG" add "$f" "/$FILE_NAME" - if [[ -d "$f" ]]; then - strace dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "/$FILE_NAME" 0755 +find "$DMG_FOLDER" -mindepth 1 -type d | sort | while IFS= read -r src; do + dst="/${src#"$DMG_FOLDER"/}" + + dmg-hfsplus "$UNCOMPRESSED_DMG" mkdir "$dst" + dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "$dst" 0755 +done +find "$DMG_FOLDER" -mindepth 1 -type f | while IFS= read -r src; do + dst="/${src#"$DMG_FOLDER"/}" + + dmg-hfsplus "$UNCOMPRESSED_DMG" add "$src" "$dst" + + if [[ -x "$f" ]]; then + dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "$dst" 0755 else - strace dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "/$FILE_NAME" 0644 + dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "$dst" 0644 fi done -shopt -u dotglob # https://developer.apple.com/library/archive/technotes/tn/tn1150.html # kHasCustomIcon -strace dmg-hfsplus "$UNCOMPRESSED_DMG" attr / C +dmg-hfsplus "$UNCOMPRESSED_DMG" attr / C dmg dmg -c lzma "$UNCOMPRESSED_DMG" "$COMPRESSED_DMG" rm -r "$DMG_FOLDER"