Fix: Add entitlements needed for plugins on macOS

Fixes social plugin loading on macOS, particularly for Steam.
This commit is contained in:
yeah-its-gloria 2024-05-18 15:28:59 -04:00 committed by rubidium42
parent b2572c7ca8
commit c2daabc010
2 changed files with 12 additions and 0 deletions

View File

@ -4,6 +4,7 @@ set(CPACK_BUNDLE_NAME "OpenTTD")
set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/os/macosx/openttd.icns")
set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist")
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/os/macosx/splash.png")
set(CPACK_BUNDLE_APPLE_ENTITLEMENTS "${CMAKE_SOURCE_DIR}/os/macosx/openttd.entitlements")
set(CPACK_DMG_FORMAT "UDBZ")
# Create a temporary Info.plist.in, where we will fill in the version via

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- As requested in https://partner.steamgames.com/doc/store/application/platforms, allows arbitrary plugin loads on hardened runtime -->
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>