valentina/winsetup.qbs

81 lines
1.8 KiB
QML
Raw Normal View History

2024-01-24 10:22:01 +01:00
import qbs.FileInfo
import qbs.Utilities
import qbs.TemporaryDir
2024-01-24 14:46:56 +01:00
InnoSetup {
Depends { name: "buildconfig" }
property bool _test: {
var present = qbs.targetOS.contains("windows") && innosetup.present;
console.info("has innosetup: " + present);
if (present) {
console.info("innosetup version " + innosetup.version);
2024-01-24 10:22:01 +01:00
}
2024-01-24 14:46:56 +01:00
}
2024-01-24 10:22:01 +01:00
2024-01-24 14:46:56 +01:00
condition: qbs.targetOS.contains("windows")
name: "ValentinaSetup"
targetName: "ValentinaInstaller"
version: buildconfig.projectVersion
builtByDefault: false
2024-01-24 10:22:01 +01:00
2024-01-24 14:46:56 +01:00
files: [
project.sourceDirectory + "/dist/win/inno/valentina.iss"
]
2024-01-24 10:22:01 +01:00
2024-01-24 14:46:56 +01:00
property string arhitecture: {
if (qbs.architecture == "x86_64")
{
return "x64"
2024-01-24 10:22:01 +01:00
}
2024-01-24 14:46:56 +01:00
if (qbs.architecture == "arm64")
{
return "arm64";
}
2024-01-24 10:22:01 +01:00
2024-01-24 14:46:56 +01:00
return "";
}
2024-01-24 10:22:01 +01:00
2024-01-24 14:46:56 +01:00
property string minVersion: {
if (Utilities.versionCompare(Qt.core.version, "6.5") >= 0)
{
return "10.0.17763";
}
2024-01-24 10:22:01 +01:00
2024-01-24 14:46:56 +01:00
if (Utilities.versionCompare(Qt.core.version, "6.3") >= 0)
{
return "10.0.19044";
}
2024-01-24 10:22:01 +01:00
2024-01-24 14:46:56 +01:00
if (Utilities.versionCompare(Qt.core.version, "6.2") >= 0)
{
return "10.0.17763";
}
2024-01-24 10:22:01 +01:00
2024-01-24 14:46:56 +01:00
if (Utilities.versionCompare(Qt.core.version, "6.0") >= 0)
{
return "10.0";
2024-01-24 10:22:01 +01:00
}
2024-01-24 14:46:56 +01:00
return "6.1";
2024-01-24 10:22:01 +01:00
}
2024-01-24 14:46:56 +01:00
innosetup.verboseOutput: true
innosetup.defines: [
"MyAppVersion=" + version,
"MyAppCopyright=" + buildconfig.valentina_copyright_string,
"MyAppArchitecture=" + arhitecture,
"MyAppMinWinVersion=" + minVersion,
"buildDirectory=" + project.qbs.installRoot
]
innosetup.compilerFlags: ["/V9"]
Group {
fileTagsFilter: ['innosetup.exe']
qbs.install: true
qbs.installPrefix: '/'
}
}