Skip to content

Commit

Permalink
Merge pull request #764 from QuasarApp/task_763
Browse files Browse the repository at this point in the history
Fix of windows debug extensions
  • Loading branch information
EndrII authored Jul 19, 2023
2 parents ce62467 + faabadf commit 76d1d20
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 27 deletions.
12 changes: 11 additions & 1 deletion src/Deploy/src/deploycore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" extension too.
return {".debug", ".pdb"};
}

bool DeployCore::isDebugFile(const QString &file) {
Expand Down Expand Up @@ -742,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;
Expand All @@ -756,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"))) {
Expand Down Expand Up @@ -789,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 "";
Expand Down
15 changes: 8 additions & 7 deletions src/Deploy/src/deploycore.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
#include <params.h>

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,
};

/**
Expand Down
10 changes: 5 additions & 5 deletions src/Deploy/src/distromodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void DistroModule::setPublisher(const QString &publisher) {
_publisher = publisher;
}

QSet<QString> DistroModule::enabledPlugins() const {
const QSet<QString>& DistroModule::enabledPlugins() const {
return _enabled;
}

Expand All @@ -89,7 +89,7 @@ void DistroModule::addEnabledPlugins(const QString &enabled) {
_enabled += enabled;
}

QSet<QString> DistroModule::disabledPlugins() const {
const QSet<QString>& DistroModule::disabledPlugins() const {
return _disabled;
}

Expand All @@ -101,7 +101,7 @@ void DistroModule::addDisabledPlugins(const QString &disabled) {
_disabled += disabled;
}

QSet<QString> DistroModule::extraPlugins() const {
const QSet<QString> &DistroModule::extraPlugins() const {
return _extraPlugins;
}

Expand Down Expand Up @@ -175,7 +175,7 @@ void DistroModule::setInstallDirDEB(const QString &newInstallDir) {
_installDirDEB = newInstallDir;
}

QSet<QString> DistroModule::translation() const {
const QSet<QString> &DistroModule::translation() const {
return _tr;
}

Expand All @@ -187,7 +187,7 @@ void DistroModule::addTranslation(const QString &tr) {
_tr += tr;
}

QSet<QString> DistroModule::extraData() const {
const QSet<QString> &DistroModule::extraData() const {
return _extraData;
}

Expand Down
10 changes: 5 additions & 5 deletions src/Deploy/src/distromodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ class DEPLOYSHARED_EXPORT DistroModule: public DistroStruct
QString publisher() const;
void setPublisher(const QString &publisher);

QSet<QString> enabledPlugins() const;
const QSet<QString> &enabledPlugins() const;
void setEnabledPlugins(const QSet<QString> &enabled);
void addEnabledPlugins(const QString &enabled);

QSet<QString> disabledPlugins() const;
const QSet<QString> &disabledPlugins() const;
void setDisabledPlugins(const QSet<QString> &disabled);
void addDisabledPlugins(const QString &disabled);

QSet<QString> extraPlugins() const;
const QSet<QString>& extraPlugins() const;
void setExtraPlugins(const QSet<QString> &extraPlugins);
void addExtraPlugins(const QString &extraPlugin);

Expand All @@ -66,11 +66,11 @@ class DEPLOYSHARED_EXPORT DistroModule: public DistroStruct

bool isValid();

QSet<QString> extraData() const;
const QSet<QString>& extraData() const;
void setExtraData(const QSet<QString> &extraFiles);
void addExtraData(const QString &extraFile);

QSet<QString> translation() const;
const QSet<QString>& translation() const;
void setTranslation(const QSet<QString> &tr);
void addTranslation(const QString &tr);

Expand Down
3 changes: 3 additions & 0 deletions tests/modules/modulesqt6_3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@ QSet<QString> 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",
Expand Down
42 changes: 36 additions & 6 deletions tests/modules/modulesqt6_5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,35 @@ QSet<QString> 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/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"
"./" + 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

return Tree;
}
Expand All @@ -52,6 +67,21 @@ QSet<QString> ModulesQt6_5::qtWebEngine(const QString &distDir) const
return Tree;
}

QSet<QString> 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<QString> ModulesQt6_5::qtWebEngineWidgets(const QString &distDir) const
{
TestUtils utils;
Expand Down
3 changes: 1 addition & 2 deletions tests/modules/modulesqt6_5.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ class ModulesQt6_5: public ModulesQt6_4
QSet<QString> qmlVirtualKeyBoadrLibs(const QString &distDir = DISTRO_DIR) const override;
QSet<QString> qtWebEngine(const QString &distDir = DISTRO_DIR) const override;
QSet<QString> qtWebEngineWidgets(const QString &distDir = DISTRO_DIR) const override;


QSet<QString> qtLibs(const QString &distDir = DISTRO_DIR) const override;
};

#endif // MODULESQT6_5_H
4 changes: 3 additions & 1 deletion tests/tstMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 76d1d20

Please sign in to comment.