diff --git a/src/libs/utils/consoleprocess_unix.cpp b/src/libs/utils/consoleprocess_unix.cpp index 15cc2b574e8..c70c7e7444a 100644 --- a/src/libs/utils/consoleprocess_unix.cpp +++ b/src/libs/utils/consoleprocess_unix.cpp @@ -151,12 +151,8 @@ bool ConsoleProcess::start(const QString &program, const QString &args) } } - QString stubPath = QCoreApplication::applicationDirPath(); - if (HostOsInfo::isMacHost()) - stubPath.append(QLatin1String("/../Resources/qtcreator_process_stub")); - else - stubPath.append(QLatin1String("/qtcreator_process_stub")); - + const QString stubPath = QCoreApplication::applicationDirPath() + + QLatin1String("/" QTC_REL_TOOLS_PATH "/qtcreator_process_stub"); QStringList allArgs = xtermArgs.toUnixArgs(); allArgs << stubPath << modeOption(d->m_mode) diff --git a/src/libs/utils/utils.pro b/src/libs/utils/utils.pro index 2016bcbd4b1..cb28e4ad43e 100644 --- a/src/libs/utils/utils.pro +++ b/src/libs/utils/utils.pro @@ -6,3 +6,5 @@ include(utils-lib.pri) win32: LIBS += -luser32 -lshell32 # PortsGatherer win32: LIBS += -liphlpapi -lws2_32 + +DEFINES += QTC_REL_TOOLS_PATH=$$shell_quote(\"$$relative_path($$IDE_LIBEXEC_PATH, $$IDE_BIN_PATH)\") diff --git a/src/libs/utils/utils.qbs b/src/libs/utils/utils.qbs index 419c508dc8e..e905e5d8e43 100644 --- a/src/libs/utils/utils.qbs +++ b/src/libs/utils/utils.qbs @@ -1,9 +1,14 @@ import qbs 1.0 +import qbs.FileInfo QtcLibrary { name: "Utils" - cpp.defines: base.concat("QTCREATOR_UTILS_LIB") + cpp.defines: base.concat([ + "QTCREATOR_UTILS_LIB", + "QTC_REL_TOOLS_PATH=\"" + FileInfo.relativePath(project.ide_bin_path, + project.ide_libexec_path) + "\"" + ]) Properties { condition: qbs.targetOS.contains("windows")