From a36268ced651f1309d7bd7b6fd4c1de022af5a98 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 8 Jul 2026 16:07:47 -0500 Subject: [PATCH] fr this time --- .forgejo/workflows/build.yml | 2 +- distribution/macos/create_macos_build_ava.sh | 15 +++++++++++++-- distribution/macos/create_macos_pr_build_ava.sh | 15 +++++++++++++-- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index cec2cabe4..85dfa0b79 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -177,7 +177,7 @@ jobs: - name: Install hfsprogs and libdmg-hfsplus run: | - sudo apt-get install -y cmake hfsprogs strace + sudo apt-get install -y cmake hfsprogs git clone https://github.com/mozilla/libdmg-hfsplus.git cd libdmg-hfsplus && cmake . && make && cd .. sudo mv libdmg-hfsplus/dmg/dmg /usr/local/bin/dmg diff --git a/distribution/macos/create_macos_build_ava.sh b/distribution/macos/create_macos_build_ava.sh index 715e0f43f..167b60791 100755 --- a/distribution/macos/create_macos_build_ava.sh +++ b/distribution/macos/create_macos_build_ava.sh @@ -153,12 +153,14 @@ 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" +# Make all the folders first, because libdmg-hfsplus won't make non-existent directories. 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 +# Copy the files over, setting correct permissions. find "$DMG_FOLDER" -mindepth 1 -type f | while IFS= read -r src; do dst="/${src#"$DMG_FOLDER"/}" @@ -170,7 +172,16 @@ find "$DMG_FOLDER" -mindepth 1 -type f | while IFS= read -r src; do dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "$dst" 0644 fi done -dmg-hfsplus "$UNCOMPRESSED_DMG" -s clone_link addall "$DMG_FOLDER/Applications" / + +# Copy the symlink into a folder, then copy the folder over with symlink permissions. +# It doesn't like files that much. +if [[ -L "$DMG_FOLDER/Applications" ]]; then + TEMP="$OUTPUT_DIRECTORY/temp" + mkdir -p "$TEMP" + cp -P "$DMG_FOLDER/Applications" "$TEMP" + dmg-hfsplus "$UNCOMPRESSED_DMG" -s clone_link addall "$TEMP" / + rm -rf "$TEMP" +fi # https://developer.apple.com/library/archive/technotes/tn/tn1150.html # kHasCustomIcon @@ -201,4 +212,4 @@ else spctl -a -vv "$COMPRESSED_DMG" fi -echo "Done" +echo "Done" \ No newline at end of file diff --git a/distribution/macos/create_macos_pr_build_ava.sh b/distribution/macos/create_macos_pr_build_ava.sh index c7177d8d8..8e989e673 100644 --- a/distribution/macos/create_macos_pr_build_ava.sh +++ b/distribution/macos/create_macos_pr_build_ava.sh @@ -149,12 +149,14 @@ 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" +# Make all the folders first, because libdmg-hfsplus won't make non-existent directories. 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 +# Copy the files over, setting correct permissions. find "$DMG_FOLDER" -mindepth 1 -type f | while IFS= read -r src; do dst="/${src#"$DMG_FOLDER"/}" @@ -166,7 +168,16 @@ find "$DMG_FOLDER" -mindepth 1 -type f | while IFS= read -r src; do dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "$dst" 0644 fi done -dmg-hfsplus "$UNCOMPRESSED_DMG" -s clone_link addall "$DMG_FOLDER/Applications" / + +# Copy the symlink into a folder, then copy the folder over with symlink permissions. +# It doesn't like files that much. +if [[ -L "$DMG_FOLDER/Applications" ]]; then + TEMP="$OUTPUT_DIRECTORY/temp" + mkdir -p "$TEMP" + cp -P "$DMG_FOLDER/Applications" "$TEMP" + dmg-hfsplus "$UNCOMPRESSED_DMG" -s clone_link addall "$TEMP" / + rm -rf "$TEMP" +fi # https://developer.apple.com/library/archive/technotes/tn/tn1150.html # kHasCustomIcon @@ -197,4 +208,4 @@ else spctl -a -vv "$COMPRESSED_DMG" fi -echo "Done" +echo "Done" \ No newline at end of file