From 4dd424262e889d1e021b51f39fae9485f24a9fa3 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 28 Jan 2023 08:07:12 +0200 Subject: [PATCH] Fix build on Linux. --- qbs/imports/VApp.qbs | 2 +- qbs/imports/VLib.qbs | 4 ++-- qbs/imports/VTestApp.qbs | 6 +++++- qbs/imports/VToolApp.qbs | 11 +++++++++-- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/qbs/imports/VApp.qbs b/qbs/imports/VApp.qbs index f115517e9..3c33294d6 100644 --- a/qbs/imports/VApp.qbs +++ b/qbs/imports/VApp.qbs @@ -3,7 +3,7 @@ import qbs.Utilities CppApplication { Depends { name: "buildconfig" } - Depends { name: "bundle" } + Depends { name: "bundle"; condition: qbs.targetOS.contains("macos") } Properties { condition: qbs.targetOS.contains("macos") diff --git a/qbs/imports/VLib.qbs b/qbs/imports/VLib.qbs index 390e67728..3f5636737 100644 --- a/qbs/imports/VLib.qbs +++ b/qbs/imports/VLib.qbs @@ -2,13 +2,12 @@ import qbs.FileInfo Library { Depends { name: "buildconfig" } - Depends { name: "bundle" } + Depends { name: "bundle"; condition: qbs.targetOS.contains("macos") } Depends { name: "cpp" } type: buildconfig.staticBuild ? "staticlibrary" : "dynamiclibrary" buildconfig.appTarget: qbs.targetOS.contains("macos") ? "Valentina" : "valentina" - bundle.isBundle: buildconfig.frameworksBuild cpp.includePaths: [".."] // Allow MAC OS X to find library inside a bundle @@ -30,5 +29,6 @@ Library { Properties { condition: qbs.targetOS.contains("macos") cpp.minimumMacosVersion: buildconfig.minimumMacosVersion + bundle.isBundle: buildconfig.frameworksBuild } } diff --git a/qbs/imports/VTestApp.qbs b/qbs/imports/VTestApp.qbs index c1c06bea7..481eba4e0 100644 --- a/qbs/imports/VTestApp.qbs +++ b/qbs/imports/VTestApp.qbs @@ -1,6 +1,10 @@ VApp { type: base.concat("autotest") - bundle.isBundle: false install: false condition: buildconfig.enableUnitTests + + Properties { + condition: qbs.targetOS.contains("macos") + bundle.isBundle: false + } } diff --git a/qbs/imports/VToolApp.qbs b/qbs/imports/VToolApp.qbs index 1215b13ab..73fd2d8c8 100644 --- a/qbs/imports/VToolApp.qbs +++ b/qbs/imports/VToolApp.qbs @@ -15,7 +15,7 @@ VApp { installDir: buildconfig.installBinaryPath installDebugInformation: qbs.buildVariant !== "release" consoleApplication: false - bundle.isBundle: qbs.buildVariant === "release" + bundle.identifierPrefix: 'ua.com.smart-pattern' property bool primaryApp: false @@ -24,6 +24,13 @@ VApp { "NSHumanReadableCopyright": buildconfig.valentina_copyright_string }) + 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") + bundle.isBundle: qbs.buildVariant === "release" + } + Properties { condition: buildconfig.enableAppImage && qbs.targetOS.contains("unix") && !qbs.targetOS.contains("macos") cpp.dynamicLibraries: ["icudata", "icui18n", "icuuc"] @@ -202,7 +209,7 @@ VApp { } Properties { - condition: i18nconfig.limitDeploymentOfQtTranslations + condition: qbs.targetOS.contains("windows") && i18nconfig.limitDeploymentOfQtTranslations windeployqt.languages: i18nconfig.qtTranslationLocales.join(',') }