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
This commit is contained in:
@@ -710,23 +710,13 @@ class MacPlatform extends PlatformTarget
|
|||||||
if (isLibrary)
|
if (isLibrary)
|
||||||
{
|
{
|
||||||
var newId = "@executable_path/" + fileName;
|
var newId = "@executable_path/" + fileName;
|
||||||
var process = new Process("install_name_tool", ["-id", newId, absoluteFilePath]);
|
System.runCommand("", "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}>');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (homebrewPath in homebrewDependencyPaths)
|
for (homebrewPath in homebrewDependencyPaths)
|
||||||
{
|
{
|
||||||
var newPath = "@executable_path/" + Path.withoutDirectory(homebrewPath);
|
var newPath = "@executable_path/" + Path.withoutDirectory(homebrewPath);
|
||||||
var process = new Process("install_name_tool", ["-change", homebrewPath, newPath, absoluteFilePath]);
|
System.runCommand("", "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)}>');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user