forked from qt-creator/qt-creator
McuSupport: detect fallback lib when desktop kit missing
The library filename has changed in recent versions of the SDK, which was causing false negatives. Fixes: QTCREATORBUG-25469 Change-Id: Ie98c75a57efc5384262dbfd17f729b34cdd5f577 Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
This commit is contained in:
committed by
christiaan.janssen
parent
af184fdd4c
commit
2aead8b3e4
@@ -593,13 +593,18 @@ void targetsAndPackages(const Utils::FilePath &dir, QVector<McuPackage *> *packa
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (!hasDesktopDescription) {
|
if (!hasDesktopDescription) {
|
||||||
Utils::FilePath desktopLib;
|
QVector<Utils::FilePath> desktopLibs;
|
||||||
if (Utils::HostOsInfo::isWindowsHost())
|
if (Utils::HostOsInfo::isWindowsHost()) {
|
||||||
desktopLib = dir / "lib/QulQuickUltralite_QT_32bpp_Windows_Release.lib";
|
desktopLibs << dir / "lib/QulQuickUltralite_QT_32bpp_Windows_Release.lib"; // older versions of QUL (<1.5?)
|
||||||
else
|
desktopLibs << dir / "lib/QulQuickUltralitePlatform_QT_32bpp_Windows_msvc_Release.lib"; // newer versions of QUL
|
||||||
desktopLib = dir / "lib/libQulQuickUltralite_QT_32bpp_Linux_Debug.a";
|
} else {
|
||||||
|
desktopLibs << dir / "lib/libQulQuickUltralite_QT_32bpp_Linux_Debug.a"; // older versions of QUL (<1.5?)
|
||||||
|
desktopLibs << dir / "lib/libQulQuickUltralitePlatform_QT_32bpp_Linux_gnu_Debug.a"; // newer versions of QUL
|
||||||
|
}
|
||||||
|
|
||||||
if (desktopLib.exists()) {
|
if (Utils::anyOf(desktopLibs, [](const Utils::FilePath &desktopLib) {
|
||||||
|
return desktopLib.exists(); })
|
||||||
|
) {
|
||||||
McuTargetDescription desktopDescription;
|
McuTargetDescription desktopDescription;
|
||||||
desktopDescription.qulVersion = descriptions.empty() ?
|
desktopDescription.qulVersion = descriptions.empty() ?
|
||||||
McuSupportOptions::minimalQulVersion().toString()
|
McuSupportOptions::minimalQulVersion().toString()
|
||||||
@@ -613,8 +618,10 @@ void targetsAndPackages(const Utils::FilePath &dir, QVector<McuPackage *> *packa
|
|||||||
descriptions.prepend(desktopDescription);
|
descriptions.prepend(desktopDescription);
|
||||||
} else {
|
} else {
|
||||||
if (dir.exists())
|
if (dir.exists())
|
||||||
printMessage(McuTarget::tr("Skipped creating fallback desktop kit: Could not find %1.")
|
printMessage(McuTarget::tr("Skipped creating fallback desktop kit: Could not find any of %1.")
|
||||||
.arg(QDir::toNativeSeparators(desktopLib.fileNameWithPathComponents(1))),
|
.arg(Utils::transform(desktopLibs, [](const auto &path) {
|
||||||
|
return QDir::toNativeSeparators(path.fileNameWithPathComponents(1));
|
||||||
|
}).toList().join(" or ")),
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user