From 884f15da1e4089690c56ea475b3860672c8baedd Mon Sep 17 00:00:00 2001 From: Kenneth Chew <79120643+kthchew@users.noreply.github.com> Date: Fri, 29 Nov 2024 20:40:37 -0500 Subject: [PATCH] Remove unnecessary hardened runtime exceptions These are cruft from an older time when the launcher was ad-hoc signed, and the OS couldn't tell the libraries and launcher were signed by the same party. Additionally, add a workaround to send the necessary library injection to the game if Steam overlay is used despite library validation being on for the launcher. Signed-off-by: Kenneth Chew <79120643+kthchew@users.noreply.github.com> --- launcher/minecraft/MinecraftInstance.cpp | 7 +++++++ program_info/App.entitlements | 4 ---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/launcher/minecraft/MinecraftInstance.cpp b/launcher/minecraft/MinecraftInstance.cpp index 007fb6cca..108cb6648 100644 --- a/launcher/minecraft/MinecraftInstance.cpp +++ b/launcher/minecraft/MinecraftInstance.cpp @@ -554,6 +554,13 @@ QMap MinecraftInstance::getVariables() out.insert("INST_JAVA", settings()->get("JavaPath").toString()); out.insert("INST_JAVA_ARGS", javaArguments().join(' ')); 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; } diff --git a/program_info/App.entitlements b/program_info/App.entitlements index b46e8ff2a..73bf832c7 100644 --- a/program_info/App.entitlements +++ b/program_info/App.entitlements @@ -2,10 +2,6 @@ - com.apple.security.cs.disable-library-validation - - com.apple.security.cs.allow-dyld-environment-variables - com.apple.security.device.audio-input com.apple.security.device.camera