Add app entitlements + codesign script

Because I managed to leave them untracked in the last commit.
This commit is contained in:
zzoro 2020-11-16 04:40:41 -05:00
parent 267a6ff62e
commit cad320b4e0
2 changed files with 34 additions and 0 deletions

8
macos/codesign.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
IDENTITY="$1"
if [[ $IDENTITY == "" ]]; then
IDENTITY=-
fi
codesign -vfs $IDENTITY --entitlements "${MESON_SOURCE_ROOT}/macos/entitlements.plist" --deep -o runtime "${MESON_INSTALL_PREFIX}"

26
macos/entitlements.plist Normal file
View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<plist version="1.0">
<dict>
<!--App sandbox entitlements: https://developer.apple.com/documentation/security/app_sandbox?language=objc -->
<!--Hardened runtime entitlements: https://developer.apple.com/documentation/security/hardened_runtime?language=objc-->
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.network.client</key>
<false/>
<key>com.apple.security.network.server</key>
<false/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.files.downloads.read-write</key>
<true/>
<key>com.apple.security.assets.pictures.read-write</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<false/>
<key>com.apple.security.cs.allow-jit</key>
<false/>
</dict>
</plist>