diff options
-rw-r--r-- | share/qbs/modules/bundle/BundleModule.qbs | 5 | ||||
-rw-r--r-- | share/qbs/modules/cpp/DarwinGCC.qbs | 32 |
2 files changed, 24 insertions, 13 deletions
diff --git a/share/qbs/modules/bundle/BundleModule.qbs b/share/qbs/modules/bundle/BundleModule.qbs index 0e3d9bb13..833aeb68b 100644 --- a/share/qbs/modules/bundle/BundleModule.qbs +++ b/share/qbs/modules/bundle/BundleModule.qbs @@ -45,7 +45,7 @@ Module { || product.type.contains("dynamiclibrary") || product.type.contains("loadablemodule")) && !product.consoleApplication - property bool isShallow: qbs.targetOS.contains("ios") && product.type.contains("application") + property bool isShallow: !qbs.targetOS.contains("osx") && product.type.contains("application") property string identifierPrefix: "org.example" property string identifier: [identifierPrefix, qbs.rfc1034Identifier(product.targetName)].join(".") @@ -102,8 +102,7 @@ Module { property string infoPlistFormat: { if (qbs.targetOS.contains("osx")) return infoPlistFile ? "same-as-input" : "xml1"; - else if (qbs.targetOS.contains("ios")) - return "binary1"; + return "binary1"; } property string localizedResourcesFolderSuffix: ".lproj" diff --git a/share/qbs/modules/cpp/DarwinGCC.qbs b/share/qbs/modules/cpp/DarwinGCC.qbs index 78c2bb562..6f066ab2d 100644 --- a/share/qbs/modules/cpp/DarwinGCC.qbs +++ b/share/qbs/modules/cpp/DarwinGCC.qbs @@ -71,26 +71,38 @@ UnixGCC { dict["LSMinimumSystemVersion"] = minimumOsxVersion; } - if (qbs.targetOS.contains("ios")) { + if (qbs.targetOS.contains("ios") || qbs.targetOS.contains("tvos")) { dict["LSRequiresIPhoneOS"] = true; - // architectures supported, to support iPhone 3G for example one has to add - // armv6 to the list and also compile for it (with Xcode 4.4.1 or earlier) - if (!qbs.targetOS.contains("ios-simulator")) - dict["UIRequiredDeviceCapabilities"] = [ "armv7" ]; + if (qbs.targetOS.contains("ios") && !qbs.targetOS.contains("ios-simulator")) + dict["UIRequiredDeviceCapabilities"] = ["armv7"]; + if (qbs.targetOS.contains("tvos") && !qbs.targetOS.contains("tvos-simulator")) + dict["UIRequiredDeviceCapabilities"] = ["arm64"]; + } + + var targetDevices = DarwinTools.targetedDeviceFamily(xcode.targetDevices); + if (qbs.targetOS.contains("ios") && xcode.present) + dict["UIDeviceFamily"] = targetDevices; + + if (qbs.targetOS.contains("ios") || qbs.targetOS.contains("watchos")) { var orientations = [ "UIInterfaceOrientationPortrait", + "UIInterfaceOrientationPortraitUpsideDown", "UIInterfaceOrientationLandscapeLeft", "UIInterfaceOrientationLandscapeRight" ]; - dict["UISupportedInterfaceOrientations"] = orientations; - orientations.splice(1, 0, "UIInterfaceOrientationPortraitUpsideDown"); - dict["UISupportedInterfaceOrientations~ipad"] = orientations; + if (targetDevices.contains("ipad")) + dict["UISupportedInterfaceOrientations~ipad"] = orientations; + + if (targetDevices.contains("watch")) + dict["UISupportedInterfaceOrientations"] = orientations.slice(0, 2); - if (xcode.present) - dict["UIDeviceFamily"] = DarwinTools.targetedDeviceFamily(xcode.targetDevices) + if (targetDevices.contains("iphone")) { + orientations.splice(1, 1); + dict["UISupportedInterfaceOrientations"] = orientations; + } } return dict; |