From d0021e16f5eca497de2c6b16b020a71e66021703 Mon Sep 17 00:00:00 2001 From: nimbold <11913706+nimbold@users.noreply.github.com> Date: Sat, 6 Jun 2026 15:10:37 +0330 Subject: [PATCH] fix: embed Sparkle dynamic frameworks into app bundle to resolve crash --- Scripts/create_app_bundle.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Scripts/create_app_bundle.sh b/Scripts/create_app_bundle.sh index bd2a7eb..3acc3e8 100755 --- a/Scripts/create_app_bundle.sh +++ b/Scripts/create_app_bundle.sh @@ -42,11 +42,24 @@ if [[ -n "$ARIA2C_PATH" && -x "$ARIA2C_PATH" ]]; then fi FRAMEWORKS_DIR="$CONTENTS_DIR/Frameworks" + mkdir -p "$FRAMEWORKS_DIR" dylibbundler -od -b -x "$RESOURCES_DIR/aria2c" -d "$FRAMEWORKS_DIR" -p "@executable_path/../Frameworks/" else echo "WARNING: aria2c not found! It will not be bundled. Please install it first." fi +FRAMEWORKS_DIR="$CONTENTS_DIR/Frameworks" +mkdir -p "$FRAMEWORKS_DIR" +if [ -d ".build/artifacts/sparkle/Sparkle/Sparkle.xcframework/macos-arm64_x86_64/Sparkle.framework" ]; then + cp -R ".build/artifacts/sparkle/Sparkle/Sparkle.xcframework/macos-arm64_x86_64/Sparkle.framework" "$FRAMEWORKS_DIR/Sparkle.framework" +fi +if [ -d ".build/artifacts/sparkle/Sparkle/SparkleCore.xcframework/macos-arm64_x86_64/SparkleCore.framework" ]; then + cp -R ".build/artifacts/sparkle/Sparkle/SparkleCore.xcframework/macos-arm64_x86_64/SparkleCore.framework" "$FRAMEWORKS_DIR/SparkleCore.framework" +fi + +install_name_tool -add_rpath "@executable_path/../Frameworks" "$MACOS_DIR/$APP_NAME" || true + + cat > "$CONTENTS_DIR/Info.plist" <