From f05ec1bcd90bfb168cef039f319ab79bdbfa0b5b Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Tue, 20 Apr 2021 16:52:07 +0300 Subject: Fix return value for operations run as detached Task-number: QTIFW-2210 Change-Id: If02422317039cc7aced3ff175576660cb260a005 Reviewed-by: Tim Jenssen Reviewed-by: Arttu Tarkiainen --- src/libs/installer/elevatedexecuteoperation.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libs/installer/elevatedexecuteoperation.cpp b/src/libs/installer/elevatedexecuteoperation.cpp index f81377ac4..4ca9a8e59 100644 --- a/src/libs/installer/elevatedexecuteoperation.cpp +++ b/src/libs/installer/elevatedexecuteoperation.cpp @@ -151,13 +151,15 @@ int ElevatedExecuteOperation::Private::run(QStringList &arguments, const Operati // unix style: when there's an ampersand after the command, it's started detached if (args.count() >= 2 && args.last() == QLatin1String("&")) { + int returnValue = NoError; args.pop_back(); const bool success = QProcessWrapper::startDetached(args.front(), args.mid(1)); if (!success) { q->setError(UserDefinedError); q->setErrorString(tr("Cannot start detached: \"%1\"").arg(callstr)); + returnValue = Error; } - return success; + return returnValue; } process = new QProcessWrapper(); -- cgit v1.2.3 From 3660ca50d05802a1f03c2c7f1ba7c1e873c01f78 Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Thu, 22 Apr 2021 10:52:15 +0300 Subject: Do not try to remove non-existing package information file on rollback The installation information XML file (components.xml by default) is not yet written to disk when downloading archives. Canceling the installation here would try to remove the not-yet-created file unconditionally. Task-number: QTIFW-2213 Change-Id: I922ffd7d1344755ed7fcf3f02e83bc02e789cd17 Reviewed-by: Katja Marttila --- src/libs/installer/packagemanagercore.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp index 5b36f8bc6..6682bde7c 100644 --- a/src/libs/installer/packagemanagercore.cpp +++ b/src/libs/installer/packagemanagercore.cpp @@ -896,11 +896,10 @@ void PackageManagerCore::rollBackInstallation() } d->m_localPackageHub->writeToDisk(); - if (isInstaller()) { - if (d->m_localPackageHub->packageInfoCount() == 0) { - QFile file(d->m_localPackageHub->fileName()); + if (isInstaller() && d->m_localPackageHub->packageInfoCount() == 0) { + QFile file(d->m_localPackageHub->fileName()); + if (!file.fileName().isEmpty() && file.exists()) file.remove(); - } } if (becameAdmin) -- cgit v1.2.3 From 8119a82e950cc063df92d5c6d26cac1a3e4954ca Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Mon, 26 Apr 2021 16:23:00 +0300 Subject: Fix values overwritten by maintenancetool Maintenancetool has saved values, which are loaded after installer has initialized some values, overwriting the installer initial values. Fixed so that only values that are not already set in installer init will be set from maintenancetool ini file. Task-number: QTIFW-2218 Change-Id: Ide6a3f67daec81fe22d6dcde1e95a28f5ed2c53a Reviewed-by: Arttu Tarkiainen --- src/libs/installer/packagemanagercore_p.cpp | 6 +++--- src/libs/installer/packagemanagercoredata.cpp | 20 +++++++++++++++----- src/libs/installer/packagemanagercoredata.h | 2 +- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp index d1e482912..24a67d095 100644 --- a/src/libs/installer/packagemanagercore_p.cpp +++ b/src/libs/installer/packagemanagercore_p.cpp @@ -611,7 +611,7 @@ UninstallerCalculator *PackageManagerCorePrivate::uninstallerCalculator() const void PackageManagerCorePrivate::initialize(const QHash ¶ms) { m_coreCheckedHash.clear(); - m_data = PackageManagerCoreData(params); + m_data = PackageManagerCoreData(params, isInstaller()); m_componentsToInstallCalculated = false; #ifdef Q_OS_LINUX @@ -920,8 +920,8 @@ void PackageManagerCorePrivate::readMaintenanceConfigFiles(const QString &target const QVariantHash v = cfg.value(QLatin1String("Variables")).toHash(); // Do not change to // QVariantMap! Breaks reading from existing .ini files, cause the variant types do not match. for (QVariantHash::const_iterator it = v.constBegin(); it != v.constEnd(); ++it) { - m_data.setValue(it.key(), replacePath(it.value().toString(), QLatin1String(scRelocatable), - targetDir)); + if (!m_data.contains(it.key()) || m_data.value(it.key()).isNull()) + m_data.setValue(it.key(), replacePath(it.value().toString(), QLatin1String(scRelocatable), targetDir)); } QSet repos; const QVariantList variants = cfg.value(QLatin1String("DefaultRepositories")) diff --git a/src/libs/installer/packagemanagercoredata.cpp b/src/libs/installer/packagemanagercoredata.cpp index 3326ec65e..8f6f24a09 100644 --- a/src/libs/installer/packagemanagercoredata.cpp +++ b/src/libs/installer/packagemanagercoredata.cpp @@ -50,14 +50,13 @@ namespace QInstaller \internal */ -PackageManagerCoreData::PackageManagerCoreData(const QHash &variables) +PackageManagerCoreData::PackageManagerCoreData(const QHash &variables, const bool isInstaller) { // Add user defined variables before dynamic as user settings can affect dynamic variables. setUserDefinedVariables(variables); addDynamicPredefinedVariables(); // Set some common variables that may used e.g. as placeholder in some of the settings variables or // in a script or... - addNewVariable(scTargetConfigurationFile, QLatin1String("components.xml")); addNewVariable(QLatin1String("InstallerDirPath"), QCoreApplication::applicationDirPath()); addNewVariable(QLatin1String("InstallerFilePath"), QCoreApplication::applicationFilePath()); @@ -81,8 +80,6 @@ PackageManagerCoreData::PackageManagerCoreData(const QHash &va addNewVariable(scTitle, replaceVariables(m_settings.title())); addNewVariable(scPublisher, m_settings.publisher()); addNewVariable(QLatin1String("Url"), m_settings.url()); - addNewVariable(scStartMenuDir, m_settings.startMenuDir()); - addNewVariable(scTargetConfigurationFile, m_settings.configurationFileName()); addNewVariable(scLogo, m_settings.logo()); addNewVariable(scWatermark, m_settings.watermark()); addNewVariable(scBanner, m_settings.banner()); @@ -92,7 +89,20 @@ PackageManagerCoreData::PackageManagerCoreData(const QHash &va if (!description.isEmpty()) addNewVariable(scRunProgramDescription, description); - addNewVariable(scTargetDir, replaceVariables(m_settings.targetDir())); + // Some settings might change during install, read those settings later from + // maintenancetool if maintenancetool is used. + if (isInstaller) { + addNewVariable(scTargetDir, replaceVariables(m_settings.targetDir())); + addNewVariable(scTargetConfigurationFile, m_settings.configurationFileName()); + addNewVariable(scStartMenuDir, m_settings.startMenuDir()); + } else { +#ifdef Q_OS_MACOS + addNewVariable(scTargetDir, QFileInfo(QCoreApplication::applicationDirPath() + QLatin1String("/../../..")).absoluteFilePath()); +#else + addNewVariable(scTargetDir, QCoreApplication::applicationDirPath()); +#endif + + } addNewVariable(scRemoveTargetDir, replaceVariables(m_settings.removeTargetDir())); } diff --git a/src/libs/installer/packagemanagercoredata.h b/src/libs/installer/packagemanagercoredata.h index 32a848aed..3cfb77c95 100644 --- a/src/libs/installer/packagemanagercoredata.h +++ b/src/libs/installer/packagemanagercoredata.h @@ -37,7 +37,7 @@ class PackageManagerCoreData { public: PackageManagerCoreData() {} - explicit PackageManagerCoreData(const QHash &variables); + explicit PackageManagerCoreData(const QHash &variables, const bool isInstaller); void clear(); void addDynamicPredefinedVariables(); -- cgit v1.2.3 From b811d0799517680895c3ca70d7593fdd5e97f44f Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Fri, 30 Apr 2021 14:04:10 +0300 Subject: Fix declaration order mismatching initializer list in SDKApp The compiler issued a -Wreorder warning for m_core & m_runCheck. Change-Id: Id55d40132e41ab3c92f192d469bce095941a3acf Reviewed-by: Katja Marttila --- src/sdk/sdkapp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdk/sdkapp.h b/src/sdk/sdkapp.h index 17077c8f1..0c6c362bc 100644 --- a/src/sdk/sdkapp.h +++ b/src/sdk/sdkapp.h @@ -496,9 +496,9 @@ private: QList m_resourceMappings; public: + RunOnceChecker m_runCheck; QInstaller::PackageManagerCore *m_core; CommandLineParser m_parser; - RunOnceChecker m_runCheck; }; #endif // SDKAPP_H -- cgit v1.2.3 From d54c162f1f4dff54be930ce2f7370dd540a1e1bf Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Thu, 29 Apr 2021 06:48:01 +0300 Subject: Remove wayland dependency from Linux binaries Wayland dependency is added to installer binaries if it is found from system at build time. Added explicit dependencies only to xcb and minimal platform plugins. Task-number: QTIFW-2067 Change-Id: I0b65ef10824122c7041f1aa566d7a989aa085503 Reviewed-by: Arttu Tarkiainen --- coin/instructions/qmake_module_build.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/coin/instructions/qmake_module_build.yaml b/coin/instructions/qmake_module_build.yaml index 37ff0f396..3e1072d01 100644 --- a/coin/instructions/qmake_module_build.yaml +++ b/coin/instructions/qmake_module_build.yaml @@ -32,10 +32,24 @@ instructions: - type: ChangeDirectory directory: "{{.BuildDir}}" + - type: ExecuteCommand + command: ["{{.InstallDir}}/bin/qmake", "QTPLUGIN.platforms = qminimal qxcb", "INSTALL_PREFIX={{.InstallDir}}", "{{.SourceDir}}"] + maxTimeInSeconds: 1800 + maxTimeBetweenOutput: 600 + userMessageOnFailure: "Failed to run qmake, check logs." + enable_if: + condition: property + property: host.os + equals_value: Linux + - type: ExecuteCommand command: ["{{.InstallDir}}/bin/qmake", "INSTALL_PREFIX={{.InstallDir}}", "{{.SourceDir}}"] maxTimeInSeconds: 1800 maxTimeBetweenOutput: 600 userMessageOnFailure: "Failed to run qmake, check logs." + enable_if: + condition: property + property: host.os + not_equals_value: Linux - !include "{{installer-framework/installer-framework}}/make_instructions.yaml" - !include "{{installer-framework/installer-framework}}/make_documentation.yaml" -- cgit v1.2.3 From 14b12d2730bbde50dac8c81d4aef45ef78c48391 Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Wed, 14 Apr 2021 17:56:42 +0300 Subject: CLI: Print warning when creating over 4GB installers on Windows Task-number: QTIFW-2199 Change-Id: I56f3663ae605b2c568925702e06c4438e11830ac (cherry picked from commit 35f79da9cb99c7c0456f002829dc0fdfe55b4f8d) Reviewed-by: Katja Marttila --- src/libs/installer/packagemanagercore.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp index 6682bde7c..a18374f0c 100644 --- a/src/libs/installer/packagemanagercore.cpp +++ b/src/libs/installer/packagemanagercore.cpp @@ -70,7 +70,8 @@ #include "updateoperationfactory.h" #ifdef Q_OS_WIN -# include "qt_windows.h" +#include "qt_windows.h" +#include #endif #include @@ -2718,6 +2719,13 @@ bool PackageManagerCore::checkAvailableSpace(QString &message) const message = tr("The volume you selected for installation seems to have sufficient " "space for installation, but there will be less than 100 MB available afterwards."); } +#ifdef Q_OS_WIN + if (isOfflineGenerator() && (required > UINT_MAX)) { + message = tr("The estimated installer size %1 would exceed the supported executable " + "size limit of %2. The application may not be able to run.") + .arg(humanReadableSize(required), humanReadableSize(UINT_MAX)); + } +#endif } message = QString::fromLatin1("%1 %2").arg(message, tr("Installation will use %1 of disk space.") .arg(humanReadableSize(requiredDiskSpace()))).simplified(); -- cgit v1.2.3 From 33334e2a8aa9d847172d1f6c1cf9a447dce094f9 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Mon, 3 May 2021 15:27:54 +0300 Subject: Fix component translation loading Component translations were following the system language although allowed languages were set in config.xml using field. Also the translation file name was not correct as IFW languages has the syntax 'ifw_'. Task-number: QTIFW-2220 Change-Id: I6a6f19351cbb956accbc22bc532f7a12dde21a2f Reviewed-by: Iikka Eklund Reviewed-by: Arttu Tarkiainen --- src/libs/installer/component.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp index 66f333377..cb9959ba3 100644 --- a/src/libs/installer/component.cpp +++ b/src/libs/installer/component.cpp @@ -617,15 +617,15 @@ void Component::loadTranslations(const QDir &directory, const QStringList &qms) while (it.hasNext()) { const QString filename = it.next(); const QString basename = QFileInfo(filename).baseName(); - if (!uiLanguage.startsWith(QFileInfo(filename).baseName(), Qt::CaseInsensitive)) - continue; // do not load the file if it does not match the UI language if (!translations.isEmpty()) { bool found = false; foreach (const QString &translation, translations) - found |= translation.startsWith(basename, Qt::CaseInsensitive); + found |= translation.startsWith(QLatin1String("ifw_") + basename, Qt::CaseInsensitive); if (!found) // don't load the file if it does match the UI language but is not allowed to be used continue; + } else if (!uiLanguage.startsWith(QFileInfo(filename).baseName(), Qt::CaseInsensitive)) { + continue; // do not load the file if it does not match the UI language } QScopedPointer translator(new QTranslator(this)); -- cgit v1.2.3 From 6f6215475008caf9460574156f47e735c61999a8 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Mon, 3 May 2021 16:32:05 +0300 Subject: Add documentation for translation usage Task-number: QTIFW-2217 Change-Id: I15af0ac81842db386bb8d86b4a76bdd45722b4a9 Reviewed-by: Leena Miettinen Reviewed-by: Arttu Tarkiainen --- doc/installerfw.qdoc | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/doc/installerfw.qdoc b/doc/installerfw.qdoc index e9a6463bc..c76576f27 100644 --- a/doc/installerfw.qdoc +++ b/doc/installerfw.qdoc @@ -525,9 +525,10 @@ \li Filename for the configuration file on the target. Default is components.xml. \row \li Translations - \li List of language codes to be used for translating the user interface. To add several language - variants, specify several \c child elements that each specify the name - of a language variant. Optional. For more information, see \l{Translating Pages}. + \li List of translation files to be used for translating the user interface. To add + several translation files, specify several \c child elements that + each specify the name of the translation. Optional. For more information, see + \l{Translating Pages} and \l{Configuring and Overwriting Default Translations}. \row \li UrlQueryString \li This string needs to be in the form "key=value" and will be appended to archive download @@ -721,6 +722,25 @@ \note The translation system can also be used to customize the UI. Use e.g. an \c en.ts file to replace any text in the installer with a custom English version. + + \section1 Configuring and Overwriting Default Translations + + The installer has been localized into several languages. System language is used to define the + loaded language. In case you want to define the used language for your installer, define the + languages in \c config.xml using the \c element. For example, using only German + translations: + + \code + + ifw_de + qt_de + + \endcode + + The default translations can be also overwritten. Write your own translation file and add + it to a custom resource called \c :/translations_new. This custom resource can be added to + the installer using \c binarycreator option \c -r. For more information, see + \l{Summary of binarycreator Parameters}. */ /*! -- cgit v1.2.3 From eb4b39099231254c850d897ede4ceaf79b91b4b6 Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Mon, 17 May 2021 14:26:39 +0300 Subject: Update IFW version number Change-Id: I5f8c22cd22356f6c256ce7e53db65a6a43717a19 Reviewed-by: Katja Marttila --- .qmake.conf | 2 +- dist/packages/org.qtproject.ifw.binaries/meta/package.xml | 2 +- dist/packages/org.qtproject.ifw/meta/package.xml | 2 +- installerfw.pri | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.qmake.conf b/.qmake.conf index 8798c3d5a..0093cddd6 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,2 +1,2 @@ -VERSION=4.1.0 +VERSION=4.1.1 CONFIG=prepare_docs qt_docs_targets $$CONFIG diff --git a/dist/packages/org.qtproject.ifw.binaries/meta/package.xml b/dist/packages/org.qtproject.ifw.binaries/meta/package.xml index f94336822..c3a0a808d 100644 --- a/dist/packages/org.qtproject.ifw.binaries/meta/package.xml +++ b/dist/packages/org.qtproject.ifw.binaries/meta/package.xml @@ -2,7 +2,7 @@ Qt Installer Framework Binaries Installs the binaries, examples and help files. - 4.1.0 + 4.1.1 2020-12-09 True diff --git a/dist/packages/org.qtproject.ifw/meta/package.xml b/dist/packages/org.qtproject.ifw/meta/package.xml index b68e6cbf2..2b32b5c74 100644 --- a/dist/packages/org.qtproject.ifw/meta/package.xml +++ b/dist/packages/org.qtproject.ifw/meta/package.xml @@ -2,7 +2,7 @@ Qt Installer Framework Installs the Qt Installer Framework. - 4.1.0 + 4.1.1 2020-12-09 diff --git a/installerfw.pri b/installerfw.pri index e38bb5108..0d15824e3 100644 --- a/installerfw.pri +++ b/installerfw.pri @@ -3,9 +3,9 @@ } IFW_PRI_INCLUDED = 1 -IFW_VERSION_STR = 4.1.0 -IFW_VERSION = 0x040100 -IFW_VERSION_WIN32 = 4,1,0,0 +IFW_VERSION_STR = 4.1.1 +IFW_VERSION = 0x040101 +IFW_VERSION_WIN32 = 4,1,1,0 IFW_VERSION_STR_WIN32 = $$IFW_VERSION_STR\0 -- cgit v1.2.3 From be2c54531eeb00822259d6f6bfcb90b43768cea3 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Thu, 15 Apr 2021 15:52:33 +0300 Subject: Add possibility to list components with regexp Task-number: QTIFW-2225 Change-Id: I6a7fdfc1070ad54d520563cae7d2446e97e2e87c Reviewed-by: Arttu Tarkiainen --- doc/scripting-api/packagemanagercore.qdoc | 5 +++-- src/libs/installer/packagemanagercore.cpp | 14 +++++++++++++- src/libs/installer/packagemanagercore.h | 2 +- src/libs/installer/scriptengine.cpp | 6 +++--- src/libs/installer/scriptengine_p.h | 4 ++-- tests/auto/installer/scriptengine/tst_scriptengine.cpp | 15 +++++++++++++++ 6 files changed, 37 insertions(+), 9 deletions(-) diff --git a/doc/scripting-api/packagemanagercore.qdoc b/doc/scripting-api/packagemanagercore.qdoc index bacf50f27..39387b3ae 100644 --- a/doc/scripting-api/packagemanagercore.qdoc +++ b/doc/scripting-api/packagemanagercore.qdoc @@ -33,11 +33,12 @@ */ /*! - \qmlmethod array installer::components() + \qmlmethod array installer::components(string regexp) Returns an array of all components currently available. If the repository metadata have not been fetched yet, - the array will be empty. + the array will be empty. Optionally, a \a regexp expression + can be used to further filter the listed packages. \sa component, finishAllComponentsReset(), finishUpdaterComponentsReset() */ diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp index a18374f0c..145eb30d7 100644 --- a/src/libs/installer/packagemanagercore.cpp +++ b/src/libs/installer/packagemanagercore.cpp @@ -1863,8 +1863,9 @@ void PackageManagerCore::appendRootComponent(Component *component) /*! Returns a list of components depending on the component types passed in \a mask. + Optionally, a \a regexp expression can be used to further filter the listed packages. */ -QList PackageManagerCore::components(ComponentTypes mask) const +QList PackageManagerCore::components(ComponentTypes mask, const QString ®exp) const { QList components; @@ -1885,6 +1886,17 @@ QList PackageManagerCore::components(ComponentTypes mask) const // No descendants here, updates are always a flat list and cannot have children! } + if (!regexp.isEmpty()) { + QRegularExpression re(regexp); + QList::iterator iter = components.begin(); + while (iter != components.end()) { + if (!re.match(iter.i->t()->name()).hasMatch()) + iter = components.erase(iter); + else + iter++; + } + } + return components; } diff --git a/src/libs/installer/packagemanagercore.h b/src/libs/installer/packagemanagercore.h index 9d89e4763..d4833a979 100644 --- a/src/libs/installer/packagemanagercore.h +++ b/src/libs/installer/packagemanagercore.h @@ -224,7 +224,7 @@ public: void appendRootComponent(Component *components); void appendUpdaterComponent(Component *components); - QList components(ComponentTypes mask) const; + QList components(ComponentTypes mask, const QString ®exp = QString()) const; Component *componentByName(const QString &identifier) const; Q_INVOKABLE bool calculateComponentsToInstall() const; diff --git a/src/libs/installer/scriptengine.cpp b/src/libs/installer/scriptengine.cpp index 5dd56939c..c8fc65d34 100644 --- a/src/libs/installer/scriptengine.cpp +++ b/src/libs/installer/scriptengine.cpp @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -75,10 +75,10 @@ namespace QInstaller { \internal */ -QJSValue InstallerProxy::components() const +QJSValue InstallerProxy::components(const QString ®exp) const { if (m_core) { - const QList all = m_core->components(PackageManagerCore::ComponentType::All); + const QList all = m_core->components(PackageManagerCore::ComponentType::All, regexp); QJSValue scriptComponentsObject = m_engine->newArray(all.count()); for (int i = 0; i < all.count(); ++i) { Component *const component = all.at(i); diff --git a/src/libs/installer/scriptengine_p.h b/src/libs/installer/scriptengine_p.h index c5f04c0dc..e5c39663c 100644 --- a/src/libs/installer/scriptengine_p.h +++ b/src/libs/installer/scriptengine_p.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -63,7 +63,7 @@ public: : m_engine(engine), m_core(core) {} public slots: - QJSValue components() const; + QJSValue components(const QString ®exp = QString()) const; QJSValue componentByName(const QString &componentName); private: diff --git a/tests/auto/installer/scriptengine/tst_scriptengine.cpp b/tests/auto/installer/scriptengine/tst_scriptengine.cpp index b7c602e26..105bcf5d7 100644 --- a/tests/auto/installer/scriptengine/tst_scriptengine.cpp +++ b/tests/auto/installer/scriptengine/tst_scriptengine.cpp @@ -349,6 +349,21 @@ private slots: } } + void testComponentsWithRegexp() + { + const QString script = QString::fromLatin1("var components = installer.components(\"component.test.addOperation\");" + "\n" + "for (i = 0; i < components.length; i++)" + "print(components[i].name);"); + + setExpectedScriptOutput("component.test.addOperation"); + const QJSValue value = m_scriptEngine->evaluate(script); + if (value.isError()) { + QFAIL(qPrintable(QString::fromLatin1("ScriptEngine error:\n %1").arg( + value.toString()))); + } + } + void testFindFiles() { const QString expectedOutput = QString::fromLatin1("Found file %1/tst_scriptengine.moc").arg(m_applicatonDirPath); -- cgit v1.2.3 From 5a7c2d2f6f114917e41f5058e337b9dcd021b2ed Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Mon, 17 May 2021 14:33:03 +0300 Subject: Update IFW installer generation instructions version numbers Change-Id: I3c2c0788f700267d636c5a250a6d46ab51d99903 Reviewed-by: Katja Marttila --- coin/instructions/make_instructions.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/coin/instructions/make_instructions.yaml b/coin/instructions/make_instructions.yaml index 411a988eb..2ebca0410 100644 --- a/coin/instructions/make_instructions.yaml +++ b/coin/instructions/make_instructions.yaml @@ -86,13 +86,13 @@ instructions: - type: ChangeDirectory directory: "{{.InstallRoot}}/{{.AgentWorkingDir}}" - type: ExecuteCommand - command: "python3 {{.SourceDir}}/coin/create_ifw_installer.py --src-dir {{.SourceDir}} --bld-dir {{.SourceDir}} --target-dir {{.SourceDir}}/IfwInstaller --target-name QtInstallerFramework-linux-x64-4.1.0.run" + command: "python3 {{.SourceDir}}/coin/create_ifw_installer.py --src-dir {{.SourceDir}} --bld-dir {{.SourceDir}} --target-dir {{.SourceDir}}/IfwInstaller --target-name QtInstallerFramework-linux-x64-4.1.1.run" maxTimeInSeconds: 36000 maxTimeBetweenOutput: 3600 userMessageOnFailure: "Failed to create ifw installer." - type: Rename - sourcePath: "{{.SourceDir}}/IfwInstaller/QtInstallerFramework-linux-x64-4.1.0.run" - targetPath: "{{.InstallRoot}}/{{.AgentWorkingDir}}/QtInstallerFramework-linux-x64-4.1.0.run" + sourcePath: "{{.SourceDir}}/IfwInstaller/QtInstallerFramework-linux-x64-4.1.1.run" + targetPath: "{{.InstallRoot}}/{{.AgentWorkingDir}}/QtInstallerFramework-linux-x64-4.1.1.run" userMessageOnFailure: "Failed to copy installer." enable_if: condition: and @@ -106,7 +106,7 @@ instructions: - type: ChangeDirectory directory: "{{.InstallRoot}}/{{.AgentWorkingDir}}" - type: ExecuteCommand - command: "python3 {{.SourceDir}}/coin/create_ifw_installer.py --src-dir {{.SourceDir}} --bld-dir {{.SourceDir}} --target-dir {{.SourceDir}}/IfwInstaller --target-name QtInstallerFramework-macOS-x86_64-4.1.0.app" + command: "python3 {{.SourceDir}}/coin/create_ifw_installer.py --src-dir {{.SourceDir}} --bld-dir {{.SourceDir}} --target-dir {{.SourceDir}}/IfwInstaller --target-name QtInstallerFramework-macOS-x86_64-4.1.1.app" maxTimeInSeconds: 36000 maxTimeBetweenOutput: 3600 userMessageOnFailure: "Failed to create ifw installer." @@ -114,18 +114,18 @@ instructions: variableName: QT_CODESIGN_IDENTITY_KEY variableValue: "A5GTH44LYL" - type: ExecuteCommand - command: "{{.AgentWorkingDir}}/qtsdk/qtsdk/packaging-tools/sign_installer.py mac --file={{.SourceDir}}/IfwInstaller/QtInstallerFramework-macOS-x86_64-4.1.0.app" + command: "{{.AgentWorkingDir}}/qtsdk/qtsdk/packaging-tools/sign_installer.py mac --file={{.SourceDir}}/IfwInstaller/QtInstallerFramework-macOS-x86_64-4.1.1.app" maxTimeInSeconds: 36000 maxTimeBetweenOutput: 3600 userMessageOnFailure: "Failed to sign the ifw installer" - type: ExecuteCommand - command: "{{.AgentWorkingDir}}/qtsdk/qtsdk/packaging-tools/notarize.py --dmg={{.SourceDir}}/IfwInstaller/QtInstallerFramework-macOS-x86_64-4.1.0.dmg" + command: "{{.AgentWorkingDir}}/qtsdk/qtsdk/packaging-tools/notarize.py --dmg={{.SourceDir}}/IfwInstaller/QtInstallerFramework-macOS-x86_64-4.1.1.dmg" maxTimeInSeconds: 36000 maxTimeBetweenOutput: 3600 userMessageOnFailure: "Failed to notarize the ifw installer" - type: Rename - sourcePath: "{{.SourceDir}}/IfwInstaller/QtInstallerFramework-macOS-x86_64-4.1.0.dmg" - targetPath: "{{.InstallRoot}}/{{.AgentWorkingDir}}/QtInstallerFramework-macOS-x86_64-4.1.0.dmg" + sourcePath: "{{.SourceDir}}/IfwInstaller/QtInstallerFramework-macOS-x86_64-4.1.1.dmg" + targetPath: "{{.InstallRoot}}/{{.AgentWorkingDir}}/QtInstallerFramework-macOS-x86_64-4.1.1.dmg" userMessageOnFailure: "Failed to copy installer." enable_if: condition: and @@ -139,7 +139,7 @@ instructions: - type: ChangeDirectory directory: "{{.SourceDir}}" - type: ExecuteCommand - command: "{{.Env.PYTHON3_PATH}}\\python {{.SourceDir}}\\coin\\create_ifw_installer.py --src-dir {{.SourceDir}} --bld-dir {{.SourceDir}} --target-dir C:\\{{.SourceDir}}\\IfwInstaller --target-name QtInstallerFramework-windows-x86-4.1.0" + command: "{{.Env.PYTHON3_PATH}}\\python {{.SourceDir}}\\coin\\create_ifw_installer.py --src-dir {{.SourceDir}} --bld-dir {{.SourceDir}} --target-dir C:\\{{.SourceDir}}\\IfwInstaller --target-name QtInstallerFramework-windows-x86-4.1.1" maxTimeInSeconds: 1200 maxTimeBetweenOutput: 1200 userMessageOnFailure: "Failed to create ifw installer." @@ -160,8 +160,8 @@ instructions: equals_value: Windows - type: Rename - sourcePath: "{{.SourceDir}}/IfwInstaller/QtInstallerFramework-windows-x86-4.1.0.exe" - targetPath: "{{.InstallRoot}}/{{.AgentWorkingDir}}/QtInstallerFramework-windows-x86-4.1.0.exe" + sourcePath: "{{.SourceDir}}/IfwInstaller/QtInstallerFramework-windows-x86-4.1.1.exe" + targetPath: "{{.InstallRoot}}/{{.AgentWorkingDir}}/QtInstallerFramework-windows-x86-4.1.1.exe" userMessageOnFailure: "Failed to copy installer." enable_if: condition: property -- cgit v1.2.3 From 45e77c3a1eb790d89f2ded5b7fbe556ed4b5271c Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Mon, 17 May 2021 15:00:42 +0300 Subject: Update Changelog Change-Id: Ie0df7b2b85a9392e9895862e76ccc72cf1cc9edd Reviewed-by: Katja Marttila --- Changelog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Changelog b/Changelog index 85c43e235..f9a3aeb21 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,13 @@ +4.1.1 +- Add possibility to filter available packages with regexp from script (QTIFW-2225) +- Add documentation for configuring and overwriting default translations (QTIFW-2217) +- Fix loading of component translations (QTIFW-2220) +- CLI: Print warning when creating over 4GB installers on Windows (QTIFW-2199) +- Remove wayland dependency from Linux binaries (QTIFW-2067) +- Fix maintenancetool overwriting installer values (QTIFW-2218) +- Fix QFile warning on rollback (QTIFW-2213) +- Fix return value for detached 'Execute' operation (QTIFW-2210) + 4.1.0 - Emit signal when components are recalculated (QTIFW-2172) - Add Arabic translation (QTIFW-1425) -- cgit v1.2.3