Skip to content

Commit 4b400e1

Browse files
johnyoonhqwencoder
andcommitted
Improve development build experience
- compile_and_run.sh: Automatically source .envrc for APP_IDENTITY - Added comment acknowledging direnv trust model - package_app.sh: Add privacy usage descriptions to Info.plist - Apple Events: Interact with other apps for URLs/sessions - Desktop/Documents/Downloads: Open config and log files - Photo Library/Apple Music: Explicitly state not used Benefits: - Consistent code signing across rebuilds - Clear privacy descriptions instead of generic dialogs - Streamlined development workflow Note: Does NOT fix issue #485 (Claude keychain prompt cycle). That requires changes to Claude OAuth keychain handling logic. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
1 parent 8deef1e commit 4b400e1

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

Scripts/compile_and_run.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44
set -euo pipefail
55

66
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
7+
8+
# Source .envrc if it exists to load APP_IDENTITY and other environment variables
9+
# Note: This executes all commands in .envrc, but direnv requires explicit user approval
10+
# via 'direnv allow', so this is safe for development use.
11+
if [[ -f "${ROOT_DIR}/.envrc" ]]; then
12+
# shellcheck disable=SC1091
13+
source "${ROOT_DIR}/.envrc"
14+
export APP_IDENTITY
15+
fi
16+
717
APP_BUNDLE="${ROOT_DIR}/CodexBar.app"
818
APP_PROCESS_PATTERN="CodexBar.app/Contents/MacOS/CodexBar"
919
DEBUG_PROCESS_PATTERN="${ROOT_DIR}/.build/debug/CodexBar"

Scripts/package_app.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,13 @@ cat > "$APP/Contents/Info.plist" <<PLIST
197197
<key>SUEnableAutomaticChecks</key><${AUTO_CHECKS}/>
198198
<key>CodexBuildTimestamp</key><string>${BUILD_TIMESTAMP}</string>
199199
<key>CodexGitCommit</key><string>${GIT_COMMIT}</string>
200+
<!-- Usage descriptions for macOS privacy permissions -->
201+
<key>NSAppleEventsUsageDescription</key><string>CodexBar needs to interact with other applications to open URLs and manage your AI coding sessions.</string>
202+
<key>NSDesktopFolderUsageDescription</key><string>CodexBar needs access to open configuration and log files from your Desktop.</string>
203+
<key>NSDocumentsFolderUsageDescription</key><string>CodexBar needs access to open configuration and log files from your Documents folder.</string>
204+
<key>NSDownloadsFolderUsageDescription</key><string>CodexBar needs access to open configuration and log files from your Downloads folder.</string>
205+
<key>NSPhotoLibraryUsageDescription</key><string>CodexBar does not access your photo library. This permission is requested by a system framework but is not used.</string>
206+
<key>NSAppleMusicUsageDescription</key><string>CodexBar does not access Apple Music. This permission is requested by a system framework but is not used.</string>
200207
</dict>
201208
</plist>
202209
PLIST

0 commit comments

Comments
 (0)