Merge pull request #3150 from kthchew/fix/unneeded-hr-exceptions
Remove unnecessary hardened runtime exceptions on macOS
This commit is contained in:
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -380,11 +380,13 @@ jobs:
|
|||||||
|
|
||||||
if [ -n '${{ secrets.APPLE_CODESIGN_ID }}' ]; then
|
if [ -n '${{ secrets.APPLE_CODESIGN_ID }}' ]; then
|
||||||
APPLE_CODESIGN_ID='${{ secrets.APPLE_CODESIGN_ID }}'
|
APPLE_CODESIGN_ID='${{ secrets.APPLE_CODESIGN_ID }}'
|
||||||
|
ENTITLEMENTS_FILE='../program_info/App.entitlements'
|
||||||
else
|
else
|
||||||
APPLE_CODESIGN_ID='-'
|
APPLE_CODESIGN_ID='-'
|
||||||
|
ENTITLEMENTS_FILE='../program_info/AdhocSignedApp.entitlements'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo codesign --sign "$APPLE_CODESIGN_ID" --deep --force --entitlements "../program_info/App.entitlements" --options runtime "PrismLauncher.app/Contents/MacOS/prismlauncher"
|
sudo codesign --sign "$APPLE_CODESIGN_ID" --deep --force --entitlements "$ENTITLEMENTS_FILE" --options runtime "PrismLauncher.app/Contents/MacOS/prismlauncher"
|
||||||
mv "PrismLauncher.app" "Prism Launcher.app"
|
mv "PrismLauncher.app" "Prism Launcher.app"
|
||||||
|
|
||||||
- name: Notarize (macOS)
|
- name: Notarize (macOS)
|
||||||
|
|||||||
@@ -594,6 +594,13 @@ QMap<QString, QString> MinecraftInstance::getVariables()
|
|||||||
out.insert("INST_JAVA", settings()->get("JavaPath").toString());
|
out.insert("INST_JAVA", settings()->get("JavaPath").toString());
|
||||||
out.insert("INST_JAVA_ARGS", javaArguments().join(' '));
|
out.insert("INST_JAVA_ARGS", javaArguments().join(' '));
|
||||||
out.insert("NO_COLOR", "1");
|
out.insert("NO_COLOR", "1");
|
||||||
|
#ifdef Q_OS_MACOS
|
||||||
|
// get library for Steam overlay support
|
||||||
|
QString steamDyldInsertLibraries = qEnvironmentVariable("STEAM_DYLD_INSERT_LIBRARIES");
|
||||||
|
if (!steamDyldInsertLibraries.isEmpty()) {
|
||||||
|
out.insert("DYLD_INSERT_LIBRARIES", steamDyldInsertLibraries);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
12
program_info/AdhocSignedApp.entitlements
Normal file
12
program_info/AdhocSignedApp.entitlements
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?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>
|
||||||
|
<key>com.apple.security.cs.disable-library-validation</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.device.audio-input</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.device.camera</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -2,10 +2,6 @@
|
|||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>com.apple.security.cs.disable-library-validation</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.device.audio-input</key>
|
<key>com.apple.security.device.audio-input</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.device.camera</key>
|
<key>com.apple.security.device.camera</key>
|
||||||
|
|||||||
Reference in New Issue
Block a user