diff options
-rw-r--r-- | src/libs/installer/macreplaceinstallnamesoperation.cpp | 10 | ||||
-rw-r--r-- | tools/binarycreator/resources/copylibsintobundle.sh | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/libs/installer/macreplaceinstallnamesoperation.cpp b/src/libs/installer/macreplaceinstallnamesoperation.cpp index 9ec553358..b8f55dc14 100644 --- a/src/libs/installer/macreplaceinstallnamesoperation.cpp +++ b/src/libs/installer/macreplaceinstallnamesoperation.cpp @@ -146,9 +146,9 @@ bool MacReplaceInstallNamesOperation::apply(const QString &searchString, const Q int MacReplaceInstallNamesOperation::updateExecutableInfo(MacBinaryInfo *binaryInfo) { QProcessWrapper otool; - otool.start(QLatin1String("otool"), QStringList() << QLatin1String("-l") << binaryInfo->fileName); + otool.start(QLatin1String("xcrun"), QStringList(QLatin1String("otool")) << QLatin1String("-l") << binaryInfo->fileName); if (!otool.waitForStarted()) { - setError(UserDefinedError, tr("Cannot invoke otool. Is Xcode installed?")); + setError(UserDefinedError, tr("Cannot run otool. Is Xcode installed?")); return -1; } otool.waitForFinished(); @@ -201,8 +201,8 @@ void MacReplaceInstallNamesOperation::relocateBinary(const MacBinaryInfo &info, if (!info.dynamicLibId.isEmpty() && (info.dynamicLibId != QFileInfo(info.fileName).fileName()) && !info.dynamicLibId.contains(QLatin1String("@"))) { // error is set inside the execCommand method - if (!execCommand(QLatin1String("install_name_tool"), QStringList(QLatin1String("-id")) - << info.fileName << info.fileName)) { + if (!execCommand(QLatin1String("xcrun"), QStringList(QLatin1String("install_name_tool")) + << QLatin1String("-id") << info.fileName << info.fileName)) { return; } } @@ -220,7 +220,7 @@ void MacReplaceInstallNamesOperation::relocateBinary(const MacBinaryInfo &info, // error is set inside the execCommand method // last argument is the file target which will be patched - execCommand(QLatin1String("install_name_tool"), args << info.fileName); + execCommand(QLatin1String("xcrun"), QStringList(QLatin1String("install_name_tool")) << args << info.fileName); } bool MacReplaceInstallNamesOperation::execCommand(const QString &cmd, const QStringList &args) diff --git a/tools/binarycreator/resources/copylibsintobundle.sh b/tools/binarycreator/resources/copylibsintobundle.sh index 3fd562dce..23484ef4a 100644 --- a/tools/binarycreator/resources/copylibsintobundle.sh +++ b/tools/binarycreator/resources/copylibsintobundle.sh @@ -58,7 +58,7 @@ function handleFile() local BUNDLE=$2 # all dynamic libs directly needed by the bundle, which are not in /System/Library or in /usr/lib (which are system default libs, which we don't want) - local LIBS=`otool -L $FILE | grep -v 'executable_path' | grep -v '/System/Library' | grep -v '/usr/lib' | grep '/' | sed -ne 's,^ *\(.*\) (.*,\1,p'` + local LIBS=`xcrun otool -L $FILE | grep -v 'executable_path' | grep -v '/System/Library' | grep -v '/usr/lib' | grep '/' | sed -ne 's,^ *\(.*\) (.*,\1,p'` local lib for lib in $LIBS; do @@ -111,7 +111,7 @@ function handleFile() handleFile "$BUNDLE/Contents/Frameworks/$NEWFRAMEWORKPATH" "$BUNDLE" fi # and inform the dynamic linker about this - install_name_tool -change $lib @executable_path/../Frameworks/$NEWFRAMEWORKPATH $FILE + xcrun install_name_tool -change $lib @executable_path/../Frameworks/$NEWFRAMEWORKPATH $FILE # this part handles 'normal' dynamic libraries (.dylib) @@ -137,7 +137,7 @@ function handleFile() fi # and inform the dynamic linker about this - install_name_tool -change $lib @executable_path/../Frameworks/$NAME $FILE + xcrun install_name_tool -change $lib @executable_path/../Frameworks/$NAME $FILE fi fi @@ -163,13 +163,13 @@ function handleQtPlugins() if echo $plugin | grep 'debug' >/dev/null; then #if [ $IS_DEBUG -eq 1 ]; then cp "$PLUGINPATH/$CLASS/$plugin" $BUNDLE/Contents/plugins/$CLASS - install_name_tool -change $plugin @executable_path/../plugins/$CLASS/$plugin $EXECUTABLE + xcrun install_name_tool -change $plugin @executable_path/../plugins/$CLASS/$plugin $EXECUTABLE handleFile $BUNDLE/Contents/plugins/$CLASS/$plugin $BUNDLE #fi else #if [ $IS_DEBUG -eq 0 ]; then cp "$PLUGINPATH/$CLASS/$plugin" $BUNDLE/Contents/plugins/$CLASS - install_name_tool -change $plugin @executable_path/../plugins/$CLASS/$plugin $EXECUTABLE + xcrun install_name_tool -change $plugin @executable_path/../plugins/$CLASS/$plugin $EXECUTABLE handleFile $BUNDLE/Contents/plugins/$CLASS/$plugin $BUNDLE #fi fi |