diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-10-08 10:33:42 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-10-08 10:33:42 (GMT) |
commit | e086a153c25d3bd5d58d72c34384d8452cb3b3be (patch) | |
tree | 1ec8e8bfa3fc3a99b1285cc863e61ec65a97ee48 /qmake | |
parent | a780773292c3a59e1500f5e36c3de729a8f45f1c (diff) | |
parent | 392ecc76cdbcef37ee492400a1b783106a37ad36 (diff) | |
download | Qt-e086a153c25d3bd5d58d72c34384d8452cb3b3be.zip Qt-e086a153c25d3bd5d58d72c34384d8452cb3b3be.tar.gz Qt-e086a153c25d3bd5d58d72c34384d8452cb3b3be.tar.bz2 |
Merge remote branch 'qt/master' into earth/file-engine-refactor
Conflicts:
src/s60installs/bwins/QtGuiu.def
src/s60installs/eabi/QtGuiu.def
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/symbian/initprojectdeploy_symbian.cpp | 20 | ||||
-rw-r--r-- | qmake/generators/symbian/initprojectdeploy_symbian.h | 6 | ||||
-rw-r--r-- | qmake/generators/symbian/symbiancommon.cpp | 123 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake.cpp | 12 | ||||
-rw-r--r-- | qmake/generators/win32/msbuild_objectmodel.cpp | 42 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_nmake.cpp | 5 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.cpp | 49 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.h | 3 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 26 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.h | 1 |
10 files changed, 102 insertions, 185 deletions
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp index 776a646..5a6f66f 100644 --- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp +++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp @@ -248,6 +248,8 @@ void initProjectDeploySymbian(QMakeProject* project, continue; } + QStringList flags = project->values(item + ".flags"); + foreach(QString source, project->values(item + ".sources")) { source = Option::fixPathToLocalOS(source); QString nameFilter; @@ -279,13 +281,15 @@ void initProjectDeploySymbian(QMakeProject* project, Option::fixPathToLocalOS(targetPath.absolutePath() + "/" + info.fileName(), false, true), fixPathToEpocOS(devicePath.left(2) + QLatin1String(SYSBIN_DIR "/") - + info.fileName()))); + + info.fileName()), + flags)); } else { deploymentList.append(CopyItem( Option::fixPathToLocalOS(targetPath.absolutePath() + "/" + info.fileName(), false, true), fixPathToEpocOS(deploymentDrive + QLatin1String("/" SYSBIN_DIR "/") - + info.fileName()))); + + info.fileName()), + flags)); } } if (isPlugin(info, devicePath)) { @@ -296,7 +300,8 @@ void initProjectDeploySymbian(QMakeProject* project, // Generate deployment even if file doesn't exist, as this may be the case // when generating .pkg files. deploymentList.append(CopyItem(Option::fixPathToLocalOS(info.absoluteFilePath()), - fixPathToEpocOS(devicePath + "/" + info.fileName()))); + fixPathToEpocOS(devicePath + "/" + info.fileName()), + flags)); continue; } } @@ -323,12 +328,14 @@ void initProjectDeploySymbian(QMakeProject* project, deploymentList.append(CopyItem( Option::fixPathToLocalOS(absoluteItemPath + "/" + iterator.fileName()), fixPathToEpocOS(devicePath.left(2) + QLatin1String(SYSBIN_DIR "/") - + iterator.fileName()))); + + iterator.fileName()), + flags)); } else { deploymentList.append(CopyItem( Option::fixPathToLocalOS(absoluteItemPath + "/" + iterator.fileName()), fixPathToEpocOS(deploymentDrive + QLatin1String("/" SYSBIN_DIR "/") - + iterator.fileName()))); + + iterator.fileName()), + flags)); } } createPluginStub(info, devicePath + "/" + absoluteItemPath.right(diffSize), @@ -338,7 +345,8 @@ void initProjectDeploySymbian(QMakeProject* project, deploymentList.append(CopyItem( Option::fixPathToLocalOS(absoluteItemPath + "/" + iterator.fileName()), fixPathToEpocOS(devicePath + "/" + absoluteItemPath.right(diffSize) - + "/" + iterator.fileName()))); + + "/" + iterator.fileName()), + flags)); } } } diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.h b/qmake/generators/symbian/initprojectdeploy_symbian.h index 2653d2a..bc17b04 100644 --- a/qmake/generators/symbian/initprojectdeploy_symbian.h +++ b/qmake/generators/symbian/initprojectdeploy_symbian.h @@ -56,9 +56,13 @@ struct CopyItem { - CopyItem(const QString& f, const QString& t) : from(f) , to(t) { } + CopyItem(const QString& f, const QString& t) + : from(f) , to(t) { } + CopyItem(const QString& f, const QString& t, const QStringList& l) + : from(f) , to(t), flags(l) { } QString from; QString to; + QStringList flags; }; typedef QList<CopyItem> DeploymentList; diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index 91e126c..0938b58 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -320,7 +320,9 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB // Package header QString sisHeader = "; SIS header: name, uid, version\n#{\"%1\"},(%2),%3\n\n"; - QString visualTarget = generator->escapeFilePath(project->first("TARGET")); + QString visualTarget = project->values("DEPLOYMENT.display_name").join(" "); + if (visualTarget.isEmpty()) + visualTarget = generator->escapeFilePath(project->first("TARGET")); visualTarget = removePathSeparators(visualTarget); QString wrapperTarget = visualTarget + " installer"; @@ -383,87 +385,7 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB t << manufacturerStr << endl; } - // Install paths on the phone *** should be dynamic at some point - QString installPathBin = "!:\\sys\\bin"; - QString installPathResource = "!:\\resource\\apps"; - QString installPathRegResource = "!:\\private\\10003a3f\\import\\apps"; - - // Find location of builds - QString destDirBin; - QString destDirResource; - QString destDirRegResource; - if (epocBuild) { - destDirBin = QString("%1epoc32/release/$(PLATFORM)/$(TARGET)").arg(epocRoot()); - destDirResource = QString("%1epoc32/data/z/resource/apps").arg(epocRoot()); - destDirRegResource = QString("%1epoc32/data/z/private/10003a3f/import/apps").arg(epocRoot()); - } else { - destDirBin = project->first("DESTDIR"); - if (destDirBin.isEmpty()) - destDirBin = "."; - else if (destDirBin.endsWith('/') || destDirBin.endsWith('\\')) - destDirBin.chop(1); - destDirResource = destDirBin; - destDirRegResource = destDirBin; - } - - if (targetType == TypeExe) { - // deploy .exe file - t << "; Executable and default resource files" << endl; - QString exeFile = fixedTarget + ".exe"; - t << QString("\"%1/%2\" - \"%3\\%4\"") - .arg(destDirBin) - .arg(exeFile) - .arg(installPathBin) - .arg(exeFile) << endl; - ts << QString("\"\" - \"%1\\%2\"") - .arg(romPath(installPathBin)) - .arg(exeFile) << endl; - - // deploy rsc & reg_rsc file - if (!project->isActiveConfig("no_icon")) { - t << QString("\"%1/%2\" - \"%3\\%4\"") - .arg(destDirResource) - .arg(fixedTarget + ".rsc") - .arg(installPathResource) - .arg(fixedTarget + ".rsc") << endl; - ts << QString("\"\" - \"%1\\%2\"") - .arg(romPath(installPathResource)) - .arg(fixedTarget + ".rsc") << endl; - - t << QString("\"%1/%2\" - \"%3\\%4\"") - .arg(destDirRegResource) - .arg(fixedTarget + "_reg.rsc") - .arg(installPathRegResource) - .arg(fixedTarget + "_reg.rsc") << endl; - ts << QString("\"\" - \"%1\\%2\"") - .arg(romPath(installPathRegResource)) - .arg(fixedTarget + "_reg.rsc") << endl; - - if (!iconFile.isEmpty()) { - if (epocBuild) { - t << QString("\"%1epoc32/data/z%2\" - \"!:%3\"") - .arg(epocRoot()) - .arg(iconFile) - .arg(QDir::toNativeSeparators(iconFile)) << endl << endl; - ts << QString("\"\" - \"%1\"") - .arg(romPath(QDir::toNativeSeparators(iconFile))) << endl << endl; - } else { - QDir mifIconDir(project->first("DESTDIR")); - QFileInfo mifIcon(mifIconDir.relativeFilePath(project->first("TARGET"))); - QString mifIconFileName = mifIcon.fileName(); - mifIconFileName.append(".mif"); - t << QString("\"%1/%2\" - \"!:%3\"") - .arg(mifIcon.path()) - .arg(mifIconFileName) - .arg(QDir::toNativeSeparators(iconFile)) << endl << endl; - ts << QString("\"\" - \"%1\"") - .arg(romPath(QDir::toNativeSeparators(iconFile))) << endl << endl; - } - } - } - } - - // deploy any additional DEPLOYMENT files + // deploy files specified by DEPLOYMENT variable QString remoteTestPath; QString zDir; remoteTestPath = QString("!:\\private\\%1").arg(privateDirUid); @@ -477,6 +399,15 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB for (int i = 0; i < depList.size(); ++i) { QString from = depList.at(i).from; QString to = depList.at(i).to; + QString flags; + bool showOnlyFile = false; + foreach(QString flag, depList.at(i).flags) { + if (flag == QLatin1String("FT") + || flag == QLatin1String("FILETEXT")) { + showOnlyFile = true; + } + flags.append(QLatin1Char(',')).append(flag); + } if (epocBuild) { // Deploy anything not already deployed from under epoc32 instead from under @@ -490,8 +421,15 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB } } - t << QString("\"%1\" - \"%2\"").arg(from.replace('\\','/')).arg(to) << endl; - ts << QString("\"\" - \"%1\"").arg(romPath(to)) << endl; + // Files with "FILETEXT"/"FT" flag are meant for showing only at installation time + // and therefore do not belong to the stub package and will not install the file into phone. + if (showOnlyFile) + to.clear(); + else + ts << QString("\"\" - \"%1\"").arg(romPath(to)) << endl; + + t << QString("\"%1\" - \"%2\"%3").arg(from.replace('\\','/')).arg(to).arg(flags) << endl; + } t << endl; ts << endl; @@ -705,6 +643,11 @@ void SymbianCommonGenerator::writeLocFile(QStringList &symbianLangCodes) if (ft.open(QIODevice::WriteOnly)) { generatedFiles << ft.fileName(); QTextStream t(&ft); + + QString displayName = generator->project->values("DEPLOYMENT.display_name").join(" "); + if (displayName.isEmpty()) + displayName = generator->escapeFilePath(generator->project->first("TARGET")); + t << "// ============================================================================" << endl; t << "// * Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: "; t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl; @@ -713,16 +656,16 @@ void SymbianCommonGenerator::writeLocFile(QStringList &symbianLangCodes) t << "// ============================================================================" << endl; t << endl; t << "#ifdef LANGUAGE_SC" << endl; - t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl; - t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl; + t << "#define STRING_r_short_caption \"" << displayName << "\"" << endl; + t << "#define STRING_r_caption \"" << displayName << "\"" << endl; foreach(QString lang, symbianLangCodes) { t << "#elif defined LANGUAGE_" << lang << endl; - t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl; - t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl; + t << "#define STRING_r_short_caption \"" << displayName << "\"" << endl; + t << "#define STRING_r_caption \"" << displayName << "\"" << endl; } t << "#else" << endl; - t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl; - t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl; + t << "#define STRING_r_short_caption \"" << displayName << "\"" << endl; + t << "#define STRING_r_caption \"" << displayName << "\"" << endl; t << "#endif" << endl; } else { PRINT_FILE_CREATE_ERROR(filename); diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index da4bbb7..71a6061 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -636,11 +636,13 @@ UnixMakefileGenerator::processPrlFiles() if(opt.startsWith("-L") || (Option::target_mode == Option::TARG_MACX_MODE && opt.startsWith("-F"))) { - if(lit == 0 || !lflags[arch].contains(opt)) - lflags[arch].append(opt); - } else if(opt.startsWith("-l")) { - if(lit == l.size()-1 || !lflags[arch].contains(opt)) + if(!lflags[arch].contains(opt)) lflags[arch].append(opt); + } else if(opt.startsWith("-l") || opt == "-pthread") { + // Make sure we keep the dependency-order of libraries + if (lflags[arch].contains(opt)) + lflags[arch].removeAll(opt); + lflags[arch].append(opt); } else if(Option::target_mode == Option::TARG_MACX_MODE && opt.startsWith("-framework")) { if(opt.length() > 11) opt = opt.mid(11); @@ -672,7 +674,7 @@ UnixMakefileGenerator::processPrlFiles() lflags[arch].append(opt); } } else if(!opt.isNull()) { - if(lit == 0 || l.lastIndexOf(opt, lit-1) == -1) + if(!lflags[arch].contains(opt)) lflags[arch].append(opt); } } diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index a397ae9..76df854 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -313,6 +313,16 @@ inline XmlOutput::xml_output valueTagT( const triState v) return valueTag(v == _True ? "true" : "false"); } +static QString vcxCommandSeparator() +{ + // MSBuild puts the contents of the custom commands into a batch file and calls it. + // As we want every sub-command to be error-checked (as is done by makefile-based + // backends), we insert the checks ourselves, using the undocumented jump target. + static QString cmdSep = + QLatin1String("
if errorlevel 1 goto VCEnd
"); + return cmdSep; +} + // Tree file generation --------------------------------------------- void XTreeNode::generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString &tagName, VCProject &tool, const QString &filter) { @@ -1423,32 +1433,6 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCMIDLTool &tool) void VCXProjectWriter::write(XmlOutput &xml, const VCCustomBuildTool &tool) { - // The code below offers two ways to split custom build step commands. - // Normally the $$escape_expand(\n\t) is used in a project file, which is correctly translated - // in all generators. However, if you use $$escape_expand(\n\r) (or \n\h) instead, the VCPROJ - // generator will instead of binding the commands with " && " will insert a proper newline into - // the VCPROJ file. We sometimes use this method of splitting commands if the custom buildstep - // contains a command-line which is too big to run on certain OS. - QString cmds; - int end = tool.CommandLine.count(); - for(int i = 0; i < end; ++i) { - QString cmdl = tool.CommandLine.at(i); - if (cmdl.contains("\r\t")) { - if (i == end - 1) - cmdl = cmdl.trimmed(); - cmdl.replace("\r\t", " && "); - } else if (cmdl.contains("\r\n")) { - ; - } else if (cmdl.contains("\r\\h")) { - // The above \r\n should work, but doesn't, so we have this hack - cmdl.replace("\r\\h", "\r\n"); - } else { - if (i < end - 1) - cmdl += " && "; - } - cmds += cmdl; - } - const QString &configName = tool.config->Name; if ( !tool.AdditionalDependencies.isEmpty() ) @@ -1458,11 +1442,11 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCCustomBuildTool &tool) << valueTagDefX(tool.AdditionalDependencies, "AdditionalInputs", ";"); } - if( !cmds.isEmpty() ) + if( !tool.CommandLine.isEmpty() ) { xml << tag("Command") << attrTag("Condition", QString("'$(Configuration)|$(Platform)'=='%1'").arg(configName)) - << valueTag(cmds); + << valueTag(tool.CommandLine.join(vcxCommandSeparator())); } if ( !tool.Description.isEmpty() ) @@ -1528,7 +1512,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCEventTool &tool) { xml << tag(tool.EventName) - << attrTagS(_Command, tool.CommandLine) + << attrTagS(_Command, tool.CommandLine.join(vcxCommandSeparator())) << attrTagS(_Message, tool.Description) << closetag(tool.EventName); } diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 0adb152..d32b888 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -312,10 +312,7 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t) t << "\n\tsigntool sign /F " << signature << " $(DESTDIR_TARGET)"; } if(!project->isEmpty("QMAKE_POST_LINK")) { - if (useSignature) - t << " && " << var("QMAKE_POST_LINK"); - else - t << "\n\t" << var("QMAKE_POST_LINK"); + t << "\n\t" << var("QMAKE_POST_LINK"); } t << endl; } diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index b1de302..b20d2b7 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -288,6 +288,24 @@ triState operator!(const triState &rhs) return lhs; } +// VCToolBase ------------------------------------------------- +QStringList VCToolBase::fixCommandLine(const QString &input) +{ + // The splitting regexp is a bit bizarre for backwards compat reasons (why else ...). + return input.split(QRegExp(QLatin1String("\n\t|\r\\\\h|\r\n"))); +} + +static QString vcCommandSeparator() +{ + // MSVC transforms the build tree into a single batch file, simply pasting the contents + // of the custom commands into it, and putting an "if errorlevel goto" statement behind it. + // As we want every sub-command to be error-checked (as is done by makefile-based + // backends), we insert the checks ourselves, using the undocumented jump target. + static QString cmdSep = + QLatin1String("
if errorlevel 1 goto VCReportError
"); + return cmdSep; +} + // VCCLCompilerTool ------------------------------------------------- VCCLCompilerTool::VCCLCompilerTool() : AssemblerOutput(asmListingNone), @@ -2272,7 +2290,7 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info) if (!CustomBuildTool.Description.isEmpty()) CustomBuildTool.Description += " & "; CustomBuildTool.Description += cmd_name; - CustomBuildTool.CommandLine += cmd.trimmed().split("\n", QString::SkipEmptyParts); + CustomBuildTool.CommandLine += VCToolBase::fixCommandLine(cmd.trimmed()); int space = cmd.indexOf(' '); QFileInfo finf(cmd.left(space)); if (CustomBuildTool.ToolPath.isEmpty()) @@ -2605,35 +2623,10 @@ void VCProjectWriter::write(XmlOutput &xml, const VCMIDLTool &tool) void VCProjectWriter::write(XmlOutput &xml, const VCCustomBuildTool &tool) { - // The code below offers two ways to split custom build step commands. - // Normally the $$escape_expand(\n\t) is used in a project file, which is correctly translated - // in all generators. However, if you use $$escape_expand(\n\r) (or \n\h) instead, the VCPROJ - // generator will instead of binding the commands with " && " will insert a proper newline into - // the VCPROJ file. We sometimes use this method of splitting commands if the custom buildstep - // contains a command-line which is too big to run on certain OS. - QString cmds; - int end = tool.CommandLine.count(); - for(int i = 0; i < end; ++i) { - QString cmdl = tool.CommandLine.at(i); - if (cmdl.contains("\r\t")) { - if (i == end - 1) - cmdl = cmdl.trimmed(); - cmdl.replace("\r\t", " && "); - } else if (cmdl.contains("\r\n")) { - ; - } else if (cmdl.contains("\r\\h")) { - // The above \r\n should work, but doesn't, so we have this hack - cmdl.replace("\r\\h", "\r\n"); - } else { - if (i < end - 1) - cmdl += " && "; - } - cmds += cmdl; - } xml << tag(_Tool) << attrS(_Name, tool.ToolName) << attrX(_AdditionalDependencies, tool.AdditionalDependencies, ";") - << attrS(_CommandLine, cmds) + << attrS(_CommandLine, tool.CommandLine.join(vcCommandSeparator())) << attrS(_Description, tool.Description) << attrX(_Outputs, tool.Outputs, ";") << attrS(_Path, tool.ToolPath) @@ -2681,7 +2674,7 @@ void VCProjectWriter::write(XmlOutput &xml, const VCEventTool &tool) << tag(_Tool) << attrS(_Name, tool.ToolName) << attrS(_Path, tool.ToolPath) - << attrS(_CommandLine, tool.CommandLine) + << attrS(_CommandLine, tool.CommandLine.join(vcCommandSeparator())) << attrS(_Description, tool.Description) << attrT(_ExcludedFromBuild, tool.ExcludedFromBuild) << closetag(_Tool); diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h index c70e897..b80d8d0 100644 --- a/qmake/generators/win32/msvc_objectmodel.h +++ b/qmake/generators/win32/msvc_objectmodel.h @@ -478,6 +478,7 @@ public: for (QStringList::ConstIterator it=options.begin(); (it!=options.end()); it++) parseOption((*it).toLatin1()); } + static QStringList fixCommandLine(const QString &input); }; class VCConfiguration; @@ -804,7 +805,7 @@ protected: public: // Variables - QString CommandLine; + QStringList CommandLine; QString Description; triState ExcludedFromBuild; QString EventName; diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 3c42f14..06b726f 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1068,37 +1068,23 @@ void VcprojGenerator::initPreBuildEventTools() { } -QString VcprojGenerator::fixCommandLine(DotNET version, const QString &input) const -{ - QString result = input; - - if (version >= NET2005) - result = result.replace(QLatin1Char('\n'), QLatin1String("
")); - - return result; -} - void VcprojGenerator::initPostBuildEventTools() { VCConfiguration &conf = vcProject.Configuration; if(!project->values("QMAKE_POST_LINK").isEmpty()) { - QString cmdline = fixCommandLine(conf.CompilerVersion, var("QMAKE_POST_LINK")); + QStringList cmdline = VCToolBase::fixCommandLine(var("QMAKE_POST_LINK")); conf.postBuild.CommandLine = cmdline; - if (conf.CompilerVersion < NET2005) - cmdline = cmdline.replace("\n", "&&"); - conf.postBuild.Description = cmdline; + conf.postBuild.Description = cmdline.join(QLatin1String("\r\n")); } QString signature = !project->isEmpty("SIGNATURE_FILE") ? var("SIGNATURE_FILE") : var("DEFAULT_SIGNATURE"); bool useSignature = !signature.isEmpty() && !project->isActiveConfig("staticlib") && !project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH"); if(useSignature) - conf.postBuild.CommandLine.prepend(QLatin1String("signtool sign /F ") + signature + " \"$(TargetPath)\"\n" + - (!conf.postBuild.CommandLine.isEmpty() ? " && " : "")); + conf.postBuild.CommandLine.prepend( + QLatin1String("signtool sign /F ") + signature + QLatin1String(" \"$(TargetPath)\"")); if(!project->values("MSVCPROJ_COPY_DLL").isEmpty()) { - if(!conf.postBuild.CommandLine.isEmpty()) - conf.postBuild.CommandLine += " && "; conf.postBuild.Description += var("MSVCPROJ_COPY_DLL_DESC"); conf.postBuild.CommandLine += var("MSVCPROJ_COPY_DLL"); } @@ -1227,9 +1213,9 @@ void VcprojGenerator::initPreLinkEventTools() { VCConfiguration &conf = vcProject.Configuration; if(!project->values("QMAKE_PRE_LINK").isEmpty()) { - QString cmdline = fixCommandLine(conf.CompilerVersion, var("QMAKE_PRE_LINK")); - conf.preLink.Description = cmdline; + QStringList cmdline = VCToolBase::fixCommandLine(var("QMAKE_PRE_LINK")); conf.preLink.CommandLine = cmdline; + conf.preLink.Description = cmdline.join(QLatin1String("\r\n")); } } diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h index a603500..e843375 100644 --- a/qmake/generators/win32/msvc_vcproj.h +++ b/qmake/generators/win32/msvc_vcproj.h @@ -132,7 +132,6 @@ protected: QList<VcprojGenerator*> mergedProjects; private: - QString fixCommandLine(DotNET version, const QString &input) const; QUuid increaseUUID(const QUuid &id); friend class VCFilter; }; |