2012-10-14 21:04:13 +02:00
|
|
|
// see PluginSpecPrivate::loadLibrary()
|
|
|
|
|
function qtLibraryName(qbs, name)
|
|
|
|
|
{
|
|
|
|
|
if (qbs.debugInformation) {
|
|
|
|
|
if (qbs.targetOS.contains("windows"))
|
|
|
|
|
return name + "d";
|
2016-07-28 11:29:06 +02:00
|
|
|
else if (qbs.targetOS.contains("macos"))
|
2012-10-14 21:04:13 +02:00
|
|
|
return name + "_debug";
|
|
|
|
|
}
|
|
|
|
|
return name;
|
|
|
|
|
}
|
2013-09-17 18:15:59 +02:00
|
|
|
|
|
|
|
|
function versionIsAtLeast(actualVersion, expectedVersion)
|
|
|
|
|
{
|
|
|
|
|
var actualVersionParts = actualVersion.split('.').map(function(item) { return parseInt(item, 10); });
|
|
|
|
|
var expectedVersionParts = expectedVersion.split('.').map(function(item) { return parseInt(item, 10); });
|
|
|
|
|
for (var i = 0; i < expectedVersionParts.length; ++i) {
|
|
|
|
|
if (actualVersionParts[i] > expectedVersionParts[i])
|
|
|
|
|
return true;
|
|
|
|
|
if (actualVersionParts[i] < expectedVersionParts[i])
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return i === expectedVersionParts.length || expectedVersionParts[i] === 0;
|
|
|
|
|
}
|