From e814a558b7e67d38ffea00a2af459377aa1b5bff Mon Sep 17 00:00:00 2001 From: EndrII Date: Wed, 19 Jul 2023 21:26:43 +0200 Subject: [PATCH 1/8] fix windows debug extansions --- src/Deploy/src/deploycore.cpp | 3 ++- src/Deploy/src/distromodule.cpp | 10 +++++----- src/Deploy/src/distromodule.h | 10 +++++----- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/Deploy/src/deploycore.cpp b/src/Deploy/src/deploycore.cpp index 425f0e4f..543cfd0d 100644 --- a/src/Deploy/src/deploycore.cpp +++ b/src/Deploy/src/deploycore.cpp @@ -677,7 +677,8 @@ QString DeployCore::findProcess(const QString &env, const QString& proc, bool ig } QStringList DeployCore::debugExtensions() { - return {".debug", "d.dll", ".pdb"}; + // from 6.5 windows version of Qt use a "gebug" extansion too. + return {".debug", ".pdb"}; } bool DeployCore::isDebugFile(const QString &file) { diff --git a/src/Deploy/src/distromodule.cpp b/src/Deploy/src/distromodule.cpp index cf1063b4..aaff833e 100644 --- a/src/Deploy/src/distromodule.cpp +++ b/src/Deploy/src/distromodule.cpp @@ -77,7 +77,7 @@ void DistroModule::setPublisher(const QString &publisher) { _publisher = publisher; } -QSet DistroModule::enabledPlugins() const { +const QSet& DistroModule::enabledPlugins() const { return _enabled; } @@ -89,7 +89,7 @@ void DistroModule::addEnabledPlugins(const QString &enabled) { _enabled += enabled; } -QSet DistroModule::disabledPlugins() const { +const QSet& DistroModule::disabledPlugins() const { return _disabled; } @@ -101,7 +101,7 @@ void DistroModule::addDisabledPlugins(const QString &disabled) { _disabled += disabled; } -QSet DistroModule::extraPlugins() const { +const QSet &DistroModule::extraPlugins() const { return _extraPlugins; } @@ -175,7 +175,7 @@ void DistroModule::setInstallDirDEB(const QString &newInstallDir) { _installDirDEB = newInstallDir; } -QSet DistroModule::translation() const { +const QSet &DistroModule::translation() const { return _tr; } @@ -187,7 +187,7 @@ void DistroModule::addTranslation(const QString &tr) { _tr += tr; } -QSet DistroModule::extraData() const { +const QSet &DistroModule::extraData() const { return _extraData; } diff --git a/src/Deploy/src/distromodule.h b/src/Deploy/src/distromodule.h index 0b8e77c6..4d68d8b3 100644 --- a/src/Deploy/src/distromodule.h +++ b/src/Deploy/src/distromodule.h @@ -42,15 +42,15 @@ class DEPLOYSHARED_EXPORT DistroModule: public DistroStruct QString publisher() const; void setPublisher(const QString &publisher); - QSet enabledPlugins() const; + const QSet &enabledPlugins() const; void setEnabledPlugins(const QSet &enabled); void addEnabledPlugins(const QString &enabled); - QSet disabledPlugins() const; + const QSet &disabledPlugins() const; void setDisabledPlugins(const QSet &disabled); void addDisabledPlugins(const QString &disabled); - QSet extraPlugins() const; + const QSet& extraPlugins() const; void setExtraPlugins(const QSet &extraPlugins); void addExtraPlugins(const QString &extraPlugin); @@ -66,11 +66,11 @@ class DEPLOYSHARED_EXPORT DistroModule: public DistroStruct bool isValid(); - QSet extraData() const; + const QSet& extraData() const; void setExtraData(const QSet &extraFiles); void addExtraData(const QString &extraFile); - QSet translation() const; + const QSet& translation() const; void setTranslation(const QSet &tr); void addTranslation(const QString &tr); From e2202e5da39955c3d3f915a085b1ef21dcbff066 Mon Sep 17 00:00:00 2001 From: Andrei Yankovich Date: Wed, 19 Jul 2023 22:29:05 +0300 Subject: [PATCH 2/8] Update src/Deploy/src/deploycore.cpp --- src/Deploy/src/deploycore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Deploy/src/deploycore.cpp b/src/Deploy/src/deploycore.cpp index 543cfd0d..460ae16b 100644 --- a/src/Deploy/src/deploycore.cpp +++ b/src/Deploy/src/deploycore.cpp @@ -677,7 +677,7 @@ QString DeployCore::findProcess(const QString &env, const QString& proc, bool ig } QStringList DeployCore::debugExtensions() { - // from 6.5 windows version of Qt use a "gebug" extansion too. + // from 6.5 windows version of Qt use a "gebug" extension too. return {".debug", ".pdb"}; } From 98be0d133d00349c64bc725046265e9bb3d6df34 Mon Sep 17 00:00:00 2001 From: EndrII Date: Wed, 19 Jul 2023 22:21:17 +0200 Subject: [PATCH 3/8] try fix windows tests --- tests/modules/modulesqt6_3.cpp | 3 +++ tests/tstMain.cpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/modules/modulesqt6_3.cpp b/tests/modules/modulesqt6_3.cpp index 1631f3ed..22aa13b6 100644 --- a/tests/modules/modulesqt6_3.cpp +++ b/tests/modules/modulesqt6_3.cpp @@ -906,6 +906,9 @@ QSet ModulesQt63::qtLibs(const QString &distDir) const { "./" + distDir + "/plugins/platforms/qminimal.dll", "./" + distDir + "/plugins/platforms/qoffscreen.dll", "./" + distDir + "/plugins/platforms/qwindows.dll", + "./" + distDir + "/tls/qcertonlybackend.dll", + "./" + distDir + "/tls/qopensslbackend.dll", + "./" + distDir + "/tls/qschennelbackend.dll", "./" + distDir + "/plugins/styles/qwindowsvistastyle.dll", "./" + distDir + "/qt.conf", "./" + distDir + "/translations/qtbase_ar.qm", diff --git a/tests/tstMain.cpp b/tests/tstMain.cpp index 1f478b23..60fbc15a 100644 --- a/tests/tstMain.cpp +++ b/tests/tstMain.cpp @@ -275,7 +275,9 @@ tstMain::tstMain() { cqtTestPath = cqtTestPath + DeployCore::getEnvSeparator() + QT_BASE_DIR + "/../../Tools/QtInstallerFramework/4.5/bin/"; - + cqtTestPath = cqtTestPath + + DeployCore::getEnvSeparator() + + QT_BASE_DIR + "/../../Tools/QtInstallerFramework/4.6/bin/"; qputenv("PATH", cqtTestPath.toLatin1().data()); TestUtils utils; From 48380668fefda841d2f122566a58704f8e3a4b30 Mon Sep 17 00:00:00 2001 From: EndrII Date: Wed, 19 Jul 2023 22:35:39 +0200 Subject: [PATCH 4/8] update windows tests cases --- tests/modules/modulesqt6_3.cpp | 2 +- tests/modules/modulesqt6_5.cpp | 15 +++++++++++++++ tests/modules/modulesqt6_5.h | 3 +-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/tests/modules/modulesqt6_3.cpp b/tests/modules/modulesqt6_3.cpp index 22aa13b6..1ca0a99b 100644 --- a/tests/modules/modulesqt6_3.cpp +++ b/tests/modules/modulesqt6_3.cpp @@ -908,7 +908,7 @@ QSet ModulesQt63::qtLibs(const QString &distDir) const { "./" + distDir + "/plugins/platforms/qwindows.dll", "./" + distDir + "/tls/qcertonlybackend.dll", "./" + distDir + "/tls/qopensslbackend.dll", - "./" + distDir + "/tls/qschennelbackend.dll", + "./" + distDir + "/tls/qschannelbackend.dll", "./" + distDir + "/plugins/styles/qwindowsvistastyle.dll", "./" + distDir + "/qt.conf", "./" + distDir + "/translations/qtbase_ar.qm", diff --git a/tests/modules/modulesqt6_5.cpp b/tests/modules/modulesqt6_5.cpp index 73cf6d60..4ace60ce 100644 --- a/tests/modules/modulesqt6_5.cpp +++ b/tests/modules/modulesqt6_5.cpp @@ -52,6 +52,21 @@ QSet ModulesQt6_5::qtWebEngine(const QString &distDir) const return Tree; } +QSet ModulesQt6_5::qtLibs(const QString &distDir) const { + auto Tree = ModulesQt6_4::qtLibs(distDir); + TestUtils utils; + +#ifdef Q_OS_WIN + Tree += utils.createTree( + { + "./" + distDir + "/plugins/platforms/qdirect2d.dll", + } + ); +#endif + + return Tree; +} + QSet ModulesQt6_5::qtWebEngineWidgets(const QString &distDir) const { TestUtils utils; diff --git a/tests/modules/modulesqt6_5.h b/tests/modules/modulesqt6_5.h index 0a5a3ad3..b4e507f4 100644 --- a/tests/modules/modulesqt6_5.h +++ b/tests/modules/modulesqt6_5.h @@ -18,8 +18,7 @@ class ModulesQt6_5: public ModulesQt6_4 QSet qmlVirtualKeyBoadrLibs(const QString &distDir = DISTRO_DIR) const override; QSet qtWebEngine(const QString &distDir = DISTRO_DIR) const override; QSet qtWebEngineWidgets(const QString &distDir = DISTRO_DIR) const override; - - + QSet qtLibs(const QString &distDir) const override; }; #endif // MODULESQT6_5_H From 942b55412ce26a91623abcf9928bf374115bf69a Mon Sep 17 00:00:00 2001 From: EndrII Date: Wed, 19 Jul 2023 22:46:51 +0200 Subject: [PATCH 5/8] fix build --- tests/modules/modulesqt6_5.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/modulesqt6_5.h b/tests/modules/modulesqt6_5.h index b4e507f4..caae203a 100644 --- a/tests/modules/modulesqt6_5.h +++ b/tests/modules/modulesqt6_5.h @@ -18,7 +18,7 @@ class ModulesQt6_5: public ModulesQt6_4 QSet qmlVirtualKeyBoadrLibs(const QString &distDir = DISTRO_DIR) const override; QSet qtWebEngine(const QString &distDir = DISTRO_DIR) const override; QSet qtWebEngineWidgets(const QString &distDir = DISTRO_DIR) const override; - QSet qtLibs(const QString &distDir) const override; + QSet qtLibs(const QString &distDir = DISTRO_DIR) const override; }; #endif // MODULESQT6_5_H From 06fa1f5770dd2aa6c12e87bd01a41c2a6e0d6c5b Mon Sep 17 00:00:00 2001 From: EndrII Date: Thu, 20 Jul 2023 01:10:12 +0200 Subject: [PATCH 6/8] fix windows tests --- src/Deploy/src/deploycore.cpp | 9 +++++++++ src/Deploy/src/deploycore.h | 15 ++++++++------- tests/modules/modulesqt6_3.cpp | 6 +++--- tests/modules/modulesqt6_5.cpp | 25 +++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 10 deletions(-) diff --git a/src/Deploy/src/deploycore.cpp b/src/Deploy/src/deploycore.cpp index 460ae16b..bb13611a 100644 --- a/src/Deploy/src/deploycore.cpp +++ b/src/Deploy/src/deploycore.cpp @@ -743,6 +743,9 @@ MSVCVersion DeployCore::getMSVC(const QString &_qtBin) { else if (version == "2019") { res |= MSVC_19; } + else if (version == "2022") { + res |= MSVC_22; + } if (type == "32") { res |= MSVC_x32; @@ -757,6 +760,10 @@ MSVCVersion DeployCore::getMSVC(const QString &_qtBin) { QString DeployCore::getVCredist(const QString &_qtbinDir) { auto msvc = getMSVC(_qtbinDir); + if (msvc == MSVCVersion::MSVC_Unknown) { + return ""; + } + QDir dir = _qtbinDir; if (!(dir.cdUp() && dir.cdUp() && dir.cdUp() && dir.cd("vcredist"))) { @@ -790,6 +797,8 @@ QString DeployCore::getMSVCName(MSVCVersion msvc) { return "msvc2017"; } else if (msvc & MSVCVersion::MSVC_19) { return "msvc2019"; + } else if (msvc & MSVCVersion::MSVC_22) { + return "msvc2022"; } return ""; diff --git a/src/Deploy/src/deploycore.h b/src/Deploy/src/deploycore.h index 50cf27a0..5547b4a4 100644 --- a/src/Deploy/src/deploycore.h +++ b/src/Deploy/src/deploycore.h @@ -15,13 +15,14 @@ #include enum MSVCVersion: int { - MSVC_Unknown = 0x0, - MSVC_x64 = 0x01, - MSVC_x32 = 0x02, - MSVC_13 = 0x10, - MSVC_15 = 0x20, - MSVC_17 = 0x40, - MSVC_19 = 0x80, + MSVC_Unknown = 0x0000, + MSVC_x64 = 0x0001, + MSVC_x32 = 0x0002, + MSVC_13 = 0x0010, + MSVC_15 = 0x0020, + MSVC_17 = 0x0040, + MSVC_19 = 0x0080, + MSVC_22 = 0x0100, }; /** diff --git a/tests/modules/modulesqt6_3.cpp b/tests/modules/modulesqt6_3.cpp index 1ca0a99b..ff3a0be6 100644 --- a/tests/modules/modulesqt6_3.cpp +++ b/tests/modules/modulesqt6_3.cpp @@ -906,9 +906,9 @@ QSet ModulesQt63::qtLibs(const QString &distDir) const { "./" + distDir + "/plugins/platforms/qminimal.dll", "./" + distDir + "/plugins/platforms/qoffscreen.dll", "./" + distDir + "/plugins/platforms/qwindows.dll", - "./" + distDir + "/tls/qcertonlybackend.dll", - "./" + distDir + "/tls/qopensslbackend.dll", - "./" + distDir + "/tls/qschannelbackend.dll", + "./" + distDir + "/plugins/tls/qcertonlybackend.dll", + "./" + distDir + "/plugins/tls/qopensslbackend.dll", + "./" + distDir + "/plugins/tls/qschannelbackend.dll", "./" + distDir + "/plugins/styles/qwindowsvistastyle.dll", "./" + distDir + "/qt.conf", "./" + distDir + "/translations/qtbase_ar.qm", diff --git a/tests/modules/modulesqt6_5.cpp b/tests/modules/modulesqt6_5.cpp index 4ace60ce..25ea2101 100644 --- a/tests/modules/modulesqt6_5.cpp +++ b/tests/modules/modulesqt6_5.cpp @@ -18,11 +18,36 @@ QSet ModulesQt6_5::qmlLibs(const QString &distDir) const { Tree -= utils.createTree( { + "./" + distDir + "/qml/QtQml/qmlplugin.dll", "./" + distDir + "/qml/QtQml/libqmlplugin.so", "./" + distDir + "/qml/QtQml/plugins.qmltypes" } ); +#ifdef Q_OS_WIN + Tree += utils.createTree( + { + "./" + distDir + "/qml/QtQml/Base/qmlplugin.dll", + "./" + distDir + "/qml/QtQml/Base/plugins.qmltypes", + "./" + distDir + "/qml/QtQml/Base/qmldir", + "./" + distDir + "/qml/QtQml/qmlmetaplugin.dll", + "./" + distDir + "/qml/QtQuick/Controls/Material/impl/RoundedElevationEffect.qml" + "./" + distDir + "/qml/QtQuick/Controls/Windows/ApplicationWindow.qml" + + } + ); +#else + Tree += utils.createTree( + { + "./" + distDir + "/qml/QtQml/Base/libqmlplugin.so", + "./" + distDir + "/qml/QtQml/Base/plugins.qmltypes", + "./" + distDir + "/qml/QtQml/Base/qmldir", + "./" + distDir + "/qml/QtQml/libqmlmetaplugin.so", + "./" + distDir + "/qml/QtQuick/Controls/Material/impl/RoundedElevationEffect.qml" + } + ); +#endif + Tree += utils.createTree( { "./" + distDir + "/qml/QtQml/Base/libqmlplugin.so", From 0a477c719c7ae9d3466f2f1487681047425f9be0 Mon Sep 17 00:00:00 2001 From: EndrII Date: Thu, 20 Jul 2023 01:19:36 +0200 Subject: [PATCH 7/8] fix tests --- tests/modules/modulesqt6_5.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/tests/modules/modulesqt6_5.cpp b/tests/modules/modulesqt6_5.cpp index 25ea2101..4cb32003 100644 --- a/tests/modules/modulesqt6_5.cpp +++ b/tests/modules/modulesqt6_5.cpp @@ -31,7 +31,7 @@ QSet ModulesQt6_5::qmlLibs(const QString &distDir) const { "./" + distDir + "/qml/QtQml/Base/plugins.qmltypes", "./" + distDir + "/qml/QtQml/Base/qmldir", "./" + distDir + "/qml/QtQml/qmlmetaplugin.dll", - "./" + distDir + "/qml/QtQuick/Controls/Material/impl/RoundedElevationEffect.qml" + "./" + distDir + "/qml/QtQuick/Controls/Material/impl/RoundedElevationEffect.qml", "./" + distDir + "/qml/QtQuick/Controls/Windows/ApplicationWindow.qml" } @@ -48,16 +48,6 @@ QSet ModulesQt6_5::qmlLibs(const QString &distDir) const { ); #endif - Tree += utils.createTree( - { - "./" + distDir + "/qml/QtQml/Base/libqmlplugin.so", - "./" + distDir + "/qml/QtQml/Base/plugins.qmltypes", - "./" + distDir + "/qml/QtQml/Base/qmldir", - "./" + distDir + "/qml/QtQml/libqmlmetaplugin.so", - "./" + distDir + "/qml/QtQuick/Controls/Material/impl/RoundedElevationEffect.qml" - } - ); - return Tree; } From faabadfece2bca265fe60e2068b75bfc637ba97d Mon Sep 17 00:00:00 2001 From: EndrII Date: Thu, 20 Jul 2023 01:29:30 +0200 Subject: [PATCH 8/8] fix windows config --- tests/modules/modulesqt6_3.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/modules/modulesqt6_3.cpp b/tests/modules/modulesqt6_3.cpp index ff3a0be6..7dbf8805 100644 --- a/tests/modules/modulesqt6_3.cpp +++ b/tests/modules/modulesqt6_3.cpp @@ -404,6 +404,9 @@ QSet ModulesQt63::qmlLibs(const QString &distDir) const { "./" + distDir + "/qml/QtQuick/plugins.qmltypes", "./" + distDir + "/qml/QtQuick/qmldir", "./" + distDir + "/qml/QtQuick/qtquick2plugin.dll", + "./" + distDir + "/plugins/tls/qcertonlybackend.dll", + "./" + distDir + "/plugins/tls/qopensslbackend.dll", + "./" + distDir + "/plugins/tls/qschannelbackend.dll", "./" + distDir + "/translations/qtdeclarative_ar.qm", "./" + distDir + "/translations/qtdeclarative_bg.qm", "./" + distDir + "/translations/qtdeclarative_ca.qm", @@ -906,9 +909,6 @@ QSet ModulesQt63::qtLibs(const QString &distDir) const { "./" + distDir + "/plugins/platforms/qminimal.dll", "./" + distDir + "/plugins/platforms/qoffscreen.dll", "./" + distDir + "/plugins/platforms/qwindows.dll", - "./" + distDir + "/plugins/tls/qcertonlybackend.dll", - "./" + distDir + "/plugins/tls/qopensslbackend.dll", - "./" + distDir + "/plugins/tls/qschannelbackend.dll", "./" + distDir + "/plugins/styles/qwindowsvistastyle.dll", "./" + distDir + "/qt.conf", "./" + distDir + "/translations/qtbase_ar.qm",