valentina/src/app/tape/tape.qbs

265 lines
8.5 KiB
QML
Raw Normal View History

2023-01-06 16:41:45 +01:00
import qbs.FileInfo
import qbs.Utilities
2023-01-06 16:41:45 +01:00
2023-01-10 09:39:50 +01:00
VToolApp {
2023-01-04 17:31:50 +01:00
Depends { name: "buildconfig" }
Depends { name: "ib"; condition: qbs.targetOS.contains("macos") }
Depends { name: "Qt"; submodules: ["core", "widgets", "svg"] }
2023-01-04 17:31:50 +01:00
Depends { name: "VMiscLib"; }
Depends { name: "VPatternDBLib"; }
Depends { name: "FervorLib"; }
Depends { name: "QMUParserLib"; }
Depends { name: "VFormatLib"; }
Depends { name: "VWidgetsLib"; }
Depends { name: "VToolsLib"; }
2023-01-13 16:54:42 +01:00
Depends { name: "ebr" }
2023-01-27 18:07:24 +01:00
Depends { name: "multibundle"; }
2023-02-13 18:59:07 +01:00
Depends { name: "conan.XercesC"; condition: buildconfig.useConanPackages }
2023-01-04 17:31:50 +01:00
name: "Tape"
buildconfig.appTarget: qbs.targetOS.contains("macos") ? "Tape" : "tape"
targetName: buildconfig.appTarget
2023-01-27 18:07:24 +01:00
multibundle.targetApps: ["Valentina"]
2023-01-04 17:31:50 +01:00
2023-02-20 13:54:48 +01:00
Properties {
condition: buildconfig.useConanPackages && buildconfig.enableMultiBundle
conan.XercesC.libInstallDir: qbs.installPrefix + "/" + buildconfig.installLibraryPath
conan.XercesC.installLib: true
}
2023-01-04 17:31:50 +01:00
files: [
"main.cpp",
"tmainwindow.cpp",
"mapplication.cpp",
"vlitepattern.cpp",
"vtapesettings.cpp",
"tmainwindow.h",
"mapplication.h",
"version.h",
"vlitepattern.h",
"vtapesettings.h",
"tmainwindow.ui",
]
Group {
name: "dialogs"
prefix: "dialogs/"
files: [
"dialogdimensioncustomnames.cpp",
"dialogdimensionlabels.cpp",
"dialogmeasurementscsvcolumns.cpp",
"dialogrestrictdimension.cpp",
"dialogabouttape.cpp",
"dialognewmeasurements.cpp",
"dialogmdatabase.cpp",
"dialogtapepreferences.cpp",
"configpages/tapepreferencesconfigurationpage.cpp",
"configpages/tapepreferencespathpage.cpp",
"dialogsetupmultisize.cpp",
"dialogdimensioncustomnames.h",
"dialogdimensionlabels.h",
"dialogmeasurementscsvcolumns.h",
"dialogrestrictdimension.h",
"dialogabouttape.h",
"dialognewmeasurements.h",
"dialogmdatabase.h",
"dialogtapepreferences.h",
"configpages/tapepreferencesconfigurationpage.h",
"configpages/tapepreferencespathpage.h",
"dialogsetupmultisize.h",
"dialogdimensioncustomnames.ui",
"dialogdimensionlabels.ui",
"dialogmeasurementscsvcolumns.ui",
"dialogrestrictdimension.ui",
"dialogabouttape.ui",
"dialognewmeasurements.ui",
"dialogmdatabase.ui",
"dialogtapepreferences.ui",
"configpages/tapepreferencesconfigurationpage.ui",
"configpages/tapepreferencespathpage.ui",
"dialogsetupmultisize.ui",
]
}
Group {
name: "Resources"
files: [
"share/resources/tapeicon.qrc",
]
}
2023-01-06 16:41:45 +01:00
Export {
Depends { name: "cpp" }
cpp.defines: {
var defines = [];
// TODO: If minimal qbs version is 1.23 replace with FileInfo.executableSuffix(
2023-01-06 16:41:45 +01:00
var extension = qbs.targetOS.contains("windows") ? ".exe" : "";
defines.push('TAPE_BUILDDIR="' + FileInfo.joinPaths(exportingProduct.buildDirectory, exportingProduct.targetName + extension) +'"');
2023-01-06 16:41:45 +01:00
return defines;
}
}
Group {
name: "Multisize tables"
prefix: project.sourceDirectory + "/src/app/share/tables/multisize/"
files: [
"GOST_man_ru.vst"
]
fileTags: ["multisize_tables"]
qbs.install: true
2023-01-27 21:08:47 +01:00
qbs.installDir: {
if (qbs.targetOS.contains("macos") && !buildconfig.enableMultiBundle)
return buildconfig.installAppPath + "/Valentina.app/Contents/Resources/tables/multisize"
return buildconfig.installDataPath + "/tables/multisize"
}
}
Group {
name: "Measurements templates"
prefix: project.sourceDirectory + "/src/app/share/tables/templates/"
files: [
"template_all_measurements.vit",
"t_Aldrich_Women.vit"
]
fileTags: ["measurements_templates"]
qbs.install: true
2023-01-27 21:08:47 +01:00
qbs.installDir: {
if (qbs.targetOS.contains("macos") && !buildconfig.enableMultiBundle)
return buildconfig.installAppPath + "/Valentina.app/Contents/Resources/tables/templates"
return buildconfig.installDataPath + "/tables/templates"
}
}
2023-01-10 18:19:11 +01:00
Group {
name: "48x48/apps"
prefix: project.sourceDirectory + "/share/icons/48x48/apps/"
2023-01-10 18:19:11 +01:00
files: "tape.png"
fileTags: "freedesktop.48x48AppsIcons"
}
Group {
name: "64x64/apps"
prefix: project.sourceDirectory + "/share/icons/64x64/apps/"
2023-01-10 18:19:11 +01:00
files: "tape.png"
fileTags: "freedesktop.64x64AppsIcons"
}
Group {
name: "128x128/apps"
prefix: project.sourceDirectory + "/share/icons/128x128/apps/"
2023-01-10 18:19:11 +01:00
files: "tape.png"
fileTags: "freedesktop.128x128AppsIcons"
}
Group {
name: "256x256/apps"
prefix: project.sourceDirectory + "/share/icons/256x256/apps/"
2023-01-10 18:19:11 +01:00
files: "tape.png"
fileTags: "freedesktop.256x256AppsIcons"
}
Group {
name: "512x512/apps"
prefix: project.sourceDirectory + "/share/icons/512x512/apps/"
2023-01-10 18:19:11 +01:00
files: "tape.png"
fileTags: "freedesktop.512x512AppsIcons"
}
Group {
name: "apps48x48/mimetypes"
prefix: project.sourceDirectory + "/share/icons/48x48/mimetypes/"
2023-01-10 18:19:11 +01:00
files: ["application-x-valentina-i-measurements.png", "application-x-valentina-s-measurements.png"]
fileTags: "freedesktop.48x48MimetypesIcons"
}
Group {
name: "apps64x64/mimetypes"
prefix: project.sourceDirectory + "/share/icons/64x64/mimetypes/"
2023-01-10 18:19:11 +01:00
files: ["application-x-valentina-i-measurements.png", "application-x-valentina-s-measurements.png"]
fileTags: "freedesktop.64x64MimetypesIcons"
}
Group {
name: "apps128x128/mimetypes"
prefix: project.sourceDirectory + "/share/icons/128x128/mimetypes/"
2023-01-10 18:19:11 +01:00
files: ["application-x-valentina-i-measurements.png", "application-x-valentina-s-measurements.png"]
fileTags: "freedesktop.128x128MimetypesIcons"
}
Group {
name: "apps256x256/mimetypes"
prefix: project.sourceDirectory + "/share/icons/256x256/mimetypes/"
2023-01-10 18:19:11 +01:00
files: ["application-x-valentina-i-measurements.png", "application-x-valentina-s-measurements.png"]
fileTags: "freedesktop.256x256MimetypesIcons"
}
Group {
name: "apps512x512/mimetypes"
prefix: project.sourceDirectory + "/share/icons/512x512/mimetypes/"
2023-01-10 18:19:11 +01:00
files: ["application-x-valentina-i-measurements.png", "application-x-valentina-s-measurements.png"]
fileTags: "freedesktop.512x512MimetypesIcons"
}
2023-01-13 16:54:42 +01:00
Group {
name: "Diagrams"
prefix: product.sourceDirectory + "/share/resources/"
2023-01-13 16:54:42 +01:00
files: "diagrams.qrc"
fileTags: "ebr.external_qrc"
}
Group {
fileTagsFilter: "ebr.rcc"
qbs.install: true
qbs.installDir: {
if (qbs.targetOS.contains("unix") && !qbs.targetOS.contains("macos"))
return "share/valentina/";
2023-01-27 21:08:47 +01:00
if (qbs.targetOS.contains("macos") && !buildconfig.enableMultiBundle)
return buildconfig.installAppPath + "/Valentina.app/Contents/Resources"
return buildconfig.installDataPath + "/";
2023-01-13 16:54:42 +01:00
}
}
2023-01-13 17:47:28 +01:00
Group {
name: "Tape RC"
2023-01-21 16:12:53 +01:00
condition: qbs.targetOS.contains("windows")
prefix: product.sourceDirectory + "/share/resources/"
2023-01-13 17:47:28 +01:00
files: "tape.rc"
}
2023-01-18 14:04:26 +01:00
Group {
name: "win deploy"
condition: qbs.targetOS.contains("windows")
prefix: project.sourceDirectory + "/dist/win/"
files: [
"i-measurements.ico",
"s-measurements.ico",
]
qbs.install: true
qbs.installDir: buildconfig.installAppPath
}
2023-01-25 17:09:45 +01:00
Group {
name: "MacOS assets"
2023-01-27 18:07:24 +01:00
condition: qbs.targetOS.contains("macos") && buildconfig.enableMultiBundle
2023-01-25 17:09:45 +01:00
prefix: project.sourceDirectory + "/dist/macx/tape/"
files: [
2023-01-25 17:13:07 +01:00
"Info.plist",
"tape.xcassets"
]
}
Group {
name: "ICNS"
2023-01-27 18:07:24 +01:00
condition: qbs.targetOS.contains("macos") && buildconfig.enableMultiBundle
2023-01-25 17:13:07 +01:00
prefix: project.sourceDirectory + "/dist/macx/valentina-project.xcassets/"
files: [
"i-measurements.iconset",
"s-measurements.iconset"
2023-01-25 17:09:45 +01:00
]
}
2023-01-04 17:31:50 +01:00
}