From c8f827e22866cc98f8bbb1c8146e28b2bb40a5cd Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Fri, 28 Aug 2026 17:38:31 +0800
Subject: [PATCH] chore: archive 8.4.0 local test build

---
 C1.source/build.sh |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/C1.source/build.sh b/C1.source/build.sh
index 7cd66d7..27aab14 100644
--- a/C1.source/build.sh
+++ b/C1.source/build.sh
@@ -106,11 +106,16 @@
 # Set CODESIGN_IDENTITY to your "Apple Distribution" or "Mac Developer" cert name.
 # Example: CODESIGN_IDENTITY="Apple Distribution: Your Name (TEAMID)"
 CODESIGN_IDENTITY="${CODESIGN_IDENTITY:-}"
-ENTITLEMENTS="$SWIFT_DIR/TagLauncher.entitlements"
+BASE_ENTITLEMENTS="$SWIFT_DIR/TagLauncher.entitlements"
+APP_STORE_ENTITLEMENTS="${APP_STORE_ENTITLEMENTS:-$SWIFT_DIR/TagLauncher-AppStore.entitlements}"
+ENTITLEMENTS="$BASE_ENTITLEMENTS"
 APP_STORE_MODE=false
 
 if [ -n "${APP_STORE:-}" ] && [ "$APP_STORE" = "1" ]; then
     APP_STORE_MODE=true
+    if [ -f "$APP_STORE_ENTITLEMENTS" ]; then
+        ENTITLEMENTS="$APP_STORE_ENTITLEMENTS"
+    fi
     if [ -z "$CODESIGN_IDENTITY" ]; then
         echo "⚠️  APP_STORE=1 but CODESIGN_IDENTITY not set. Will ad-hoc sign with entitlements."
     fi
@@ -317,6 +322,9 @@
 
 echo "==> Setting permissions..."
 chmod +x "$MACOS_DIR/$APP_NAME"
+find "$APP_BUNDLE" -type d -exec chmod 755 {} +
+find "$APP_BUNDLE" -type f -exec chmod 644 {} +
+chmod 755 "$MACOS_DIR/$APP_NAME"
 
 echo "==> Stripping debug symbols..."
 strip -x "$MACOS_DIR/$APP_NAME"

--
Gitblit v1.9.3