2023-01-06 16:41:45 +01:00
|
|
|
import qbs.FileInfo
|
2023-02-09 16:06:41 +01:00
|
|
|
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") }
|
2023-02-09 16:06:41 +01:00
|
|
|
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-06-27 13:15:21 +02:00
|
|
|
Depends { name: "VGAnalyticsLib" }
|
2023-08-18 12:48:03 +02:00
|
|
|
|
|
|
|
Depends {
|
|
|
|
name: "xerces-c";
|
|
|
|
condition: Utilities.versionCompare(Qt.core.version, "6") >= 0 && !buildconfig.useConanPackages
|
|
|
|
}
|
|
|
|
|
|
|
|
Depends {
|
|
|
|
name: "conan.XercesC";
|
|
|
|
condition: Utilities.versionCompare(Qt.core.version, "6") >= 0 && buildconfig.useConanPackages
|
|
|
|
}
|
2023-01-04 17:31:50 +01:00
|
|
|
|
2023-08-28 13:48:06 +02:00
|
|
|
// Explicitly link to libcrypto and libssl to avoid error: Failed to load libssl/libcrypto.
|
2023-08-29 15:51:56 +02:00
|
|
|
// Use moduleProviders.qbspkgconfig.extraPaths to define the missing dependency.
|
2023-08-28 13:48:06 +02:00
|
|
|
// Explicit linking will help macdeployqt undertsand that we want to see them inside the bundle.
|
|
|
|
Depends {
|
|
|
|
name: "libcrypto"
|
|
|
|
condition: qbs.targetOS.contains("macos") && Utilities.versionCompare(Qt.core.version, "6") >= 0
|
|
|
|
}
|
|
|
|
|
|
|
|
Depends {
|
|
|
|
name: "libssl"
|
|
|
|
condition: qbs.targetOS.contains("macos") && Utilities.versionCompare(Qt.core.version, "6") >= 0
|
|
|
|
}
|
|
|
|
|
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 {
|
2023-03-04 08:24:39 +01:00
|
|
|
condition: buildconfig.useConanPackages && qbs.targetOS.contains("macos") && buildconfig.enableMultiBundle
|
2023-02-20 13:54:48 +01:00
|
|
|
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",
|
|
|
|
"dialogsetupmultisize.cpp",
|
|
|
|
"dialogdimensioncustomnames.h",
|
|
|
|
"dialogdimensionlabels.h",
|
|
|
|
"dialogmeasurementscsvcolumns.h",
|
|
|
|
"dialogrestrictdimension.h",
|
|
|
|
"dialogabouttape.h",
|
|
|
|
"dialognewmeasurements.h",
|
|
|
|
"dialogmdatabase.h",
|
|
|
|
"dialogtapepreferences.h",
|
|
|
|
"configpages/tapepreferencesconfigurationpage.h",
|
|
|
|
"dialogsetupmultisize.h",
|
|
|
|
"dialogdimensioncustomnames.ui",
|
|
|
|
"dialogdimensionlabels.ui",
|
|
|
|
"dialogmeasurementscsvcolumns.ui",
|
|
|
|
"dialogrestrictdimension.ui",
|
|
|
|
"dialogabouttape.ui",
|
|
|
|
"dialognewmeasurements.ui",
|
|
|
|
"dialogmdatabase.ui",
|
|
|
|
"dialogtapepreferences.ui",
|
|
|
|
"configpages/tapepreferencesconfigurationpage.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 = [];
|
2023-02-15 10:25:35 +01:00
|
|
|
// 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" : "";
|
2023-01-17 11:00:35 +01:00
|
|
|
defines.push('TAPE_BUILDDIR="' + FileInfo.joinPaths(exportingProduct.buildDirectory, exportingProduct.targetName + extension) +'"');
|
2023-01-06 16:41:45 +01:00
|
|
|
return defines;
|
|
|
|
}
|
|
|
|
}
|
2023-01-10 08:22:46 +01:00
|
|
|
|
2023-01-10 18:19:11 +01:00
|
|
|
Group {
|
|
|
|
name: "48x48/apps"
|
2023-01-17 11:00:35 +01:00
|
|
|
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"
|
2023-01-17 11:00:35 +01:00
|
|
|
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"
|
2023-01-17 11:00:35 +01:00
|
|
|
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"
|
2023-01-17 11:00:35 +01:00
|
|
|
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"
|
2023-01-17 11:00:35 +01:00
|
|
|
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"
|
2023-01-17 11:00:35 +01:00
|
|
|
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"
|
2023-01-17 11:00:35 +01:00
|
|
|
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"
|
2023-01-17 11:00:35 +01:00
|
|
|
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"
|
2023-01-17 11:00:35 +01:00
|
|
|
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"
|
2023-01-17 11:00:35 +01:00
|
|
|
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 15:02:53 +01:00
|
|
|
|
2023-01-13 16:54:42 +01:00
|
|
|
Group {
|
|
|
|
name: "Diagrams"
|
2023-01-17 11:00:35 +01:00
|
|
|
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"))
|
2023-01-17 11:00:35 +01:00
|
|
|
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")
|
2023-01-17 11:00:35 +01:00
|
|
|
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
|
|
|
}
|