valentina/qbs/imports/VToolApp.qbs

65 lines
2.0 KiB
QML
Raw Normal View History

2023-01-11 12:03:32 +01:00
import qbs.FileInfo
2023-01-10 09:39:50 +01:00
VApp {
2023-01-11 12:03:32 +01:00
Depends { name: "freedesktop2" }
Depends { name: "tenv" }
Depends { name: "i18nconfig"; }
2023-01-11 12:03:32 +01:00
2023-01-10 09:39:50 +01:00
version: "0.7.52"
install: true
installDir: buildconfig.installAppPath
installDebugInformation: true
2023-01-11 12:03:32 +01:00
Properties {
// Breakpoints do not work if debug the app inside of bundle. In debug mode we turn off creating a bundle.
// Probably it will breake some dependencies. Version for Mac designed to work inside an app bundle.
condition: qbs.targetOS.contains("macos") && qbs.buildVariant == "debug"
bundle.isBundle: false
}
2023-01-10 18:35:39 +01:00
Properties {
condition: buildconfig.enableAppImage && qbs.targetOS.contains("unix") && !qbs.targetOS.contains("macos")
cpp.dynamicLibraries: ["icudata", "icui18n", "icuuc"]
}
2023-01-11 12:03:32 +01:00
Group {
name: "freedesktop"
prefix: project.sourceDirectory + "/dist/"
2023-01-11 12:03:32 +01:00
files: [
2023-01-13 16:12:13 +01:00
"ua.com.smart-pattern." + product.targetName + ".desktop"
2023-01-11 12:03:32 +01:00
]
}
freedesktop2.desktopKeys: ({
'Exec': FileInfo.joinPaths(qbs.installPrefix,
product.installDir,
product.targetName) + ' %F',
'X-Application-Version': product.version,
})
2023-01-11 14:08:32 +01:00
Group {
name: "Translations"
prefix: project.sourceDirectory + "/share/translations/"
2023-01-11 14:08:32 +01:00
files: {
var files = [];
var locales = i18nconfig.translationLocales;
2023-01-11 14:08:32 +01:00
for (var i = 0; i < locales.length; i++) {
files.push("valentina_" + locales[i] + ".ts");
}
var pmSystems = i18nconfig.pmSystems;
2023-01-11 14:08:32 +01:00
for (var i = 0; i < pmSystems.length; i++) {
files.push("measurements_" + pmSystems[i] + ".ts");
for (var j = 0; j < locales.length; j++) {
files.push("measurements_" + pmSystems[i] + "_" + locales[j] + ".ts");
}
}
return files;
}
}
2023-01-10 09:39:50 +01:00
}