summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tools/sdktool/addqtoperation.cpp1
-rw-r--r--src/tools/sdktool/sdktool.pro10
-rw-r--r--src/tools/sdktool/settings.cpp35
3 files changed, 13 insertions, 33 deletions
diff --git a/src/tools/sdktool/addqtoperation.cpp b/src/tools/sdktool/addqtoperation.cpp
index 4f29501b67..7ed44d7754 100644
--- a/src/tools/sdktool/addqtoperation.cpp
+++ b/src/tools/sdktool/addqtoperation.cpp
@@ -68,7 +68,6 @@ QString AddQtOperation::argumentsHelpText() const
" --name <NAME> display name of the new Qt version. (required)\n"
" --qmake <PATH> path to qmake. (required)\n"
" --type <TYPE> type of Qt version to add. (required)\n"
- " --noauto do not mark tool chain as autodetected.\n"
" <KEY> <TYPE:VALUE> extra key value pairs\n");
}
diff --git a/src/tools/sdktool/sdktool.pro b/src/tools/sdktool/sdktool.pro
index 28bbd4f271..868c660ac5 100644
--- a/src/tools/sdktool/sdktool.pro
+++ b/src/tools/sdktool/sdktool.pro
@@ -1,7 +1,9 @@
include(../../../qtcreator.pri)
+include(../../rpath.pri)
include(../../libs/utils/utils.pri)
CONFIG += console
+CONFIG -= app_bundle
QT -= gui test
@@ -36,9 +38,7 @@ HEADERS += \
rmtoolchainoperation.h \
settings.h \
-INCLUDEPATH += \
- $$PWD/../../plugins \
- $$PWD/../../libs
-
-DESTDIR=$$IDE_APP_PATH
+DESTDIR=$$IDE_LIBEXEC_PATH
+macx:DEFINES += "DATA_PATH=\"\\\".\\\"\""
+else:DEFINES += "DATA_PATH=\"\\\"../share/qtcreator\\\"\""
diff --git a/src/tools/sdktool/settings.cpp b/src/tools/sdktool/settings.cpp
index 3ccad8f8f6..125676098b 100644
--- a/src/tools/sdktool/settings.cpp
+++ b/src/tools/sdktool/settings.cpp
@@ -31,10 +31,12 @@
#include "settings.h"
#include "operation.h"
+#include <app/app_version.h>
+
#include <iostream>
#include <QCoreApplication>
-#include <QFileInfo>
+#include <QDir>
Settings *Settings::m_instance = 0;
@@ -50,32 +52,11 @@ Settings::Settings() :
m_instance = this;
// autodetect sdk dir:
- Utils::FileName sdk = Utils::FileName::fromString(QCoreApplication::applicationDirPath());
- Utils::FileName qtc = sdk;
- qtc.appendPath(QLatin1String("qtcreator"));
-#ifdef Q_OS_WIN
- qtc.append(".exe");
-#endif
-
- QFileInfo qtcFi = qtc.toFileInfo();
- if (!qtcFi.exists() || !qtcFi.isFile() || !qtcFi.isExecutable()) {
- // we are in src/tools/sdktool (or lib/qtcreator/bin):
- qtc = sdk;
- qtc.appendPath(QLatin1String("../../../bin/qtcreator"));
-#ifdef Q_OS_WIN
- qtc.append(".exe");
-#endif
- qtcFi = qtc.toFileInfo();
- if (!qtcFi.exists() || !qtcFi.isFile() || !qtcFi.isExecutable())
- qtc.clear();
- }
-
- if (!qtc.isEmpty()) {
- sdk = qtc.parentDir();
- sdk = sdk.parentDir();
- sdk.appendPath(QLatin1String("share/qtcreator/Nokia/qtcreator"));
- sdkPath = sdk;
- }
+ sdkPath = Utils::FileName::fromString(QCoreApplication::applicationDirPath());
+ sdkPath.appendPath(QLatin1String(DATA_PATH));
+ sdkPath = Utils::FileName::fromString(QDir::cleanPath(sdkPath.toString()));
+ sdkPath.appendPath(QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR)
+ + QLatin1String("/qtcreator"));
}
Utils::FileName Settings::getPath(const QString &file)