forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/3.1'
Conflicts: src/plugins/winrt/winrtruncontrol.cpp src/plugins/winrt/winrtruncontrol.h Change-Id: Idad0558e53e23debee8523586b681af4705e97f6
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -9,22 +9,18 @@ QtcPlugin {
|
|||||||
property var externalQbsIncludes: project.useExternalQbs
|
property var externalQbsIncludes: project.useExternalQbs
|
||||||
? [project.qbs_install_dir + "/include/qbs"] : []
|
? [project.qbs_install_dir + "/include/qbs"] : []
|
||||||
property var externalQbsLibraryPaths: project.useExternalQbs
|
property var externalQbsLibraryPaths: project.useExternalQbs
|
||||||
? [project.qbs_install_dir + "/lib"] : []
|
? [project.qbs_install_dir + '/' + project.libDirName] : []
|
||||||
property var externalQbsRPaths: project.useExternalQbs
|
|
||||||
? [project.qbs_install_dir + "/lib"] : []
|
|
||||||
property var externalQbsDynamicLibraries: {
|
property var externalQbsDynamicLibraries: {
|
||||||
var libs = []
|
var libs = []
|
||||||
if (!project.useExternalQbs)
|
if (!project.useExternalQbs)
|
||||||
return libs;
|
return libs;
|
||||||
|
var suffix = "";
|
||||||
if (qbs.targetOS.contains("windows")) {
|
if (qbs.targetOS.contains("windows")) {
|
||||||
libs.push("shell32")
|
libs.push("shell32")
|
||||||
if (qbs.enableDebugCode)
|
if (qbs.enableDebugCode)
|
||||||
libs.push("qbscored")
|
suffix = "d";
|
||||||
else
|
|
||||||
libs.push("qbscore")
|
|
||||||
} else {
|
|
||||||
libs.push("qbscore")
|
|
||||||
}
|
}
|
||||||
|
libs.push("qbscore" + suffix, "qbsqtprofilesetup" + suffix);
|
||||||
return libs
|
return libs
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +57,7 @@ QtcPlugin {
|
|||||||
])
|
])
|
||||||
cpp.includePaths: base.concat(externalQbsIncludes)
|
cpp.includePaths: base.concat(externalQbsIncludes)
|
||||||
cpp.libraryPaths: base.concat(externalQbsLibraryPaths)
|
cpp.libraryPaths: base.concat(externalQbsLibraryPaths)
|
||||||
cpp.rpaths: base.concat(externalQbsRPaths)
|
cpp.rpaths: base.concat(externalQbsLibraryPaths)
|
||||||
cpp.dynamicLibraries: base.concat(externalQbsDynamicLibraries)
|
cpp.dynamicLibraries: base.concat(externalQbsDynamicLibraries)
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
|
@@ -197,7 +197,7 @@ static int extractDeviceId(QByteArray *line)
|
|||||||
|
|
||||||
static IDevice::MachineType machineTypeFromLine(const QByteArray &line)
|
static IDevice::MachineType machineTypeFromLine(const QByteArray &line)
|
||||||
{
|
{
|
||||||
return line.startsWith("Emulator ") ? IDevice::Emulator : IDevice::Hardware;
|
return line.contains("Emulator ") ? IDevice::Emulator : IDevice::Hardware;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -206,6 +206,19 @@ static IDevice::MachineType machineTypeFromLine(const QByteArray &line)
|
|||||||
* Available devices:
|
* Available devices:
|
||||||
* Appx:
|
* Appx:
|
||||||
* 0 local
|
* 0 local
|
||||||
|
* Phone:
|
||||||
|
* 0 Device
|
||||||
|
* 1 Emulator 8.1 WVGA 4 inch 512MB
|
||||||
|
* 2 Emulator 8.1 WVGA 4 inch
|
||||||
|
* 3 Emulator 8.1 WXGA 4 inch
|
||||||
|
* 4 Emulator 8.1 720P 4.7 inch
|
||||||
|
* 5 Emulator 8.1 1080P 5.5 inch
|
||||||
|
* 6 Emulator 8.1 1080P 6 inch
|
||||||
|
* 7 WE8.1H Emulator WVGA 512MB
|
||||||
|
* 8 WE8.1H Emulator WVGA
|
||||||
|
* 9 WE8.1H Emulator WXGA
|
||||||
|
* 10 WE8.1H Emulator 720P
|
||||||
|
* 11 WE8.1H Emulator 1080P
|
||||||
* Xap:
|
* Xap:
|
||||||
* 0 Device
|
* 0 Device
|
||||||
* 1 Emulator WVGA 512MB
|
* 1 Emulator WVGA 512MB
|
||||||
@@ -216,7 +229,7 @@ static IDevice::MachineType machineTypeFromLine(const QByteArray &line)
|
|||||||
void WinRtDeviceFactory::parseRunnerOutput(const QByteArray &output) const
|
void WinRtDeviceFactory::parseRunnerOutput(const QByteArray &output) const
|
||||||
{
|
{
|
||||||
ProjectExplorer::DeviceManager *deviceManager = ProjectExplorer::DeviceManager::instance();
|
ProjectExplorer::DeviceManager *deviceManager = ProjectExplorer::DeviceManager::instance();
|
||||||
enum State { StartState, AppxState, XapState };
|
enum State { StartState, AppxState, PhoneState, XapState };
|
||||||
State state = StartState;
|
State state = StartState;
|
||||||
int numFound = 0;
|
int numFound = 0;
|
||||||
int numSkipped = 0;
|
int numSkipped = 0;
|
||||||
@@ -224,6 +237,8 @@ void WinRtDeviceFactory::parseRunnerOutput(const QByteArray &output) const
|
|||||||
line = line.trimmed();
|
line = line.trimmed();
|
||||||
if (line == "Appx:") {
|
if (line == "Appx:") {
|
||||||
state = AppxState;
|
state = AppxState;
|
||||||
|
} else if (line == "Phone:") {
|
||||||
|
state = PhoneState;
|
||||||
} else if (line == "Xap:") {
|
} else if (line == "Xap:") {
|
||||||
state = XapState;
|
state = XapState;
|
||||||
} else {
|
} else {
|
||||||
@@ -239,6 +254,13 @@ void WinRtDeviceFactory::parseRunnerOutput(const QByteArray &output) const
|
|||||||
internalName += QStringLiteral("appx.");
|
internalName += QStringLiteral("appx.");
|
||||||
deviceType = Constants::WINRT_DEVICE_TYPE_LOCAL;
|
deviceType = Constants::WINRT_DEVICE_TYPE_LOCAL;
|
||||||
name = tr("Windows Runtime local UI");
|
name = tr("Windows Runtime local UI");
|
||||||
|
} else if (state == PhoneState) {
|
||||||
|
internalName += QStringLiteral("phone.");
|
||||||
|
name = QString::fromLocal8Bit(line);
|
||||||
|
if (machineType == IDevice::Emulator)
|
||||||
|
deviceType = Constants::WINRT_DEVICE_TYPE_EMULATOR;
|
||||||
|
else
|
||||||
|
deviceType = Constants::WINRT_DEVICE_TYPE_PHONE;
|
||||||
} else if (state == XapState) {
|
} else if (state == XapState) {
|
||||||
internalName += QStringLiteral("xap.");
|
internalName += QStringLiteral("xap.");
|
||||||
name = QString::fromLocal8Bit(line);
|
name = QString::fromLocal8Bit(line);
|
||||||
|
@@ -71,15 +71,15 @@ bool WinRtPackageDeploymentStep::init()
|
|||||||
if (!qt)
|
if (!qt)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_isWinPhone = (qt->type() == QLatin1String(Constants::WINRT_WINPHONEQT));
|
|
||||||
|
|
||||||
QString args = QtcProcess::quoteArg(QDir::toNativeSeparators(targetPath));
|
QString args = QtcProcess::quoteArg(QDir::toNativeSeparators(targetPath));
|
||||||
args += QLatin1Char(' ') + m_args;
|
args += QLatin1Char(' ') + m_args;
|
||||||
if (m_isWinPhone) {
|
|
||||||
m_manifestFileName = QLatin1String("WMAppManifest");
|
m_manifestFileName = QStringLiteral("AppxManifest");
|
||||||
|
|
||||||
|
if (qt->type() == QLatin1String(Constants::WINRT_WINPHONEQT)
|
||||||
|
&& qt->mkspec().toString().contains(QLatin1String("msvc2012"))) {
|
||||||
m_createMappingFile = true;
|
m_createMappingFile = true;
|
||||||
} else {
|
m_manifestFileName = QStringLiteral("WMAppManifest");
|
||||||
m_manifestFileName = QLatin1String("AppxManifest");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_createMappingFile) {
|
if (m_createMappingFile) {
|
||||||
|
@@ -61,7 +61,6 @@ private:
|
|||||||
QString m_executablePathInManifest;
|
QString m_executablePathInManifest;
|
||||||
QString m_mappingFileContent;
|
QString m_mappingFileContent;
|
||||||
QString m_manifestFileName;
|
QString m_manifestFileName;
|
||||||
bool m_isWinPhone;
|
|
||||||
bool m_createMappingFile;
|
bool m_createMappingFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -83,7 +83,6 @@ bool WinRtRunnerHelper::init(WinRtRunConfiguration *runConfiguration, QString *e
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_isWinPhone = (qt->type() == QLatin1String(Constants::WINRT_WINPHONEQT));
|
|
||||||
m_runnerFilePath = qt->binPath().toString() + QStringLiteral("/winrtrunner.exe");
|
m_runnerFilePath = qt->binPath().toString() + QStringLiteral("/winrtrunner.exe");
|
||||||
if (!QFile::exists(m_runnerFilePath)) {
|
if (!QFile::exists(m_runnerFilePath)) {
|
||||||
*errorMessage = tr("Cannot find winrtrunner.exe in \"%1\".").arg(
|
*errorMessage = tr("Cannot find winrtrunner.exe in \"%1\".").arg(
|
||||||
@@ -181,8 +180,6 @@ void WinRtRunnerHelper::startWinRtRunner(const RunConf &conf)
|
|||||||
{
|
{
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
QString runnerArgs;
|
QString runnerArgs;
|
||||||
QtcProcess::addArg(&runnerArgs, QStringLiteral("--profile"));
|
|
||||||
QtcProcess::addArg(&runnerArgs, m_isWinPhone ? QStringLiteral("xap") : QStringLiteral("appx"));
|
|
||||||
if (m_device) {
|
if (m_device) {
|
||||||
QtcProcess::addArg(&runnerArgs, QStringLiteral("--device"));
|
QtcProcess::addArg(&runnerArgs, QStringLiteral("--device"));
|
||||||
QtcProcess::addArg(&runnerArgs, QString::number(m_device->deviceId()));
|
QtcProcess::addArg(&runnerArgs, QString::number(m_device->deviceId()));
|
||||||
|
@@ -89,7 +89,6 @@ private:
|
|||||||
QString m_debuggerArguments;
|
QString m_debuggerArguments;
|
||||||
QString m_arguments;
|
QString m_arguments;
|
||||||
bool m_uninstallAfterStop;
|
bool m_uninstallAfterStop;
|
||||||
bool m_isWinPhone;
|
|
||||||
Utils::QtcProcess *m_process;
|
Utils::QtcProcess *m_process;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -196,17 +196,17 @@ QMakeEvaluator::~QMakeEvaluator()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeEvaluator::initFrom(const QMakeEvaluator &other)
|
void QMakeEvaluator::initFrom(const QMakeEvaluator *other)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(&other, "QMakeEvaluator::visitProFile", "Project not prepared");
|
Q_ASSERT_X(other, "QMakeEvaluator::visitProFile", "Project not prepared");
|
||||||
m_functionDefs = other.m_functionDefs;
|
m_functionDefs = other->m_functionDefs;
|
||||||
m_valuemapStack = other.m_valuemapStack;
|
m_valuemapStack = other->m_valuemapStack;
|
||||||
m_valuemapInited = true;
|
m_valuemapInited = true;
|
||||||
m_qmakespec = other.m_qmakespec;
|
m_qmakespec = other->m_qmakespec;
|
||||||
m_qmakespecName = other.m_qmakespecName;
|
m_qmakespecName = other->m_qmakespecName;
|
||||||
m_mkspecPaths = other.m_mkspecPaths;
|
m_mkspecPaths = other->m_mkspecPaths;
|
||||||
m_featureRoots = other.m_featureRoots;
|
m_featureRoots = other->m_featureRoots;
|
||||||
m_dirSep = other.m_dirSep;
|
m_dirSep = other->m_dirSep;
|
||||||
}
|
}
|
||||||
|
|
||||||
//////// Evaluator tools /////////
|
//////// Evaluator tools /////////
|
||||||
@@ -1354,7 +1354,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile(
|
|||||||
return ReturnFalse;
|
return ReturnFalse;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
initFrom(*baseEnv->evaluator);
|
initFrom(baseEnv->evaluator);
|
||||||
} else {
|
} else {
|
||||||
if (!m_valuemapInited)
|
if (!m_valuemapInited)
|
||||||
loadDefaults();
|
loadDefaults();
|
||||||
|
@@ -155,7 +155,7 @@ public:
|
|||||||
bool prepareProject(const QString &inDir);
|
bool prepareProject(const QString &inDir);
|
||||||
bool loadSpecInternal();
|
bool loadSpecInternal();
|
||||||
bool loadSpec();
|
bool loadSpec();
|
||||||
void initFrom(const QMakeEvaluator &other);
|
void initFrom(const QMakeEvaluator *other);
|
||||||
void setupProject();
|
void setupProject();
|
||||||
void evaluateCommand(const QString &cmds, const QString &where);
|
void evaluateCommand(const QString &cmds, const QString &where);
|
||||||
void applyExtraConfigs();
|
void applyExtraConfigs();
|
||||||
|
Reference in New Issue
Block a user