diff options
author | Richard Weickelt <richard@weickelt.de> | 2020-02-05 12:28:43 +0100 |
---|---|---|
committer | Richard Weickelt <richard@weickelt.de> | 2020-02-05 12:28:43 +0100 |
commit | 7e91a76534f5d45ea0901074d4afafacb2fcec9b (patch) | |
tree | 89d4c08234416fe2f0611131aa9f112492008563 | |
parent | e130e492ebe6ad266a74df7b7d5efdef55dc0ff7 (diff) | |
parent | bf059105305fd33440940338a7aeb67ec75cb18e (diff) |
Merge branch '1.15' into master
Change-Id: I7e348db380b836221db79c73ea3b5f1d891f114b
-rw-r--r-- | doc/qbs.qdoc | 2 | ||||
-rw-r--r-- | scripts/make-release-archives.bat | 1 | ||||
-rw-r--r-- | share/qbs/module-providers/Qt/setup-qt.js | 5 | ||||
-rw-r--r-- | share/qbs/modules/cpp/msvc.js | 5 | ||||
-rw-r--r-- | share/qbs/modules/java/utils.js | 2 | ||||
-rw-r--r-- | src/lib/corelib/language/moduleloader.cpp | 4 | ||||
-rw-r--r-- | src/lib/corelib/tools/vsenvironmentdetector.cpp | 2 | ||||
-rw-r--r-- | src/lib/scriptengine/use_scriptengine.pri | 10 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/probeProperties/probeProperties.qbs | 51 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.cpp | 3 |
10 files changed, 59 insertions, 26 deletions
diff --git a/doc/qbs.qdoc b/doc/qbs.qdoc index b6e1bd096..0b1592bfd 100644 --- a/doc/qbs.qdoc +++ b/doc/qbs.qdoc @@ -592,7 +592,7 @@ is required to build against the \QBS libraries. \row \li enableBundledQt - \li \c true + \li \c false \li Holds whether the Qt libraries that \QBS depends on will be bundled with \QBS during the \c install step. This option is only implemented on macOS. \row diff --git a/scripts/make-release-archives.bat b/scripts/make-release-archives.bat index 867fa773c..0970d2702 100644 --- a/scripts/make-release-archives.bat +++ b/scripts/make-release-archives.bat @@ -68,6 +68,7 @@ subst Q: "%CD%" && Q: qbs build --settings-dir "%builddir%\.settings"^ -f qbs.qbs -d "%builddir%\build"^ -p dist qbs.buildVariant:release project.withDocumentation:false "products.qbs archive.includeTopLevelDir:true"^ + modules.qbsbuildconfig.enableBundledQt:true^ config:release "qbs.installRoot:%builddir%\qbs-windows-x86-%version%" profile:qt^ config:release-64 "qbs.installRoot:%builddir%\qbs-windows-x86_64-%version%" profile:qt64 || exit /b diff --git a/share/qbs/module-providers/Qt/setup-qt.js b/share/qbs/module-providers/Qt/setup-qt.js index 6960b15d9..b30cdfd7a 100644 --- a/share/qbs/module-providers/Qt/setup-qt.js +++ b/share/qbs/module-providers/Qt/setup-qt.js @@ -652,11 +652,14 @@ function doSetupLibraries(modInfo, qtProps, debugBuild, nonExistingPrlFiles, and var prlFilePath = modInfo.isPlugin ? FileInfo.joinPaths(qtProps.pluginPath, modInfo.pluginData.type) : (modInfo.libDir ? modInfo.libDir : qtProps.libraryPath); + var libDir = prlFilePath; if (isFramework(modInfo, qtProps)) { prlFilePath = FileInfo.joinPaths(prlFilePath, libraryBaseName(modInfo, qtProps, false) + ".framework"); + libDir = prlFilePath; + if (Utilities.versionCompare(qtProps.qtVersion, "5.14") >= 0) + prlFilePath = FileInfo.joinPaths(prlFilePath, "Resources"); } - var libDir = prlFilePath; var baseName = libraryBaseName(modInfo, qtProps, debugBuild); if (!qtProps.mkspecName.startsWith("win") && !isFramework(modInfo, qtProps)) baseName = "lib" + baseName; diff --git a/share/qbs/modules/cpp/msvc.js b/share/qbs/modules/cpp/msvc.js index 479f7f416..c06286cbe 100644 --- a/share/qbs/modules/cpp/msvc.js +++ b/share/qbs/modules/cpp/msvc.js @@ -593,7 +593,10 @@ function prepareLinker(project, product, inputs, outputs, input, output) { cmd.responseFileSeparator = useCompilerDriver ? ' ' : '\n'; cmd.stdoutFilterFunction = function(output) { res = output.replace(/^.*performing full link.*\s*/, ""); - return res.replace(/^ *Creating library.*\r\n$/, ""); + res = res.replace(/^ *Creating library.*\s*/, ""); + res = res.replace(/^\s*Generating code\s*/, ""); + res = res.replace(/^\s*Finished generating code\s*/, ""); + return res; }; commands.push(cmd); diff --git a/share/qbs/modules/java/utils.js b/share/qbs/modules/java/utils.js index ae0c1356b..0e11b7d3e 100644 --- a/share/qbs/modules/java/utils.js +++ b/share/qbs/modules/java/utils.js @@ -136,7 +136,7 @@ function findJdkVersion(compilerFilePath) { var p = new Process(); try { p.exec(compilerFilePath, ["-version"]); - var re = /^javac (([0-9]+(?:\.[0-9]+){0,2})(_([0-9]+))?)$/m; + var re = /^javac (([0-9]+(?:\.[0-9]+){0,2})(_([0-9]+))?)(.*)?$/m; var match = p.readStdErr().trim().match(re); if (!match) match = p.readStdOut().trim().match(re); diff --git a/src/lib/corelib/language/moduleloader.cpp b/src/lib/corelib/language/moduleloader.cpp index 55b671022..07276bbdc 100644 --- a/src/lib/corelib/language/moduleloader.cpp +++ b/src/lib/corelib/language/moduleloader.cpp @@ -706,6 +706,9 @@ void ModuleLoader::handleProject(ModuleLoaderResult *loadResult, m_qbsVersion.toString())); } + for (Item * const child : projectItem->children()) + child->setScope(projectContext.scope); + resolveProbes(&dummyProductContext, projectItem); projectContext.topLevelProject->probes << dummyProductContext.info.probes; @@ -713,7 +716,6 @@ void ModuleLoader::handleProject(ModuleLoaderResult *loadResult, QList<Item *> multiplexedProducts; for (Item * const child : projectItem->children()) { - child->setScope(projectContext.scope); if (child->type() == ItemType::Product) multiplexedProducts << multiplexProductItem(&dummyProductContext, child); } diff --git a/src/lib/corelib/tools/vsenvironmentdetector.cpp b/src/lib/corelib/tools/vsenvironmentdetector.cpp index b2fd7caf5..95451435a 100644 --- a/src/lib/corelib/tools/vsenvironmentdetector.cpp +++ b/src/lib/corelib/tools/vsenvironmentdetector.cpp @@ -234,6 +234,8 @@ void VsEnvironmentDetector::writeBatchFile(QIODevice *device, const QString &vcv QTextStream s(device); using Qt::endl; s << "@echo off" << endl; + // Avoid execution of powershell (in vsdevcmd.bat), which is not in the cleared PATH + s << "set VSCMD_SKIP_SENDTELEMETRY=1" << endl; for (const MSVC *msvc : msvcs) { s << "echo --" << msvc->architecture << "--" << endl << "setlocal" << endl; diff --git a/src/lib/scriptengine/use_scriptengine.pri b/src/lib/scriptengine/use_scriptengine.pri index 6450e171f..e8f82a949 100644 --- a/src/lib/scriptengine/use_scriptengine.pri +++ b/src/lib/scriptengine/use_scriptengine.pri @@ -3,7 +3,15 @@ isEmpty(QBSLIBDIR) { QBSLIBDIR = $$shadowed($$PWD/../../../$${QBS_LIBRARY_DIRNAME}) } - LIBS += -L$$QBSLIBDIR -lqbsscriptengine$$qtPlatformTargetSuffix() + + LIBS += -L$$QBSLIBDIR + macos { + LIBS += -lqbsscriptengine + } + else { + LIBS += -lqbsscriptengine$$qtPlatformTargetSuffix() + } + } INCLUDEPATH += \ diff --git a/tests/auto/blackbox/testdata/probeProperties/probeProperties.qbs b/tests/auto/blackbox/testdata/probeProperties/probeProperties.qbs index 9846eacef..ce89d11f4 100644 --- a/tests/auto/blackbox/testdata/probeProperties/probeProperties.qbs +++ b/tests/auto/blackbox/testdata/probeProperties/probeProperties.qbs @@ -1,29 +1,40 @@ import qbs.Probes -CppApplication { - Probes.PathProbe { - id: probe1 - names: ["bin/tool"] - platformSearchPaths: [product.sourceDirectory] - } +Project { - Probes.PathProbe { - id: probe2 - names: ["tool"] - platformSearchPaths: [product.sourceDirectory + "/bin"] - } + CppApplication { + Probes.PathProbe { + id: probe1 + names: ["bin/tool"] + platformSearchPaths: [product.sourceDirectory] + } - targetName: { - console.info("probe1.fileName=" + probe1.fileName); - console.info("probe1.path=" + probe1.path); - console.info("probe1.filePath=" + probe1.filePath); + Probes.PathProbe { + id: probe2 + names: ["tool"] + platformSearchPaths: [product.sourceDirectory + "/bin"] + } - console.info("probe2.fileName=" + probe2.fileName); - console.info("probe2.path=" + probe2.path); - console.info("probe2.filePath=" + probe2.filePath); + targetName: { + console.info("probe1.fileName=" + probe1.fileName); + console.info("probe1.path=" + probe1.path); + console.info("probe1.filePath=" + probe1.filePath); - return name; + console.info("probe2.fileName=" + probe2.fileName); + console.info("probe2.path=" + probe2.path); + console.info("probe2.filePath=" + probe2.filePath); + + console.info("probe3.fileName=" + probe3.fileName); + console.info("probe3.path=" + probe3.path); + console.info("probe3.filePath=" + probe3.filePath); + return name; + } + } + + Probes.PathProbe { + id: probe3 + names: ["tool"] + platformSearchPaths: [project.sourceDirectory + "/bin"] } - files: ["main.c"] } diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index 63bfc5922..360b02d4e 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -3047,6 +3047,9 @@ void TestBlackbox::probeProperties() QVERIFY2(m_qbsStdout.contains("probe2.fileName=tool"), m_qbsStdout.constData()); QVERIFY2(m_qbsStdout.contains("probe2.path=" + dir + "/bin"), m_qbsStdout.constData()); QVERIFY2(m_qbsStdout.contains("probe2.filePath=" + dir + "/bin/tool"), m_qbsStdout.constData()); + QVERIFY2(m_qbsStdout.contains("probe3.fileName=tool"), m_qbsStdout.constData()); + QVERIFY2(m_qbsStdout.contains("probe3.path=" + dir + "/bin"), m_qbsStdout.constData()); + QVERIFY2(m_qbsStdout.contains("probe3.filePath=" + dir + "/bin/tool"), m_qbsStdout.constData()); } void TestBlackbox::probesAndShadowProducts() |