summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/makefile.cpp21
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp67
-rw-r--r--qmake/generators/win32/msvc_vcproj.h1
-rw-r--r--qmake/library/qmakeevaluator.cpp2
-rw-r--r--qmake/library/qmakeevaluator_p.h1
5 files changed, 82 insertions, 10 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 766904cd60..570f3216e3 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -234,7 +234,7 @@ MakefileGenerator::initOutPaths()
pathRef += Option::dir_sep;
}
- if(noIO())
+ if (noIO() || (project->first("TEMPLATE") == "subdirs"))
continue;
QString path = project->first(dkey).toQString(); //not to be changed any further
@@ -1886,10 +1886,10 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
if (config.indexOf("combine") != -1) {
// compilers with a combined input only have one output
QString input = project->first(ProKey(*it + ".output")).toQString();
- t << " " << escapeDependencyPath(replaceExtraCompilerVariables(tmp_out, input, QString()));
+ t << " " << escapeDependencyPath(Option::fixPathToTargetOS(replaceExtraCompilerVariables(tmp_out, input, QString())));
} else {
for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) {
- t << " " << escapeDependencyPath(replaceExtraCompilerVariables(tmp_out, (*input).toQString(), QString()));
+ t << " " << escapeDependencyPath(Option::fixPathToTargetOS(replaceExtraCompilerVariables(tmp_out, (*input).toQString(), QString())));
}
}
t << endl;
@@ -1920,8 +1920,8 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
if(project->isActiveConfig("no_delete_multiple_files")) {
for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) {
QString tinp = (*input).toQString();
- cleans.append(" " + replaceExtraCompilerVariables(tmp_clean, tinp,
- replaceExtraCompilerVariables(tmp_out, tinp, QString())));
+ cleans.append(" " + Option::fixPathToTargetOS(replaceExtraCompilerVariables(tmp_clean, tinp,
+ replaceExtraCompilerVariables(tmp_out, tinp, QString()))));
}
} else {
QString files, file;
@@ -1935,7 +1935,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
cleans.append(files);
files.clear();
}
- files += file;
+ files += Option::fixPathToTargetOS(file);
}
if(!files.isEmpty())
cleans.append(files);
@@ -1955,7 +1955,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
}
QStringList tmp_dep = project->values(ProKey(*it + ".depends")).toQStringList();
if (config.indexOf("combine") != -1) {
- if(tmp_out.indexOf("${QMAKE_") != -1) {
+ if (tmp_out.contains(QRegExp("(^|[^$])\\$\\{QMAKE_(?!VAR_)"))) {
warn_msg(WarnLogic, "QMAKE_EXTRA_COMPILERS(%s) with combine has variable output.",
(*it).toLatin1().constData());
continue;
@@ -2031,8 +2031,9 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
if (inputs.isEmpty())
continue;
- QString cmd = replaceExtraCompilerVariables(tmp_cmd, escapeFilePaths(inputs), QStringList(tmp_out));
- t << escapeDependencyPath(tmp_out) << ":";
+ QString out = replaceExtraCompilerVariables(tmp_out, QString(), QString());
+ QString cmd = replaceExtraCompilerVariables(tmp_cmd, escapeFilePaths(inputs), QStringList() << out);
+ t << escapeDependencyPath(Option::fixPathToTargetOS(out)) << ":";
// compiler.CONFIG+=explicit_dependencies means that ONLY compiler.depends gets to cause Makefile dependencies
if (config.indexOf("explicit_dependencies") != -1) {
t << " " << valList(escapeDependencyPaths(fileFixify(tmp_dep, Option::output_dir, Option::output_dir)));
@@ -2047,7 +2048,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
QString in = Option::fixPathToTargetOS(inpf, false);
QStringList deps = findDependencies(inpf);
deps += escapeDependencyPath(in);
- QString out = unescapeFilePath(replaceExtraCompilerVariables(tmp_out, inpf, QString()));
+ QString out = unescapeFilePath(Option::fixPathToTargetOS(replaceExtraCompilerVariables(tmp_out, inpf, QString())));
if(!tmp_dep.isEmpty()) {
QStringList pre_deps = fileFixify(tmp_dep, Option::output_dir, Option::output_dir);
for(int i = 0; i < pre_deps.size(); ++i)
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 7f4240f196..730a7cfa46 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -879,6 +879,11 @@ void VcprojGenerator::initProject()
initFormFiles();
initResourceFiles();
initExtraCompilerOutputs();
+ if (vcProject.Configuration.WinRT) {
+ if (vcProject.Configuration.WinPhone
+ && vcProject.Configuration.ConfigurationType == typeApplication)
+ initWMAppManifest();
+ }
// Own elements -----------------------------
vcProject.Name = unescapeFilePath(project->first("QMAKE_ORIG_TARGET").toQString());
@@ -1565,6 +1570,68 @@ void VcprojGenerator::initExtraCompilerOutputs()
}
}
+void VcprojGenerator::initWMAppManifest()
+{
+ if (!project->isActiveConfig("autogen_wmappmanifest"))
+ return;
+
+ // autogen_wmappmanifest
+ QFile file(Option::output_dir + "\\WMAppManifest.xml");
+ if (!file.open(QFile::WriteOnly))
+ return;
+
+ QTextStream stream(&file);
+
+ QString productID = project->first("PRODUCTID").toQString();
+ QString target = project->first("TARGET").toQString();
+ QString author = project->first("AUTHOR").toQString();
+ QString publisher = project->first("PUBLISHER").toQString();
+ QString publisherID = project->first("PUBLISHERID").toQString();
+ QString description = project->first("DESCRIPTION").toQString();
+
+ if (author.isEmpty())
+ author = "Qt";
+ if (publisher.isEmpty())
+ publisher = "Qt";
+ if (productID.isEmpty())
+ productID = QUuid::createUuid().toString();
+ if (publisherID.isEmpty())
+ publisherID = QUuid::createUuid().toString();
+
+ stream << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
+ << "<Deployment xmlns=\"http://schemas.microsoft.com/windowsphone/2012/deployment\" AppPlatformVersion=\"8.0\">\n"
+ << " <DefaultLanguage xmlns=\"\" code=\"en-US\"/>\n"
+ << " <App xmlns=\"\" ProductID=\"" << productID << "\" Title=\"" << target
+ << "\" RuntimeType=\"Modern Native\" Version=\"1.0.0.0\""
+ << " Genre=\"apps.normal\" Author=\"" << author
+ << "\" Description=\"" << description << "\" Publisher=\"" << publisher
+ << "\" PublisherID=\"" << publisherID << "\">\n"
+ << " <IconPath IsRelative=\"true\" IsResource=\"false\">ApplicationIcon.png</IconPath>\n"
+ << " <Capabilities>\n"
+ << " <Capability Name=\"ID_CAP_NETWORKING\" />\n"
+ << " <Capability Name=\"ID_CAP_MEDIALIB_AUDIO\" />\n"
+ << " <Capability Name=\"ID_CAP_MEDIALIB_PLAYBACK\" />\n"
+ << " </Capabilities>\n"
+ << " <Tasks>\n"
+ << " <DefaultTask Name=\"_default\" ImagePath=\"" << target << ".exe\" ImageParams=\"\" />\n"
+ << " </Tasks>\n"
+ << " <Tokens>\n"
+ << " <PrimaryToken TokenID=\"" << target << "Token\" TaskName=\"_default\">\n"
+ << " <TemplateType5>\n"
+ << " <Count>0</Count>\n"
+ << " <Title>" << target << "</Title>\n"
+ << " </TemplateType5>\n"
+ << " </PrimaryToken>\n"
+ << " </Tokens>\n"
+ << " <ScreenResolutions>\n"
+ << " <ScreenResolution Name=\"ID_RESOLUTION_WVGA\" />\n"
+ << " <ScreenResolution Name=\"ID_RESOLUTION_WXGA\" />\n"
+ << " <ScreenResolution Name=\"ID_RESOLUTION_HD720P\" />\n"
+ << " </ScreenResolutions>\n"
+ << " </App>\n"
+ << "</Deployment>\n";
+}
+
void VcprojGenerator::initOld()
{
// $$QMAKE.. -> $$MSVCPROJ.. -------------------------------------
diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h
index 561e56d232..d531085307 100644
--- a/qmake/generators/win32/msvc_vcproj.h
+++ b/qmake/generators/win32/msvc_vcproj.h
@@ -120,6 +120,7 @@ protected:
void initDeploymentFiles();
void initLexYaccFiles();
void initExtraCompilerOutputs();
+ void initWMAppManifest();
void writeSubDirs(QTextStream &t); // Called from VCXProj backend
QUuid getProjectUUID(const QString &filename=QString()); // Called from VCXProj backend
diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp
index 0df69890b3..1b323439ab 100644
--- a/qmake/library/qmakeevaluator.cpp
+++ b/qmake/library/qmakeevaluator.cpp
@@ -121,6 +121,7 @@ void QMakeEvaluator::initStatics()
statics.strfalse = QLatin1String("false");
statics.strCONFIG = ProKey("CONFIG");
statics.strARGS = ProKey("ARGS");
+ statics.strARGC = ProKey("ARGC");
statics.strDot = QLatin1String(".");
statics.strDotDot = QLatin1String("..");
statics.strever = QLatin1String("ever");
@@ -1642,6 +1643,7 @@ ProStringList QMakeEvaluator::evaluateFunction(
m_valuemapStack.top()[ProKey(QString::number(i+1))] = argumentsList[i];
}
m_valuemapStack.top()[statics.strARGS] = args;
+ m_valuemapStack.top()[statics.strARGC] = ProStringList(ProString(QString::number(argumentsList.count())));
vr = visitProBlock(func.pro(), func.tokPtr());
if (vr == ReturnReturn)
vr = ReturnTrue;
diff --git a/qmake/library/qmakeevaluator_p.h b/qmake/library/qmakeevaluator_p.h
index 935f112f52..c6cb60744f 100644
--- a/qmake/library/qmakeevaluator_p.h
+++ b/qmake/library/qmakeevaluator_p.h
@@ -83,6 +83,7 @@ struct QMakeStatics {
QString strfalse;
ProKey strCONFIG;
ProKey strARGS;
+ ProKey strARGC;
QString strDot;
QString strDotDot;
QString strever;