Skip to content

Commit db38fe4

Browse files
committed
fix: some changes for macos build process
1 parent beebfcc commit db38fe4

File tree

2 files changed

+56
-3
lines changed

2 files changed

+56
-3
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<!-- Required for hardened runtime -->
6+
<key>com.apple.security.cs.allow-jit</key>
7+
<true/>
8+
9+
<!-- Allow unsigned executable memory for embedded FFmpeg -->
10+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
11+
<true/>
12+
13+
<!-- Disable library validation for embedded binaries -->
14+
<key>com.apple.security.cs.disable-library-validation</key>
15+
<true/>
16+
17+
<!-- Allow DYLD environment variables if needed -->
18+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
19+
<false/>
20+
21+
<!-- Disable executable memory protection (required for some embedded binaries) -->
22+
<key>com.apple.security.cs.disable-executable-page-protection</key>
23+
<false/>
24+
</dict>
25+
</plist>

.github/workflows/release.yml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,20 @@ jobs:
7474
echo '<dict>' >> SoundscapeSync.app/Contents/Info.plist
7575
echo ' <key>CFBundleName</key>' >> SoundscapeSync.app/Contents/Info.plist
7676
echo ' <string>SoundscapeSync</string>' >> SoundscapeSync.app/Contents/Info.plist
77+
echo ' <key>CFBundleDisplayName</key>' >> SoundscapeSync.app/Contents/Info.plist
78+
echo ' <string>Soundscape Sync</string>' >> SoundscapeSync.app/Contents/Info.plist
7779
echo ' <key>CFBundleVersion</key>' >> SoundscapeSync.app/Contents/Info.plist
7880
echo ' <string>1.0</string>' >> SoundscapeSync.app/Contents/Info.plist
81+
echo ' <key>CFBundleShortVersionString</key>' >> SoundscapeSync.app/Contents/Info.plist
82+
echo ' <string>1.0</string>' >> SoundscapeSync.app/Contents/Info.plist
7983
echo ' <key>CFBundleIdentifier</key>' >> SoundscapeSync.app/Contents/Info.plist
8084
echo ' <string>com.cloonar.soundscape-sync</string>' >> SoundscapeSync.app/Contents/Info.plist
81-
echo ' <key>Executable</key>' >> SoundscapeSync.app/Contents/Info.plist
85+
echo ' <key>CFBundleExecutable</key>' >> SoundscapeSync.app/Contents/Info.plist
8286
echo ' <string>SoundscapeSync</string>' >> SoundscapeSync.app/Contents/Info.plist
87+
echo ' <key>CFBundlePackageType</key>' >> SoundscapeSync.app/Contents/Info.plist
88+
echo ' <string>APPL</string>' >> SoundscapeSync.app/Contents/Info.plist
89+
echo ' <key>LSMinimumSystemVersion</key>' >> SoundscapeSync.app/Contents/Info.plist
90+
echo ' <string>11.0</string>' >> SoundscapeSync.app/Contents/Info.plist
8391
echo '</dict>' >> SoundscapeSync.app/Contents/Info.plist
8492
echo '</plist>' >> SoundscapeSync.app/Contents/Info.plist
8593
chmod +x SoundscapeSync.app/Contents/MacOS/SoundscapeSync
@@ -103,11 +111,31 @@ jobs:
103111
env:
104112
MAC_CERT_NAME: ${{ secrets.MAC_CERT_NAME }}
105113
run: |
106-
codesign --deep --force --options runtime --sign "$MAC_CERT_NAME" SoundscapeSync.app
114+
# Sign the main executable first
115+
codesign --force --options runtime \
116+
--entitlements .github/workflows/entitlements.plist \
117+
--sign "$MAC_CERT_NAME" \
118+
--timestamp \
119+
SoundscapeSync.app/Contents/MacOS/SoundscapeSync
120+
121+
# Then sign the app bundle
122+
codesign --force --options runtime \
123+
--entitlements .github/workflows/entitlements.plist \
124+
--sign "$MAC_CERT_NAME" \
125+
--timestamp \
126+
SoundscapeSync.app
107127
108128
- name: Verify signature
109129
if: ${{ env.APPLE_ID != '' && env.APPLE_TEAM_ID != '' && env.APPLE_PASSWORD != '' }}
110-
run: codesign --verify --deep --strict --verbose=2 SoundscapeSync.app
130+
run: |
131+
# Verify codesign integrity
132+
codesign --verify --strict --verbose=4 SoundscapeSync.app
133+
134+
# Display signature details
135+
codesign --display --verbose=4 SoundscapeSync.app
136+
137+
# Check Gatekeeper assessment (will fail before notarization, but useful for debugging)
138+
spctl --assess --verbose=4 --type execute SoundscapeSync.app || echo "Gatekeeper check failed (expected before notarization)"
111139
112140
- name: Zip macOS build
113141
run: zip -r SoundscapeSync.app.zip SoundscapeSync.app

0 commit comments

Comments
 (0)