Hello community, here is the log from the commit of package qbs for openSUSE:Factory checked in at 2019-07-16 08:40:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qbs (Old) and /work/SRC/openSUSE:Factory/.qbs.new.1887 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qbs" Tue Jul 16 08:40:34 2019 rev:4 rq:714858 version:1.13.1 Changes: -------- --- /work/SRC/openSUSE:Factory/qbs/qbs.changes 2019-05-03 22:47:05.787861487 +0200 +++ /work/SRC/openSUSE:Factory/.qbs.new.1887/qbs.changes 2019-07-16 08:40:42.883024009 +0200 @@ -1,0 +2,11 @@ +Fri Jul 12 11:32:50 UTC 2019 - Christophe Giboudeaux <[email protected]> + +- Update to 1.13.1 + * Qt support: Plugins are no longer linked into static libraries when building against + a static Qt (QBS-1441). + * Qt support: Fixed excessively long linker command lines (QBS-1441). + * Qt support: Host libraries are now looked up at the right location (QBS-1445). + * Qt support: Fixed failure to find Qt modules in Qt Creator when re-parsing a project that + hasn't been built yet. + +------------------------------------------------------------------- Old: ---- qbs-src-1.13.0.tar.gz New: ---- qbs-src-1.13.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qbs.spec ++++++ --- /var/tmp/diff_new_pack.TM0Kdo/_old 2019-07-16 08:40:43.447024198 +0200 +++ /var/tmp/diff_new_pack.TM0Kdo/_new 2019-07-16 08:40:43.451024199 +0200 @@ -19,7 +19,7 @@ %define qt5_version 5.9.0 Name: qbs -Version: 1.13.0 +Version: 1.13.1 Release: 0 Summary: Modern build tool for software projects License: (LGPL-2.1-with-Qt-Company-Qt-exception-1.1 OR LGPL-3.0-only) AND GPL-3.0-with-Qt-Company-Qt-exception-1.1 ++++++ qbs-src-1.13.0.tar.gz -> qbs-src-1.13.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/VERSION new/qbs-src-1.13.1/VERSION --- old/qbs-src-1.13.0/VERSION 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/VERSION 2019-05-23 19:02:41.000000000 +0200 @@ -1 +1 @@ -1.13.0 +1.13.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/changelogs/changes-1.13.1.md new/qbs-src-1.13.1/changelogs/changes-1.13.1.md --- old/qbs-src-1.13.0/changelogs/changes-1.13.1.md 1970-01-01 01:00:00.000000000 +0100 +++ new/qbs-src-1.13.1/changelogs/changes-1.13.1.md 2019-05-23 19:02:41.000000000 +0200 @@ -0,0 +1,9 @@ +# Important bugfixes +* Qt support: Plugins are no longer linked into static libraries when building against + a static Qt (QBS-1441). +* Qt support: Fixed excessively long linker command lines (QBS-1441). +* Qt support: Host libraries are now looked up at the right location (QBS-1445). +* Qt support: Fixed failure to find Qt modules in Qt Creator when re-parsing a project that + hasn't been built yet. +* macOS: Properties in bundle.infoPlist are no longer overridden (QBS-1447). +* iOS: Fixed generation of default Info.plist (QBS-1447). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/doc/reference/modules/qt-plugin_support-module.qdoc new/qbs-src-1.13.1/doc/reference/modules/qt-plugin_support-module.qdoc --- old/qbs-src-1.13.0/doc/reference/modules/qt-plugin_support-module.qdoc 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/doc/reference/modules/qt-plugin_support-module.qdoc 2019-05-23 19:02:41.000000000 +0200 @@ -75,3 +75,11 @@ \readonly */ +/*! + \qmlproperty bool Qt.plugin_support::linkPlugins + + Controls whether plugins of a statically built Qt should be linked into the product. + + \defaultvalue \c true if the product is an application or shared library, \c false otherwise. + +*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/scripts/make-release-archives.bat new/qbs-src-1.13.1/scripts/make-release-archives.bat --- old/qbs-src-1.13.0/scripts/make-release-archives.bat 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/scripts/make-release-archives.bat 2019-05-23 19:02:41.000000000 +0200 @@ -68,8 +68,8 @@ qbs build --settings-dir "%builddir%\.settings"^ -f qbs.qbs -d "%builddir%\build"^ -p dist qbs.buildVariant:release "products.qbs archive.includeTopLevelDir:true"^ - release "qbs.installRoot:%builddir%\qbs-windows-x86-%version%" profile:qt^ - release-64 "qbs.installRoot:%builddir%\qbs-windows-x86_64-%version%" profile:qt64 || exit /b + 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 copy /y "%builddir%\build\release\qbs.%version%.nupkg" dist || exit /b copy /y "%builddir%\build\release\qbs-windows-x86-%version%.zip" dist || exit /b diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/share/qbs/imports/qbs/DarwinTools/darwin-tools.js new/qbs-src-1.13.1/share/qbs/imports/qbs/DarwinTools/darwin-tools.js --- old/qbs-src-1.13.0/share/qbs/imports/qbs/DarwinTools/darwin-tools.js 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/share/qbs/imports/qbs/DarwinTools/darwin-tools.js 2019-05-23 19:02:41.000000000 +0200 @@ -78,7 +78,7 @@ function targetedDeviceFamily(deviceNames) { return deviceNames.map(function (deviceName) { return appleDeviceNumber(deviceName); - }).join(","); + }); } /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/share/qbs/module-providers/Qt/setup-qt.js new/qbs-src-1.13.1/share/qbs/module-providers/Qt/setup-qt.js --- old/qbs-src-1.13.0/share/qbs/module-providers/Qt/setup-qt.js 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/share/qbs/module-providers/Qt/setup-qt.js 2019-05-23 19:02:41.000000000 +0200 @@ -226,6 +226,7 @@ qtProps.documentationPath = pathQueryValue(queryResult, "QT_INSTALL_DOCS"); qtProps.includePath = pathQueryValue(queryResult, "QT_INSTALL_HEADERS"); qtProps.libraryPath = pathQueryValue(queryResult, "QT_INSTALL_LIBS"); + qtProps.hostLibraryPath = pathQueryValue(queryResult, "QT_HOST_LIBS"); qtProps.binaryPath = pathQueryValue(queryResult, "QT_HOST_BINS") || pathQueryValue(queryResult, "QT_INSTALL_BINS"); qtProps.documentationPath = pathQueryValue(queryResult, "QT_INSTALL_DOCS"); @@ -417,8 +418,10 @@ moduleInfo.name = ""; moduleInfo.qbsName = qbsName; // Lower-case version without "qt" prefix. moduleInfo.dependencies = deps || []; // qbs names. - if (moduleInfo.qbsName !== "core" && !moduleInfo.dependencies.contains("core")) + if (moduleInfo.qbsName && moduleInfo.qbsName !== "core" + && !moduleInfo.dependencies.contains("core")) { moduleInfo.dependencies.unshift("core"); + } moduleInfo.isPrivate = qbsName && qbsName.endsWith("-private"); moduleInfo.hasLibrary = !moduleInfo.isPrivate; moduleInfo.isStaticLibrary = false; @@ -441,6 +444,7 @@ moduleInfo.frameworkPathsDebug = []; moduleInfo.frameworkPathsRelease = []; moduleInfo.libraryPaths = []; + moduleInfo.libDir = ""; moduleInfo.config = []; moduleInfo.supportedPluginTypes = []; moduleInfo.pluginData = makePluginData(); @@ -626,7 +630,7 @@ } var prlFilePath = modInfo.isPlugin ? FileInfo.joinPaths(qtProps.pluginPath, modInfo.pluginData.type) - : qtProps.libraryPath; + : (modInfo.libDir ? modInfo.libDir : qtProps.libraryPath); if (isFramework(modInfo, qtProps)) { prlFilePath = FileInfo.joinPaths(prlFilePath, libraryBaseName(modInfo, qtProps, false) + ".framework"); @@ -921,7 +925,7 @@ function removeDuplicatedDependencyLibs(modules) { var revDeps = {}; - var currentPath; + var currentPath = []; var getLibraries; var getLibFilePath; @@ -935,9 +939,9 @@ var depmod = moduleByName[module.dependencies[j]]; if (!depmod) continue; - if (!revDeps[depmod]) - revDeps[depmod] = []; - revDeps[depmod].push(module); + if (!revDeps[depmod.qbsName]) + revDeps[depmod.qbsName] = []; + revDeps[depmod.qbsName].push(module); } } } @@ -946,7 +950,7 @@ var result = []; for (i = 0; i < modules.length; ++i) { var module = modules[i] - if (module.dependencies.lenegth === 0) + if (module.dependencies.length === 0) result.push(module); } return result; @@ -956,7 +960,6 @@ if (currentPath.contains(module)) return; currentPath.push(module); - var moduleLibraryLists = getLibraries(module); for (var i = 0; i < moduleLibraryLists.length; ++i) { var modLibList = moduleLibraryLists[i]; @@ -973,10 +976,11 @@ libs = libs.concat(moduleLibraryLists[i]); libs.sort(); - for (i = 0; i < (revDeps[module] || []).length; ++i) - traverse(revDeps[module][i], libs); + var deps = revDeps[module.qbsName]; + for (i = 0; i < (deps || []).length; ++i) + traverse(deps[i], libs); - m_currentPath.pop(); + currentPath.pop(); } setupReverseDependencies(modules); @@ -1066,8 +1070,18 @@ for (k = 0; k < moduleInfo.includePaths.length; ++k) { moduleInfo.includePaths[k] = moduleInfo.includePaths[k] .replace("$$QT_MODULE_INCLUDE_BASE", qtProps.includePath) + .replace("$$QT_MODULE_HOST_LIB_BASE", qtProps.hostLibraryPath) .replace("$$QT_MODULE_LIB_BASE", qtProps.libraryPath); } + } else if (key.endsWith(".libs")) { + var libDirs = extractPaths(value, priFilePath); + if (libDirs.length === 1) { + moduleInfo.libDir = libDirs[0] + .replace("$$QT_MODULE_HOST_LIB_BASE", qtProps.hostLibraryPath) + .replace("$$QT_MODULE_LIB_BASE", qtProps.libraryPath); + } else { + moduleInfo.libDir = qtProps.libraryPath; + } } else if (key.endsWith(".DEFINES")) { moduleInfo.compilerDefines = splitNonEmpty(value, ' '); } else if (key.endsWith(".VERSION")) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/share/qbs/module-providers/Qt/templates/QtPlugin.qbs new/qbs-src-1.13.1/share/qbs/module-providers/Qt/templates/QtPlugin.qbs --- old/qbs-src-1.13.0/share/qbs/module-providers/Qt/templates/QtPlugin.qbs 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/share/qbs/module-providers/Qt/templates/QtPlugin.qbs 2019-05-23 19:02:41.000000000 +0200 @@ -12,6 +12,8 @@ return false; if (!isStaticLibrary) return false; + if (!Qt.plugin_support.linkPlugins) + return false; if (!(Qt.plugin_support.enabledPlugins || []).contains(qtModuleName)) return false; if (!extendsModules || extendsModules.length === 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/share/qbs/module-providers/Qt/templates/core.qbs new/qbs-src-1.13.1/share/qbs/module-providers/Qt/templates/core.qbs --- old/qbs-src-1.13.0/share/qbs/module-providers/Qt/templates/core.qbs 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/share/qbs/module-providers/Qt/templates/core.qbs 2019-05-23 19:02:41.000000000 +0200 @@ -13,7 +13,7 @@ || architectures.contains(qbs.architecture)) readonly property bool isCombinedUIKitBuild: ["ios", "tvos", "watchos"].contains(targetPlatform) - && ["x86", "x86_64"].contains(qbs.architecture) + && (!qbs.architecture || ["x86", "x86_64"].contains(qbs.architecture)) && qbs.targetPlatform === targetPlatform + "-simulator" Depends { name: "cpp" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/share/qbs/module-providers/Qt/templates/plugin_support.qbs new/qbs-src-1.13.1/share/qbs/module-providers/Qt/templates/plugin_support.qbs --- old/qbs-src-1.13.0/share/qbs/module-providers/Qt/templates/plugin_support.qbs 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/share/qbs/module-providers/Qt/templates/plugin_support.qbs 2019-05-23 19:02:41.000000000 +0200 @@ -1,6 +1,8 @@ Module { // Set by user. property varList pluginsByType + property bool linkPlugins: product.type + && (product.type.contains("application") || product.type.contains("sharedlibrary")) // Set by Qt modules. property stringList pluginTypes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/share/qbs/module-providers/Qt/templates/qml.js new/qbs-src-1.13.1/share/qbs/module-providers/Qt/templates/qml.js --- old/qbs-src-1.13.0/share/qbs/module-providers/Qt/templates/qml.js 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/share/qbs/module-providers/Qt/templates/qml.js 2019-05-23 19:02:41.000000000 +0200 @@ -44,7 +44,10 @@ var pluginLib; var otherLibs = ""; var line; - while (line = prlFile.readLine()) { + while (!prlFile.atEof()) { + line = prlFile.readLine().trim(); + if (!line) + continue; if (line.startsWith("QMAKE_PRL_TARGET")) pluginLib = FileInfo.joinPaths(pluginData.path, getPrlRhs(line)); if (line.startsWith("QMAKE_PRL_LIBS")) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/share/qbs/module-providers/Qt/templates/qml.qbs new/qbs-src-1.13.1/share/qbs/module-providers/Qt/templates/qml.qbs --- old/qbs-src-1.13.0/share/qbs/module-providers/Qt/templates/qml.qbs 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/share/qbs/module-providers/Qt/templates/qml.qbs 2019-05-23 19:02:41.000000000 +0200 @@ -24,12 +24,13 @@ readonly property string pluginListFilePathDebug: product.buildDirectory + "/plugins.list.d" readonly property string pluginListFilePathRelease: product.buildDirectory + "/plugins.list" + property bool linkPlugins: isStaticLibrary && Qt.plugin_support.linkPlugins hasLibrary: @has_library@ architectures: @archs@ targetPlatform: @targetPlatform@ - staticLibsDebug: (isStaticLibrary ? ['@' + pluginListFilePathDebug] : []).concat(@staticLibsDebug@) - staticLibsRelease: (isStaticLibrary ? ['@' + pluginListFilePathRelease] : []).concat(@staticLibsRelease@) + staticLibsDebug: (linkPlugins ? ['@' + pluginListFilePathDebug] : []).concat(@staticLibsDebug@) + staticLibsRelease: (linkPlugins ? ['@' + pluginListFilePathRelease] : []).concat(@staticLibsRelease@) dynamicLibsDebug: @dynamicLibsDebug@ dynamicLibsRelease: @dynamicLibsRelease@ linkerFlagsDebug: @linkerFlagsDebug@ @@ -60,7 +61,7 @@ } Rule { - condition: isStaticLibrary + condition: linkPlugins multiplex: true requiresInputs: false inputs: ["qt.qml.qml"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/share/qbs/modules/bundle/BundleModule.qbs new/qbs-src-1.13.1/share/qbs/modules/bundle/BundleModule.qbs --- old/qbs-src-1.13.0/share/qbs/modules/bundle/BundleModule.qbs 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/share/qbs/modules/bundle/BundleModule.qbs 2019-05-23 19:02:41.000000000 +0200 @@ -426,7 +426,8 @@ inputs.partial_infoplist[j].filePath) || {}; for (key in partialInfoPlist) { - if (partialInfoPlist.hasOwnProperty(key)) + if (partialInfoPlist.hasOwnProperty(key) + && !aggregatePlist.hasOwnProperty(key)) aggregatePlist[key] = partialInfoPlist[key]; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/share/qbs/modules/cpp/DarwinGCC.qbs new/qbs-src-1.13.1/share/qbs/modules/cpp/DarwinGCC.qbs --- old/qbs-src-1.13.0/share/qbs/modules/cpp/DarwinGCC.qbs 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/share/qbs/modules/cpp/DarwinGCC.qbs 2019-05-23 19:02:41.000000000 +0200 @@ -118,8 +118,12 @@ dict["LSRequiresIPhoneOS"] = true; if (xcode.platformType === "device") { - if (qbs.targetOS.contains("ios")) - dict["UIRequiredDeviceCapabilities"] = ["armv7"]; + if (qbs.targetOS.contains("ios")) { + if (qbs.architecture === "arm64") + dict["UIRequiredDeviceCapabilities"] = ["arm64"]; + else + dict["UIRequiredDeviceCapabilities"] = ["armv7"]; + } if (qbs.targetOS.contains("tvos")) dict["UIRequiredDeviceCapabilities"] = ["arm64"]; @@ -195,7 +199,8 @@ env["TVOS_DEPLOYMENT_TARGET"] = minimumTvosVersion; if (xcode.present) - env["TARGETED_DEVICE_FAMILY"] = DarwinTools.targetedDeviceFamily(xcode.targetDevices); + env["TARGETED_DEVICE_FAMILY"] = + DarwinTools.targetedDeviceFamily(xcode.targetDevices).join(","); return env; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/src/lib/corelib/api/internaljobs.cpp new/qbs-src-1.13.1/src/lib/corelib/api/internaljobs.cpp --- old/qbs-src-1.13.0/src/lib/corelib/api/internaljobs.cpp 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/src/lib/corelib/api/internaljobs.cpp 2019-05-23 19:02:41.000000000 +0200 @@ -268,8 +268,11 @@ deleteLocker = true; } execute(); - if (m_existingProject) + if (m_existingProject) { + if (m_existingProject != m_newProject) + m_existingProject->makeModuleProvidersNonTransient(); m_existingProject->bgLocker = nullptr; + } m_newProject->bgLocker = bgLocker; deleteLocker = false; } catch (const ErrorInfo &error) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/src/lib/corelib/buildgraph/transformer.cpp new/qbs-src-1.13.1/src/lib/corelib/buildgraph/transformer.cpp --- old/qbs-src-1.13.0/src/lib/corelib/buildgraph/transformer.cpp 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/src/lib/corelib/buildgraph/transformer.cpp 2019-05-23 19:02:41.000000000 +0200 @@ -103,9 +103,9 @@ Q_UNUSED(ctx); QScriptValue sv = engine->newArray(); uint idx = 0; - for (const Artifact *parent : artifact->childArtifacts()) { + for (const Artifact *child : artifact->childArtifacts()) { sv.setProperty(idx++, Transformer::translateFileConfig(static_cast<ScriptEngine *>(engine), - parent, QString())); + child, QString())); } return sv; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/src/lib/corelib/language/language.cpp new/qbs-src-1.13.1/src/lib/corelib/language/language.cpp --- old/qbs-src-1.13.0/src/lib/corelib/language/language.cpp 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/src/lib/corelib/language/language.cpp 2019-05-23 19:02:41.000000000 +0200 @@ -622,6 +622,12 @@ return projectProperties().value(StringConstants::profileProperty()).toString(); } +void TopLevelProject::makeModuleProvidersNonTransient() +{ + for (ModuleProviderInfo &m : moduleProviderInfo) + m.transientOutput = false; +} + QString TopLevelProject::buildGraphFilePath() const { return ProjectBuildData::deriveBuildGraphFilePath(buildDirectory, id()); @@ -637,8 +643,9 @@ qCDebug(lcBuildGraph) << "build graph is unchanged in project" << id(); return; } - for (ModuleProviderInfo &m : moduleProviderInfo) - m.transientOutput = false; + + makeModuleProvidersNonTransient(); + const QString fileName = buildGraphFilePath(); qCDebug(lcBuildGraph) << "storing:" << fileName; PersistentPool pool(logger); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/src/lib/corelib/language/language.h new/qbs-src-1.13.1/src/lib/corelib/language/language.h --- old/qbs-src-1.13.0/src/lib/corelib/language/language.h 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/src/lib/corelib/language/language.h 2019-05-23 19:02:41.000000000 +0200 @@ -711,6 +711,8 @@ const QVariantMap &buildConfiguration() const { return m_buildConfiguration; } QString id() const { return m_id; } QString profile() const; + void makeModuleProvidersNonTransient(); + QVariantMap profileConfigs; QVariantMap overriddenValues; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/src/lib/corelib/tools/settings.cpp new/qbs-src-1.13.1/src/lib/corelib/tools/settings.cpp --- old/qbs-src-1.13.0/src/lib/corelib/tools/settings.cpp 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/src/lib/corelib/tools/settings.cpp 2019-05-23 19:02:41.000000000 +0200 @@ -54,7 +54,7 @@ namespace qbs { using namespace Internal; -static QString defaultSystemSettingsBaseDir() +QString Settings::defaultSystemSettingsBaseDir() { switch (HostOsInfo::hostOs()) { case HostOsInfo::HostOsWindows: { @@ -83,7 +83,7 @@ #ifdef QBS_SYSTEM_SETTINGS_DIR return QLatin1String(QBS_SYSTEM_SETTINGS_DIR); #else - return defaultSystemSettingsBaseDir() + QStringLiteral("/qbs"); + return Settings::defaultSystemSettingsBaseDir() + QStringLiteral("/qbs"); #endif } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/src/lib/corelib/tools/settings.h new/qbs-src-1.13.1/src/lib/corelib/tools/settings.h --- old/qbs-src-1.13.0/src/lib/corelib/tools/settings.h 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/src/lib/corelib/tools/settings.h 2019-05-23 19:02:41.000000000 +0200 @@ -84,6 +84,8 @@ QString fileName() const; QString baseDirectory() const { return m_baseDir; } // As passed into the constructor. + static QString defaultSystemSettingsBaseDir(); + private: QString internalRepresentation(const QString &externalKey) const; QString externalRepresentation(const QString &internalKey) const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/src/lib/scriptengine/scriptengine.qbs new/qbs-src-1.13.1/src/lib/scriptengine/scriptengine.qbs --- old/qbs-src-1.13.0/src/lib/scriptengine/scriptengine.qbs 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/src/lib/scriptengine/scriptengine.qbs 2019-05-23 19:02:41.000000000 +0200 @@ -401,7 +401,7 @@ var p = new Process(); if (p.exec(qmake, ["-query", "QT_HOST_BINS/src"]) !== 0) throw new Error("Error while querying qmake."); - syncQtPath = FileInfo.joinPaths(p.readStdOut().replace(/[\r\n]/, ''), + syncQtPath = FileInfo.joinPaths(p.readStdOut().replace(/\r?\n/, ''), "syncqt.pl"); } var qtScriptSrcPath = FileInfo.cleanPath( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/src/packages/archive/archive.qbs new/qbs-src-1.13.1/src/packages/archive/archive.qbs --- old/qbs-src-1.13.0/src/packages/archive/archive.qbs 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/src/packages/archive/archive.qbs 2019-05-23 19:02:41.000000000 +0200 @@ -80,6 +80,13 @@ return artifact.fileTags.contains("application") || artifact.fileTags.contains("dynamiclibrary"); }).map(function(a) { return ModUtils.artifactInstalledFilePath(a); }); + cmd.binaryFilePaths.sort(function(a1, a2) { + if (a1.contains("qbs.exe")) + return -1; + if (a2.contains("qbs.exe")) + return 1; + return 0; + }); cmd.extendedDescription = FileInfo.joinPaths( product.moduleProperty("Qt.core", "binPath"), "windeployqt") + ".exe " + ["--json"].concat(cmd.windeployqtArgs).concat(cmd.binaryFilePaths).join(" "); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/src/packages/chocolatey/chocolatey.qbs new/qbs-src-1.13.1/src/packages/chocolatey/chocolatey.qbs --- old/qbs-src-1.13.0/src/packages/chocolatey/chocolatey.qbs 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/src/packages/chocolatey/chocolatey.qbs 2019-05-23 19:02:41.000000000 +0200 @@ -95,7 +95,7 @@ tf.close(); } - var doc = new XmlDomDocument(); + var doc = new Xml.DomDocument(); doc.load(nuspecFilePath); var versionNode = doc.createElement("version"); versionNode.appendChild(doc.createTextNode(qbsVersion)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/tests/auto/blackbox/testdata/minimumSystemVersion/main.mm new/qbs-src-1.13.1/tests/auto/blackbox/testdata/minimumSystemVersion/main.mm --- old/qbs-src-1.13.0/tests/auto/blackbox/testdata/minimumSystemVersion/main.mm 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/tests/auto/blackbox/testdata/minimumSystemVersion/main.mm 2019-05-23 19:02:41.000000000 +0200 @@ -54,7 +54,20 @@ if (print && [line rangeOfString:@"version"].location != NSNotFound) { std::cout << [[line stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] UTF8String] << std::endl; print = false; + continue; } + +#ifdef __clang__ +#if __clang_major__ >= 10 && __clang_minor__ >= 0 + if ([line rangeOfString:@"LC_BUILD_VERSION"].location != NSNotFound) + print = true; + + if (print && [line rangeOfString:@"minos"].location != NSNotFound) { + std::cout << [[line stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] UTF8String] << std::endl; + print = false; + } +#endif +#endif // __clang__ } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/tests/auto/blackbox/testdata-qt/static-qt-plugin-linking/main.cpp new/qbs-src-1.13.1/tests/auto/blackbox/testdata-qt/static-qt-plugin-linking/main.cpp --- old/qbs-src-1.13.0/tests/auto/blackbox/testdata-qt/static-qt-plugin-linking/main.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/qbs-src-1.13.1/tests/auto/blackbox/testdata-qt/static-qt-plugin-linking/main.cpp 2019-05-23 19:02:41.000000000 +0200 @@ -0,0 +1,7 @@ +#include <QCoreApplication> + +int main(int argc, char *argv[]) +{ + QCoreApplication app(argc, argv); + return app.exec(); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/tests/auto/blackbox/testdata-qt/static-qt-plugin-linking/static-qt-plugin-linking.qbs new/qbs-src-1.13.1/tests/auto/blackbox/testdata-qt/static-qt-plugin-linking/static-qt-plugin-linking.qbs --- old/qbs-src-1.13.0/tests/auto/blackbox/testdata-qt/static-qt-plugin-linking/static-qt-plugin-linking.qbs 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/tests/auto/blackbox/testdata-qt/static-qt-plugin-linking/static-qt-plugin-linking.qbs 2019-05-23 19:02:41.000000000 +0200 @@ -1,5 +1,5 @@ -StaticLibrary { - name: "somelib" +Product { + name: "p" Probe { id: staticQtChecker property bool staticQt: Qt.core.staticBuild @@ -10,6 +10,11 @@ } } + Group { + condition: type.contains("application") + files: "main.cpp" + } + Depends { name: "Qt.core" } Depends { name: "Qt.gui" } Depends { name: "Qt.qminimal"; condition: Qt.core.staticBuild; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/tests/auto/blackbox/tst_blackbox.cpp new/qbs-src-1.13.1/tests/auto/blackbox/tst_blackbox.cpp --- old/qbs-src-1.13.0/tests/auto/blackbox/tst_blackbox.cpp 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/tests/auto/blackbox/tst_blackbox.cpp 2019-05-23 19:02:41.000000000 +0200 @@ -36,6 +36,7 @@ #include <tools/preferences.h> #include <tools/profile.h> #include <tools/qttools.h> +#include <tools/settings.h> #include <tools/shellutils.h> #include <tools/stlutils.h> #include <tools/version.h> @@ -146,6 +147,25 @@ && !findExecutable(QStringList("yacc")).isEmpty(); } +qbs::Version TestBlackbox::bisonVersion() +{ + const auto yaccBinary = findExecutable(QStringList("yacc")); + QProcess process; + process.start(yaccBinary, QStringList() << "--version"); + if (!process.waitForStarted()) + return qbs::Version(); + if (!process.waitForFinished()) + return qbs::Version(); + const auto processStdOut = process.readAllStandardOutput(); + if (processStdOut.isEmpty()) + return qbs::Version(); + const auto line = processStdOut.split('\n')[0]; + const auto words = line.split(' '); + if (words.empty()) + return qbs::Version(); + return qbs::Version::fromString(words.last()); +} + void TestBlackbox::sevenZip() { QDir::setCurrent(testDataDir + "/archiver"); @@ -4343,20 +4363,27 @@ } \ } - QVERIFY(QDir::setCurrent(testDataDir + "/lexyacc/lex_prefix")); - rmDirR(relativeBuildDir()); - QCOMPARE(runQbs(params), 0); - VERIFY_COMPILATION(yaccOutputFilePath); + const auto version = bisonVersion(); + if (version >= qbs::Version(2, 6)) { + // prefix only supported starting from bison 2.6 + QVERIFY(QDir::setCurrent(testDataDir + "/lexyacc/lex_prefix")); + rmDirR(relativeBuildDir()); + QCOMPARE(runQbs(params), 0); + VERIFY_COMPILATION(yaccOutputFilePath); + } QVERIFY(QDir::setCurrent(testDataDir + "/lexyacc/lex_outfile")); rmDirR(relativeBuildDir()); QCOMPARE(runQbs(params), 0); VERIFY_COMPILATION(yaccOutputFilePath); - QVERIFY(QDir::setCurrent(testDataDir + "/lexyacc/yacc_output")); - rmDirR(relativeBuildDir()); - QCOMPARE(runQbs(params), 0); - VERIFY_COMPILATION(lexOutputFilePath); + if (version >= qbs::Version(2, 4)) { + // output syntax was changed in bison 2.4 + QVERIFY(QDir::setCurrent(testDataDir + "/lexyacc/yacc_output")); + rmDirR(relativeBuildDir()); + QCOMPARE(runQbs(params), 0); + VERIFY_COMPILATION(lexOutputFilePath); + } #undef VERIFY_COMPILATION } @@ -5204,8 +5231,9 @@ bool canWriteToSystemSettings; QString testSettingsFilePath; { - QSettings testSettings(QSettings::IniFormat, QSettings::SystemScope, - "dummyOrg", "dummyApp"); + QSettings testSettings( + qbs::Settings::defaultSystemSettingsBaseDir() + "/dummyOrg" + "/dummyApp.conf", + QSettings::IniFormat); testSettings.setValue("dummyKey", "dummyValue"); testSettings.sync(); canWriteToSystemSettings = testSettings.status() == QSettings::NoError; @@ -6470,10 +6498,14 @@ const QString unspecified = []() -> QString { if (HostOsInfo::isMacosHost()) { const auto v = defaultClangMinimumDeploymentTarget(); - return "__MAC_OS_X_VERSION_MIN_REQUIRED=" - + QString::number(toMinimumDeploymentTargetValue(v, true)) - + "\nversion " - + QString::number(v.majorVersion()) + "." + QString::number(v.minorVersion()); + auto result = "__MAC_OS_X_VERSION_MIN_REQUIRED=" + + QString::number(toMinimumDeploymentTargetValue(v, true)); + if (v >= qbs::Version(10, 14)) + result += "\nminos "; + else + result += "\nversion "; + result += QString::number(v.majorVersion()) + "." + QString::number(v.minorVersion()); + return result; } if (HostOsInfo::isWindowsHost()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/tests/auto/blackbox/tst_blackbox.h new/qbs-src-1.13.1/tests/auto/blackbox/tst_blackbox.h --- old/qbs-src-1.13.0/tests/auto/blackbox/tst_blackbox.h 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/tests/auto/blackbox/tst_blackbox.h 2019-05-23 19:02:41.000000000 +0200 @@ -310,6 +310,7 @@ QMap<QString, QString> findTypeScript(int *status); QString findArchiver(const QString &fileName, int *status = nullptr); static bool lexYaccExist(); + static qbs::Version bisonVersion(); }; #endif // TST_BLACKBOX_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbs-src-1.13.0/tests/auto/blackbox/tst_blackboxqt.cpp new/qbs-src-1.13.1/tests/auto/blackbox/tst_blackboxqt.cpp --- old/qbs-src-1.13.0/tests/auto/blackbox/tst_blackboxqt.cpp 2019-04-08 15:52:39.000000000 +0200 +++ new/qbs-src-1.13.1/tests/auto/blackbox/tst_blackboxqt.cpp 2019-05-23 19:02:41.000000000 +0200 @@ -411,9 +411,12 @@ void TestBlackboxQt::staticQtPluginLinking() { QDir::setCurrent(testDataDir + "/static-qt-plugin-linking"); - QCOMPARE(runQbs(), 0); + QCOMPARE(runQbs(QStringList("products.p.type:application")), 0); const bool isStaticQt = m_qbsStdout.contains("Qt is static"); QVERIFY2(m_qbsStdout.contains("Creating static import") == isStaticQt, m_qbsStdout.constData()); + QCOMPARE(runQbs(QbsRunParameters("resolve", QStringList("products.p.type:staticlibrary"))), 0); + QCOMPARE(runQbs(), 0); + QVERIFY2(!m_qbsStdout.contains("Creating static import"), m_qbsStdout.constData()); } void TestBlackboxQt::trackAddMocInclude()
