From ae941e7442f0c4f4c8814be9a0bf68d637e8145e Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Wed, 29 May 2024 15:57:38 -0700 Subject: [PATCH] MacPlatform: running install_name_tool with System.runCommand() works better than new Process() new Process() was crashing before the process could start for some reason --- tools/platforms/MacPlatform.hx | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/tools/platforms/MacPlatform.hx b/tools/platforms/MacPlatform.hx index 5ccfe55c0..e33f52744 100644 --- a/tools/platforms/MacPlatform.hx +++ b/tools/platforms/MacPlatform.hx @@ -710,23 +710,13 @@ class MacPlatform extends PlatformTarget if (isLibrary) { var newId = "@executable_path/" + fileName; - var process = new Process("install_name_tool", ["-id", newId, absoluteFilePath]); - var exitCode = process.exitCode(true); - if (exitCode != 0) - { - Log.error('install_name_tool -id process exited with code: <${exitCode}> for file <${fileName}>'); - } + System.runCommand("", "install_name_tool", ["-id", newId, absoluteFilePath]); } for (homebrewPath in homebrewDependencyPaths) { var newPath = "@executable_path/" + Path.withoutDirectory(homebrewPath); - var process = new Process("install_name_tool", ["-change", homebrewPath, newPath, absoluteFilePath]); - var exitCode = process.exitCode(true); - if (exitCode != 0) - { - Log.error('install_name_tool -change process exited with code: <${exitCode}> for file <${Path.withoutDirectory(homebrewPath)}>'); - } + System.runCommand("", "install_name_tool", ["-change", homebrewPath, newPath, absoluteFilePath]); } } }