summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@theqtcompany.com>2016-03-31 17:27:20 -0700
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2016-04-13 08:22:33 +0000
commit4e442c034dcfee45c24a12d289894dbce09fdbc6 (patch)
treef88cf93cc2427c95fd7d91c7d2e09d7996889148
parent09e7966f23b547508eec24afc96a7c6d020ecece (diff)
downloadqbs-4e442c034dcfee45c24a12d289894dbce09fdbc6.tar.gz
Add a validate script to the bundle module.
Also, adjust autotests to be more flexible. Some product types (for example, application extensions) may not exist in older versions of Xcode. This fixes the bundleStructure autotest. Change-Id: I2e73cd65f50f44017780001e9e0d5fb184edba31 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
-rw-r--r--share/qbs/modules/bundle/BundleModule.qbs67
-rw-r--r--share/qbs/modules/bundle/MacOSX-Package-Types.xcspec462
-rw-r--r--share/qbs/modules/bundle/MacOSX-Product-Types.xcspec545
-rw-r--r--share/qbs/modules/bundle/bundle.js46
-rwxr-xr-xshare/qbs/modules/bundle/update-specs.sh10
-rw-r--r--tests/auto/blackbox/testdata/bundle-structure/bundle-structure.qbs49
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp383
-rw-r--r--tests/auto/blackbox/tst_blackbox.h1
8 files changed, 1394 insertions, 169 deletions
diff --git a/share/qbs/modules/bundle/BundleModule.qbs b/share/qbs/modules/bundle/BundleModule.qbs
index 08c473356..6f45b07ed 100644
--- a/share/qbs/modules/bundle/BundleModule.qbs
+++ b/share/qbs/modules/bundle/BundleModule.qbs
@@ -70,11 +70,25 @@ Module {
property var xcodeSettings: ({})
configure: {
- if (xcodeDeveloperPath) {
- var reader = new Bundle.XcodeBuildSpecsReader(xcodeDeveloperPath,
- additionalSettings,
- !qbs.targetOS.contains("osx"));
- xcodeSettings = reader.expandedSettings(_productTypeIdentifier) || {};
+ var specsPath = path;
+ var specsSeparator = "-";
+ if (xcodeDeveloperPath && _useXcodeBuildSpecs) {
+ specsPath = xcodeDeveloperPath
+ + "/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications";
+ specsSeparator = " ";
+ }
+
+ var reader = new Bundle.XcodeBuildSpecsReader(specsPath,
+ specsSeparator,
+ additionalSettings,
+ !qbs.targetOS.contains("osx"));
+ var settings = reader.expandedSettings(_productTypeIdentifier);
+ if (settings) {
+ xcodeSettings = settings;
+ found = true;
+ } else {
+ xcodeSettings = {};
+ found = false;
}
}
}
@@ -163,9 +177,11 @@ Module {
readonly property string unlocalizedResourcesFolderPath: bundleSettingsProbe.xcodeSettings["UNLOCALIZED_RESOURCES_FOLDER_PATH"]
readonly property string versionsFolderPath: bundleSettingsProbe.xcodeSettings["VERSIONS_FOLDER_PATH"]
+ // private properties
property string _productTypeIdentifier: Bundle.productTypeIdentifier(product.type)
- // private properties
+ property bool _useXcodeBuildSpecs: true // false to use ONLY the qbs build specs
+
readonly property var extraEnv: ({
"PRODUCT_BUNDLE_IDENTIFIER": identifier
})
@@ -197,6 +213,45 @@ Module {
};
}
+ validate: {
+ if (!bundleSettingsProbe.found) {
+ var error = "Bundle product type " + _productTypeIdentifier + " is not supported.";
+ if ((_productTypeIdentifier || "").startsWith("com.apple.product-type."))
+ error += " You may need to upgrade Xcode.";
+ throw error;
+ }
+
+ var validator = new ModUtils.PropertyValidator("bundle");
+ validator.setRequiredProperty("bundleName", bundleName);
+ validator.setRequiredProperty("infoPlistPath", infoPlistPath);
+ validator.setRequiredProperty("pbdevelopmentPlistPath", pbdevelopmentPlistPath);
+ validator.setRequiredProperty("pkgInfoPath", pkgInfoPath);
+ validator.setRequiredProperty("versionPlistPath", versionPlistPath);
+ validator.setRequiredProperty("executablePath", executablePath);
+ validator.setRequiredProperty("contentsFolderPath", contentsFolderPath);
+ validator.setRequiredProperty("documentationFolderPath", documentationFolderPath);
+ validator.setRequiredProperty("executableFolderPath", executableFolderPath);
+ validator.setRequiredProperty("executablesFolderPath", executablesFolderPath);
+ validator.setRequiredProperty("frameworksFolderPath", frameworksFolderPath);
+ validator.setRequiredProperty("javaFolderPath", javaFolderPath);
+ validator.setRequiredProperty("localizedResourcesFolderPath", localizedResourcesFolderPath);
+ validator.setRequiredProperty("pluginsFolderPath", pluginsFolderPath);
+ validator.setRequiredProperty("privateHeadersFolderPath", privateHeadersFolderPath);
+ validator.setRequiredProperty("publicHeadersFolderPath", publicHeadersFolderPath);
+ validator.setRequiredProperty("scriptsFolderPath", scriptsFolderPath);
+ validator.setRequiredProperty("sharedFrameworksFolderPath", sharedFrameworksFolderPath);
+ validator.setRequiredProperty("sharedSupportFolderPath", sharedSupportFolderPath);
+ validator.setRequiredProperty("unlocalizedResourcesFolderPath", unlocalizedResourcesFolderPath);
+
+ if (packageType === "FMWK") {
+ validator.setRequiredProperty("frameworkVersion", frameworkVersion);
+ validator.setRequiredProperty("versionsFolderPath", versionsFolderPath);
+ }
+
+ // extension and infoStringsPath might not be set
+ return validator.validate();
+ }
+
FileTagger {
fileTags: ["infoplist"]
patterns: ["Info.plist", "*-Info.plist"]
diff --git a/share/qbs/modules/bundle/MacOSX-Package-Types.xcspec b/share/qbs/modules/bundle/MacOSX-Package-Types.xcspec
new file mode 100644
index 000000000..b36353fc7
--- /dev/null
+++ b/share/qbs/modules/bundle/MacOSX-Package-Types.xcspec
@@ -0,0 +1,462 @@
+[
+ {
+ "DefaultBuildSettings" : {
+ "EXECUTABLE_PATH" : "$(EXECUTABLE_NAME)",
+ "EXECUTABLE_PREFIX" : "",
+ "EXECUTABLE_SUFFIX" : "",
+ "EXECUTABLE_NAME" : "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_VARIANT_SUFFIX)$(EXECUTABLE_SUFFIX)"
+ },
+ "Identifier" : "com.apple.package-type.mach-o-executable",
+ "Type" : "PackageType",
+ "Name" : "Mach-O Executable",
+ "Description" : "Mach-O executable",
+ "ProductReference" : {
+ "FileType" : "compiled.mach-o.executable",
+ "Name" : "$(EXECUTABLE_NAME)",
+ "IsLaunchable" : "YES"
+ }
+ },
+ {
+ "DefaultBuildSettings" : {
+ "EXECUTABLE_PATH" : "$(EXECUTABLE_NAME)",
+ "EXECUTABLE_PREFIX" : "",
+ "EXECUTABLE_SUFFIX" : "",
+ "EXECUTABLE_NAME" : "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_VARIANT_SUFFIX)$(EXECUTABLE_SUFFIX)"
+ },
+ "Identifier" : "com.apple.package-type.mach-o-objfile",
+ "Type" : "PackageType",
+ "Name" : "Mach-O Object File",
+ "Description" : "Mach-O Object File",
+ "ProductReference" : {
+ "FileType" : "compiled.mach-o.objfile",
+ "Name" : "$(EXECUTABLE_NAME)",
+ "IsLaunchable" : "NO"
+ }
+ },
+ {
+ "DefaultBuildSettings" : {
+ "EXECUTABLE_PATH" : "$(EXECUTABLE_NAME)",
+ "EXECUTABLE_PREFIX" : "",
+ "EXECUTABLE_SUFFIX" : "",
+ "EXECUTABLE_NAME" : "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_VARIANT_SUFFIX)$(EXECUTABLE_SUFFIX)"
+ },
+ "Identifier" : "com.apple.package-type.mach-o-dylib",
+ "Type" : "PackageType",
+ "Name" : "Mach-O Dynamic Library",
+ "Description" : "Mach-O dynamic library",
+ "ProductReference" : {
+ "FileType" : "compiled.mach-o.dylib",
+ "Name" : "$(EXECUTABLE_NAME)",
+ "IsLaunchable" : "NO"
+ }
+ },
+ {
+ "DefaultBuildSettings" : {
+ "EXECUTABLE_PATH" : "$(EXECUTABLE_NAME)",
+ "EXECUTABLE_PREFIX" : "lib",
+ "EXECUTABLE_SUFFIX" : ".a",
+ "EXECUTABLE_NAME" : "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_VARIANT_SUFFIX)$(EXECUTABLE_SUFFIX)"
+ },
+ "Identifier" : "com.apple.package-type.static-library",
+ "Type" : "PackageType",
+ "Name" : "Mach-O Static Library",
+ "Description" : "Mach-O static library",
+ "ProductReference" : {
+ "FileType" : "archive.ar",
+ "Name" : "$(EXECUTABLE_NAME)",
+ "IsLaunchable" : "NO"
+ }
+ },
+ {
+ "DefaultBuildSettings" : {
+ "EXECUTABLE_PATH" : "$(EXECUTABLE_NAME)",
+ "EXECUTABLE_PREFIX" : "",
+ "EXECUTABLE_SUFFIX" : ".dylib",
+ "EXECUTABLE_NAME" : "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_VARIANT_SUFFIX)$(EXECUTABLE_SUFFIX)"
+ },
+ "Identifier" : "com.apple.package-type.mach-o-bundle",
+ "Type" : "PackageType",
+ "Name" : "Mach-O Loadable",
+ "Description" : "Mach-O loadable",
+ "ProductReference" : {
+ "FileType" : "compiled.mach-o.bundle",
+ "Name" : "$(EXECUTABLE_NAME)",
+ "IsLaunchable" : "NO"
+ }
+ },
+ {
+ "DefaultBuildSettings" : {
+ "PUBLIC_HEADERS_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)\/Headers",
+ "EXECUTABLE_NAME" : "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_VARIANT_SUFFIX)$(EXECUTABLE_SUFFIX)",
+ "EXECUTABLE_PREFIX" : "",
+ "PLUGINS_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)\/PlugIns",
+ "DOCUMENTATION_FOLDER_PATH" : "$(LOCALIZED_RESOURCES_FOLDER_PATH)\/Documentation",
+ "EXECUTABLES_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)\/Executables",
+ "INFOSTRINGS_PATH" : "$(LOCALIZED_RESOURCES_FOLDER_PATH)\/InfoPlist.strings",
+ "INFOPLIST_PATH" : "$(CONTENTS_FOLDER_PATH)\/Info.plist",
+ "EXECUTABLE_SUFFIX" : "",
+ "VERSIONPLIST_PATH" : "$(CONTENTS_FOLDER_PATH)\/version.plist",
+ "SHARED_SUPPORT_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)\/SharedSupport",
+ "EXECUTABLE_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)\/MacOS",
+ "PBDEVELOPMENTPLIST_PATH" : "$(CONTENTS_FOLDER_PATH)\/pbdevelopment.plist",
+ "FRAMEWORKS_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)\/Frameworks",
+ "LOCALIZED_RESOURCES_FOLDER_PATH" : "$(UNLOCALIZED_RESOURCES_FOLDER_PATH)\/$(DEVELOPMENT_LANGUAGE).lproj",
+ "SCRIPTS_FOLDER_PATH" : "$(UNLOCALIZED_RESOURCES_FOLDER_PATH)\/Scripts",
+ "WRAPPER_PREFIX" : "",
+ "PRIVATE_HEADERS_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)\/PrivateHeaders",
+ "CONTENTS_FOLDER_PATH" : "$(WRAPPER_NAME)\/Contents",
+ "WRAPPER_NAME" : "$(WRAPPER_PREFIX)$(PRODUCT_NAME)$(WRAPPER_SUFFIX)",
+ "PKGINFO_PATH" : "$(CONTENTS_FOLDER_PATH)\/PkgInfo",
+ "EXECUTABLE_PATH" : "$(EXECUTABLE_FOLDER_PATH)\/$(EXECUTABLE_NAME)",
+ "UNLOCALIZED_RESOURCES_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)\/Resources",
+ "JAVA_FOLDER_PATH" : "$(UNLOCALIZED_RESOURCES_FOLDER_PATH)\/Java",
+ "SHARED_FRAMEWORKS_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)\/SharedFrameworks",
+ "WRAPPER_SUFFIX" : ".bundle"
+ },
+ "Identifier" : "com.apple.package-type.wrapper",
+ "Type" : "PackageType",
+ "Name" : "Wrapper",
+ "Description" : "Wrapper",
+ "ProductReference" : {
+ "FileType" : "wrapper.cfbundle",
+ "Name" : "$(WRAPPER_NAME)",
+ "IsLaunchable" : "NO"
+ }
+ },
+ {
+ "ProductReference" : {
+ "FileType" : "wrapper.cfbundle",
+ "Name" : "$(WRAPPER_NAME)",
+ "IsLaunchable" : "NO"
+ },
+ "DefaultBuildSettings" : {
+ "CONTENTS_FOLDER_PATH" : "$(WRAPPER_NAME)",
+ "UNLOCALIZED_RESOURCES_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)",
+ "SHALLOW_BUNDLE" : "YES",
+ "EXECUTABLE_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)"
+ },
+ "Type" : "PackageType",
+ "BasedOn" : "com.apple.package-type.wrapper",
+ "Name" : "Wrapper (Shallow)",
+ "Identifier" : "com.apple.package-type.wrapper.shallow",
+ "Description" : "Shallow Wrapper"
+ },
+ {
+ "ProductReference" : {
+ "FileType" : "wrapper.application",
+ "Name" : "$(WRAPPER_NAME)",
+ "IsLaunchable" : "YES"
+ },
+ "DefaultBuildSettings" : {
+ "GENERATE_PKGINFO_FILE" : "YES"
+ },
+ "Type" : "PackageType",
+ "BasedOn" : "com.apple.package-type.wrapper",
+ "Name" : "Application Wrapper",
+ "Identifier" : "com.apple.package-type.wrapper.application",
+ "Description" : "Application Wrapper"
+ },
+ {
+ "ProductReference" : {
+ "FileType" : "wrapper.application",
+ "Name" : "$(WRAPPER_NAME)",
+ "IsLaunchable" : "YES"
+ },
+ "DefaultBuildSettings" : {
+ "UNLOCALIZED_RESOURCES_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)",
+ "SHALLOW_BUNDLE" : "YES",
+ "GENERATE_PKGINFO_FILE" : "YES"
+ },
+ "Type" : "PackageType",
+ "BasedOn" : "com.apple.package-type.wrapper.shallow",
+ "Name" : "Application Wrapper (Shallow)",
+ "Identifier" : "com.apple.package-type.wrapper.application.shallow",
+ "Description" : "Shallow Application Wrapper"
+ },
+ {
+ "ProductReference" : {
+ "FileType" : "wrapper.cfbundle",
+ "Name" : "$(WRAPPER_NAME)",
+ "IsLaunchable" : "NO"
+ },
+ "DefaultBuildSettings" : {
+ "PRIVATE_HEADERS_FOLDER_PATH" : "$(KEXT_FRAMEWORK)\/Contents\/PrivateHeaders\/$(KEXT_FAMILY_NAME)",
+ "PUBLIC_HEADERS_FOLDER_PATH" : "$(KEXT_FRAMEWORK)\/Contents\/Headers\/$(KEXT_FAMILY_NAME)"
+ },
+ "Type" : "PackageType",
+ "BasedOn" : "com.apple.package-type.wrapper",
+ "Name" : "Kernel Extension Wrapper",
+ "Identifier" : "com.apple.package-type.wrapper.kernel-extension",
+ "Description" : "Kernel Extension Wrapper"
+ },
+ {
+ "ProductReference" : {
+ "FileType" : "wrapper.cfbundle",
+ "Name" : "$(WRAPPER_NAME)",
+ "IsLaunchable" : "NO"
+ },
+ "DefaultBuildSettings" : {
+ "PRIVATE_HEADERS_FOLDER_PATH" : "$(KEXT_FRAMEWORK)\/Contents\/PrivateHeaders\/$(KEXT_FAMILY_NAME)",
+ "PUBLIC_HEADERS_FOLDER_PATH" : "$(KEXT_FRAMEWORK)\/Contents\/Headers\/$(KEXT_FAMILY_NAME)",
+ "SHALLOW_BUNDLE" : "YES"
+ },
+ "Type" : "PackageType",
+ "BasedOn" : "com.apple.package-type.wrapper.shallow",
+ "Name" : "Kernel Extension Wrapper (Shallow)",
+ "Identifier" : "com.apple.package-type.wrapper.kernel-extension.shallow",
+ "Description" : "Shallow Kernel Extension Wrapper"
+ },
+ {
+ "DefaultBuildSettings" : {
+ "PUBLIC_HEADERS_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)\/Headers",
+ "EXECUTABLE_NAME" : "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_VARIANT_SUFFIX)$(EXECUTABLE_SUFFIX)",
+ "EXECUTABLE_PREFIX" : "",
+ "PLUGINS_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)\/PlugIns",
+ "DOCUMENTATION_FOLDER_PATH" : "$(LOCALIZED_RESOURCES_FOLDER_PATH)\/Documentation",
+ "EXECUTABLES_FOLDER_PATH" : "$(LOCALIZED_RESOURCES_FOLDER_PATH)",
+ "INFOPLIST_PATH" : "$(UNLOCALIZED_RESOURCES_FOLDER_PATH)\/Info.plist",
+ "EXECUTABLE_SUFFIX" : "",
+ "INFOPLISTSTRINGS_PATH" : "$(LOCALIZED_RESOURCES_FOLDER_PATH)\/InfoPlist.strings",
+ "VERSIONPLIST_PATH" : "$(UNLOCALIZED_RESOURCES_FOLDER_PATH)\/version.plist",
+ "SHARED_SUPPORT_FOLDER_PATH" : "$(UNLOCALIZED_RESOURCES_FOLDER_PATH)",
+ "EXECUTABLE_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)",
+ "PBDEVELOPMENTPLIST_PATH" : "$(CONTENTS_FOLDER_PATH)\/pbdevelopment.plist",
+ "VERSIONS_FOLDER_PATH" : "$(WRAPPER_NAME)\/Versions",
+ "FRAMEWORKS_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)\/Frameworks",
+ "CODESIGNING_FOLDER_PATH" : "$(TARGET_BUILD_DIR)\/$(CONTENTS_FOLDER_PATH)",
+ "LOCALIZED_RESOURCES_FOLDER_PATH" : "$(UNLOCALIZED_RESOURCES_FOLDER_PATH)\/$(DEVELOPMENT_LANGUAGE).lproj",
+ "SCRIPTS_FOLDER_PATH" : "$(UNLOCALIZED_RESOURCES_FOLDER_PATH)\/Scripts",
+ "WRAPPER_PREFIX" : "",
+ "PRIVATE_HEADERS_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)\/PrivateHeaders",
+ "CURRENT_VERSION" : "Current",
+ "PKGINFO_PATH" : "$(WRAPPER_NAME)\/PkgInfo",
+ "WRAPPER_NAME" : "$(WRAPPER_PREFIX)$(PRODUCT_NAME)$(WRAPPER_SUFFIX)",
+ "CONTENTS_FOLDER_PATH" : "$(VERSIONS_FOLDER_PATH)\/$(FRAMEWORK_VERSION)",
+ "EXECUTABLE_PATH" : "$(EXECUTABLE_FOLDER_PATH)\/$(EXECUTABLE_NAME)",
+ "UNLOCALIZED_RESOURCES_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)\/Resources",
+ "JAVA_FOLDER_PATH" : "$(UNLOCALIZED_RESOURCES_FOLDER_PATH)\/Java",
+ "SHARED_FRAMEWORKS_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)\/SharedFrameworks",
+ "WRAPPER_SUFFIX" : ".framework"
+ },
+ "Identifier" : "com.apple.package-type.wrapper.framework",
+ "Type" : "PackageType",
+ "Name" : "Framework Wrapper",
+ "Description" : "Framework wrapper",
+ "ProductReference" : {
+ "FileType" : "wrapper.framework",
+ "Name" : "$(WRAPPER_NAME)",
+ "IsLaunchable" : "NO"
+ }
+ },
+ {
+ "ProductReference" : {
+ "FileType" : "wrapper.framework.static",
+ "Name" : "$(WRAPPER_NAME)",
+ "IsLaunchable" : "NO"
+ },
+ "DefaultBuildSettings" : {
+ "EXECUTABLE_SUFFIX" : "",
+ "EXECUTABLE_NAME" : "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_VARIANT_SUFFIX)$(EXECUTABLE_SUFFIX)",
+ "EXECUTABLE_PREFIX" : ""
+ },
+ "Type" : "PackageType",
+ "BasedOn" : "com.apple.package-type.wrapper.framework",
+ "Name" : "Mach-O Static Framework",
+ "Identifier" : "com.apple.package-type.wrapper.framework.static",
+ "Description" : "Mach-O static framework"
+ },
+ {
+ "ProductReference" : {
+ "FileType" : "wrapper.framework",
+ "Name" : "$(WRAPPER_NAME)",
+ "IsLaunchable" : "NO"
+ },
+ "DefaultBuildSettings" : {
+ "UNLOCALIZED_RESOURCES_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)",
+ "CONTENTS_FOLDER_PATH" : "$(WRAPPER_NAME)",
+ "SHALLOW_BUNDLE" : "YES",
+ "VERSIONS_FOLDER_PATH" : "$(WRAPPER_NAME)"
+ },
+ "Type" : "PackageType",
+ "BasedOn" : "com.apple.package-type.wrapper.framework",
+ "Name" : "Shallow Framework Wrapper",
+ "Identifier" : "com.apple.package-type.wrapper.framework.shallow",
+ "Description" : "Shallow framework wrapper"
+ },
+ {
+ "ProductReference" : {
+ "FileType" : "wrapper.cfbundle",
+ "Name" : "$(WRAPPER_NAME)",
+ "IsLaunchable" : "NO"
+ },
+ "DefaultBuildSettings" : {
+ "WRAPPER_SUFFIX" : "xctest"
+ },
+ "Type" : "PackageType",
+ "BasedOn" : "com.apple.package-type.wrapper",
+ "Name" : "Unit Test Bundle",
+ "Identifier" : "com.apple.package-type.bundle.unit-test",
+ "Description" : "Unit Test Bundle"
+ },
+ {
+ "ProductReference" : {
+ "FileType" : "wrapper.cfbundle",
+ "Name" : "$(WRAPPER_NAME)",
+ "IsLaunchable" : "NO"
+ },
+ "DefaultBuildSettings" : {
+ "WRAPPER_SUFFIX" : "octest"
+ },
+ "Type" : "PackageType",
+ "BasedOn" : "com.apple.package-type.wrapper",
+ "Name" : "OCUnit Test Bundle",
+ "Identifier" : "com.apple.package-type.bundle.ocunit-test",
+ "Description" : "OCUnit Test Bundle"
+ },
+ {
+ "ProductReference" : {
+ "FileType" : "folder",
+ "Name" : "$(WRAPPER_NAME)",
+ "IsLaunchable" : "NO"
+ },
+ "DefaultBuildSettings" : {
+ "EXECUTABLE_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)",
+ "JAVA_FOLDER_PATH" : "$(UNLOCALIZED_RESOURCES_FOLDER_PATH)",
+ "INFOSTRINGS_PATH" : "$(LOCALIZED_RESOURCES_FOLDER_PATH)\/ContentInfo.strings",
+ "INFOPLIST_PATH" : "$(WRAPPER_NAME)\/ContentInfo.plist",
+ "WRAPPER_SUFFIX" : "",
+ "UNLOCALIZED_RESOURCES_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)",
+ "DOCUMENTATION_FOLDER_PATH" : "$(LOCALIZED_RESOURCES_FOLDER_PATH)",
+ "EXECUTABLES_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)",
+ "LOCALIZED_RESOURCES_FOLDER_PATH" : "$(UNLOCALIZED_RESOURCES_FOLDER_PATH)\/$(DEVELOPMENT_LANGUAGE).lproj",
+ "PLUGINS_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)",
+ "PUBLIC_HEADERS_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)",
+ "SHARED_SUPPORT_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)",
+ "SHARED_FRAMEWORKS_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)",
+ "PRIVATE_HEADERS_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)",
+ "SCRIPTS_FOLDER_PATH" : "$(UNLOCALIZED_RESOURCES_FOLDER_PATH)",
+ "FRAMEWORKS_FOLDER_PATH" : "$(CONTENTS_FOLDER_PATH)"
+ },
+ "Type" : "PackageType",
+ "BasedOn" : "com.apple.package-type.wrapper",
+ "Name" : "In-App Purchase Content",
+ "Identifier" : "com.apple.package-type.in-app-purchase-content",
+ "Description" : "In-App Purchase Content"
+ },
+ {
+ "ProductReference" : {
+ "FileType" : "wrapper.xpc-service",
+ "Name" : "$(WRAPPER_NAME)",
+ "IsLaunchable" : "NO"
+ },
+ "DefaultBuildSettings" : {
+ "WRAPPER_SUFFIX" : ".xpc"
+ },
+ "Type" : "PackageType",
+ "BasedOn" : "com.apple.package-type.wrapper",
+ "Name" : "XPC Service",
+ "Identifier" : "com.apple.package-type.xpc-service",
+ "Description" : "XPC Service"
+ },
+ {
+ "ProductReference" : {
+ "FileType" : "wrapper.app-extension",
+ "Name" : "$(WRAPPER_NAME)",
+ "IsLaunchable" : "NO"
+ },
+ "DefaultBuildSettings" : {
+ "WRAPPER_SUFFIX" : ".pluginkit"
+ },
+ "Type" : "PackageType",
+ "BasedOn" : "com.apple.package-type.xpc-service",
+ "Name" : "PlugInKit PlugIn",
+ "Identifier" : "com.apple.package-type.pluginkit-plugin",
+ "Description" : "PlugInKit PlugIn"
+ },
+ {
+ "ProductReference" : {
+ "FileType" : "wrapper.app-extension",
+ "Name" : "$(WRAPPER_NAME)",
+ "IsLaunchable" : "NO"
+ },
+ "DefaultBuildSettings" : {
+ "WRAPPER_SUFFIX" : ".appex"
+ },
+ "Type" : "PackageType",
+ "BasedOn" : "com.apple.package-type.pluginkit-plugin",
+ "Name" : "App Extension",
+ "Identifier" : "com.apple.package-type.app-extension",
+ "Description" : "App Extension"
+ },
+ {
+ "ProductReference" : {
+ "FileType" : "wrapper.spotlight-importer",
+ "Name" : "$(WRAPPER_NAME)",
+ "IsLaunchable" : "NO"
+ },
+ "DefaultBuildSettings" : {
+
+ },
+ "Type" : "PackageType",
+ "BasedOn" : "com.apple.package-type.wrapper",
+ "Name" : "Spotlight Importer",
+ "Identifier" : "com.apple.package-type.spotlight-importer",
+ "Description" : "Spotlight Importer"
+ },
+ {
+ "DefaultBuildSettings" : {
+ "EXECUTABLE_PATH" : "$(EXECUTABLE_NAME)",
+ "JAVA_MAKE_ZIPFILE" : "NO",
+ "JAVA_ARCHIVE_CLASSES" : "YES",
+ "EXECUTABLE_PREFIX" : "",
+ "EXECUTABLE_SUFFIX" : ".jar",
+ "EXECUTABLE_NAME" : "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_SUFFIX)"
+ },
+ "Identifier" : "com.apple.package-type.jarfile",
+ "Type" : "PackageType",
+ "Name" : "Jar File",
+ "Description" : "Jar file",
+ "ProductReference" : {
+ "FileType" : "archive.jar",
+ "Name" : "$(EXECUTABLE_NAME)",
+ "IsLaunchable" : "NO"
+ }
+ },
+ {
+ "DefaultBuildSettings" : {
+ "EXECUTABLE_PATH" : "$(EXECUTABLE_NAME)",
+ "JAVA_MAKE_ZIPFILE" : "YES",
+ "JAVA_ARCHIVE_CLASSES" : "YES",
+ "EXECUTABLE_PREFIX" : "",
+ "EXECUTABLE_SUFFIX" : ".zip",
+ "EXECUTABLE_NAME" : "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_SUFFIX)"
+ },
+ "Identifier" : "com.apple.package-type.zipfile",
+ "Type" : "PackageType",
+ "Name" : "Zip File",
+ "Description" : "Zip file",
+ "ProductReference" : {
+ "FileType" : "archive.zip",
+ "Name" : "$(EXECUTABLE_NAME)",
+ "IsLaunchable" : "NO"
+ }
+ },
+ {
+ "DefaultBuildSettings" : {
+ "EXECUTABLE_PATH" : "$(EXECUTABLE_NAME)",
+ "JAVA_ARCHIVE_CLASSES" : "NO",
+ "EXECUTABLE_PREFIX" : "",
+ "EXECUTABLE_SUFFIX" : "",
+ "EXECUTABLE_NAME" : "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_SUFFIX)"
+ },
+ "Identifier" : "com.apple.package-type.javaclassfolder",
+ "Type" : "PackageType",
+ "Name" : "Class Folder",
+ "Description" : "Class folder",
+ "ProductReference" : {
+ "FileType" : "wrapper.java-classfolder",
+ "Name" : "$(EXECUTABLE_NAME)",
+ "IsLaunchable" : "NO"
+ }
+ }
+]
diff --git a/share/qbs/modules/bundle/MacOSX-Product-Types.xcspec b/share/qbs/modules/bundle/MacOSX-Product-Types.xcspec
new file mode 100644
index 000000000..f7766be24
--- /dev/null
+++ b/share/qbs/modules/bundle/MacOSX-Product-Types.xcspec
@@ -0,0 +1,545 @@
+[
+ {
+ "IconNamePrefix" : "TargetExecutable",
+ "DefaultBuildProperties" : {
+ "REZ_EXECUTABLE" : "YES",
+ "FULL_PRODUCT_NAME" : "$(EXECUTABLE_NAME)",
+ "LIBRARY_FLAG_NOSPACE" : "YES",
+ "INSTALL_PATH" : "\/usr\/local\/bin",
+ "GCC_INLINES_ARE_PRIVATE_EXTERN" : "YES",
+ "FRAMEWORK_FLAG_PREFIX" : "-framework",
+ "GCC_DYNAMIC_NO_PIC" : "NO",
+ "GCC_SYMBOLS_PRIVATE_EXTERN" : "YES",
+ "CODE_SIGNING_ALLOWED" : "YES",
+ "STRIP_STYLE" : "all",
+ "EXECUTABLE_PREFIX" : "",
+ "EXECUTABLE_SUFFIX" : "",
+ "LIBRARY_FLAG_PREFIX" : "-l"
+ },
+ "PackageTypes" : [
+ "com.apple.package-type.mach-o-executable"
+ ],
+ "Type" : "ProductType",
+ "DefaultTargetName" : "Command-line Tool",
+ "Name" : "Command-line Tool",
+ "Identifier" : "com.apple.product-type.tool",
+ "Description" : "Standalone command-line tool",
+ "Class" : "PBXToolProductType"
+ },
+ {
+ "IconNamePrefix" : "TargetExecutable",
+ "IsJava" : "YES",
+ "PackageTypes" : [
+ "com.apple.package-type.jarfile",
+ "com.apple.package-type.zipfile",
+ "com.apple.package-type.javaclassfolder"
+ ],
+ "Type" : "ProductType",
+ "DefaultTargetName" : "Java Command-line Tool",
+ "Name" : "Java Command-line Tool",
+ "Identifier" : "com.apple.product-type.tool.java",
+ "Description" : "Java Command-line tool",
+ "DefaultBuildProperties" : {
+ "REZ_EXECUTABLE" : "YES",
+ "INSTALL_PATH" : "\/usr\/local\/bin",
+ "FULL_PRODUCT_NAME" : "$(EXECUTABLE_NAME)"
+ }
+ },
+ {
+ "IconNamePrefix" : "TargetPlugin",
+ "DefaultBuildProperties" : {
+ "DEAD_CODE_STRIPPING" : "NO",
+ "REZ_EXECUTABLE" : "YES",
+ "LINK_WITH_STANDARD_LIBRARIES" : "NO",
+ "FULL_PRODUCT_NAME" : "$(EXECUTABLE_NAME)",
+ "LIBRARY_FLAG_NOSPACE" : "YES",
+ "FRAMEWORK_FLAG_PREFIX" : "-framework",
+ "INSTALL_PATH" : "$(HOME)\/Objects",
+ "SKIP_INSTALL" : "YES",
+ "GCC_INLINES_ARE_PRIVATE_EXTERN" : "YES",
+ "KEEP_PRIVATE_EXTERNS" : "YES",
+ "EXECUTABLE_EXTENSION" : "o",
+ "PUBLIC_HEADERS_FOLDER_PATH" : "\/usr\/local\/include",
+ "MACH_O_TYPE" : "mh_object",
+ "EXECUTABLE_SUFFIX" : ".$(EXECUTABLE_EXTENSION)",
+ "LIBRARY_FLAG_PREFIX" : "-l",
+ "PRIVATE_HEADERS_FOLDER_PATH" : "\/usr\/local\/include",
+ "STRIP_STYLE" : "debugging"
+ },
+ "PackageTypes" : [
+ "com.apple.package-type.mach-o-objfile"
+ ],
+ "Type" : "ProductType",
+ "DefaultTargetName" : "Object File",
+ "Name" : "Object File",
+ "Identifier" : "com.apple.product-type.objfile",
+ "Description" : "Object File",
+ "Class" : "XCStandaloneExecutableProductType"
+ },
+ {
+ "IconNamePrefix" : "TargetLibrary",
+ "DefaultBuildProperties" : {
+ "LIBRARY_FLAG_PREFIX" : "-l",
+ "STRIP_STYLE" : "debugging",
+ "REZ_EXECUTABLE" : "YES",
+ "FULL_PRODUCT_NAME" : "$(EXECUTABLE_NAME)",
+ "LD_DYLIB_INSTALL_NAME" : "$(DYLIB_INSTALL_NAME_BASE:standardizepath)\/$(EXECUTABLE_PATH)",
+ "DYLIB_COMPATIBILITY_VERSION" : "1",
+ "INSTALL_PATH" : "\/usr\/local\/lib",
+ "FRAMEWORK_FLAG_PREFIX" : "-framework",
+ "LIBRARY_FLAG_NOSPACE" : "YES",
+ "GCC_INLINES_ARE_PRIVATE_EXTERN" : "YES",
+ "CODE_SIGNING_ALLOWED" : "YES",
+ "EXECUTABLE_EXTENSION" : "dylib",
+ "PUBLIC_HEADERS_FOLDER_PATH" : "\/usr\/local\/include",
+ "DYLIB_INSTALL_NAME_BASE" : "$(INSTALL_PATH)",
+ "EXECUTABLE_SUFFIX" : ".$(EXECUTABLE_EXTENSION)",
+ "PRIVATE_HEADERS_FOLDER_PATH" : "\/usr\/local\/include",
+ "MACH_O_TYPE" : "mh_dylib",
+ "DYLIB_CURRENT_VERSION" : "1"
+ },
+ "PackageTypes" : [
+ "com.apple.package-type.mach-o-dylib"
+ ],
+ "Type" : "ProductType",
+ "DefaultTargetName" : "Dynamic Library",
+ "Name" : "Dynamic Library",
+ "Identifier" : "com.apple.product-type.library.dynamic",
+ "Description" : "Dynamic library",
+ "Class" : "PBXDynamicLibraryProductType"
+ },
+ {
+ "IconNamePrefix" : "TargetLibrary",
+ "DefaultBuildProperties" : {
+ "STRIP_STYLE" : "debugging",
+ "REZ_EXECUTABLE" : "YES",
+ "FULL_PRODUCT_NAME" : "$(EXECUTABLE_NAME)",
+ "LIBRARY_FLAG_NOSPACE" : "YES",
+ "FRAMEWORK_FLAG_PREFIX" : "-framework",
+ "INSTALL_PATH" : "\/usr\/local\/lib",
+ "SEPARATE_STRIP" : "YES",
+ "EXECUTABLE_EXTENSION" : "a",
+ "EXECUTABLE_PREFIX" : "lib",
+ "PUBLIC_HEADERS_FOLDER_PATH" : "\/usr\/local\/include",
+ "EXECUTABLE_SUFFIX" : ".$(EXECUTABLE_EXTENSION)",
+ "LIBRARY_FLAG_PREFIX" : "-l",
+ "PRIVATE_HEADERS_FOLDER_PATH" : "\/usr\/local\/include",
+ "MACH_O_TYPE" : "staticlib"
+ },
+ "AlwaysPerformSeparateStrip" : "YES",
+ "PackageTypes" : [
+ "com.apple.package-type.static-library"
+ ],
+ "Type" : "ProductType",
+ "DefaultTargetName" : "Static Library",
+ "Name" : "Static Library",
+ "Identifier" : "com.apple.product-type.library.static",
+ "Description" : "Static library",
+ "Class" : "PBXStaticLibraryProductType"
+ },
+ {
+ "IconNamePrefix" : "TargetPlugin",
+ "IsJava" : "YES",
+ "PackageTypes" : [
+ "com.apple.package-type.jarfile",
+ "com.apple.package-type.zipfile",
+ "com.apple.package-type.javaclassfolder"
+ ],
+ "Type" : "ProductType",
+ "DefaultTargetName" : "Java Library",
+ "Name" : "Java Library",
+ "Identifier" : "com.apple.product-type.library.java.archive",
+ "Description" : "Java library packaged as a Jar file, Zip file, or class folder",
+ "DefaultBuildProperties" : {
+ "INSTALL_PATH" : "\/usr\/local\/lib",
+ "FULL_PRODUCT_NAME" : "$(PRODUCT_NAME)"
+ }
+ },
+ {
+ "HasInfoPlistStrings" : "YES",
+ "Description" : "Generic bundle",
+ "HasInfoPlist" : "YES",
+ "Name" : "Bundle",
+ "Class" : "PBXBundleProductType",
+ "DefaultTargetName" : "Bundle",
+ "DefaultBuildProperties" : {
+ "LIBRARY_FLAG_NOSPACE" : "YES",
+ "WRAPPER_NAME" : "$(WRAPPER_PREFIX)$(PRODUCT_NAME)$(WRAPPER_SUFFIX)",
+ "FRAMEWORK_FLAG_PREFIX" : "-framework",
+ "GCC_INLINES_ARE_PRIVATE_EXTERN" : "YES",
+ "WRAPPER_SUFFIX" : ".$(WRAPPER_EXTENSION)",
+ "FULL_PRODUCT_NAME" : "$(WRAPPER_NAME)",
+ "WRAPPER_EXTENSION" : "bundle",
+ "CODE_SIGNING_ALLOWED" : "YES",
+ "WRAPPER_PREFIX" : "",
+ "STRIP_STYLE" : "non-global",
+ "MACH_O_TYPE" : "mh_bundle",
+ "LIBRARY_FLAG_PREFIX" : "-l"
+ },
+ "PackageTypes" : [
+ "com.apple.package-type.wrapper",
+ "com.apple.package-type.wrapper.shallow"
+ ],
+ "IsWrapper" : "YES",
+ "Type" : "ProductType",
+ "Identifier" : "com.apple.product-type.bundle",
+ "IconNamePrefix" : "TargetPlugin"
+ },
+ {
+ "PackageTypes" : [
+ "com.apple.package-type.wrapper.shallow"
+ ],
+ "Type" : "ProductType",
+ "BasedOn" : "com.apple.product-type.bundle",
+ "Name" : "Bundle (Shallow)",
+ "Identifier" : "com.apple.product-type.bundle.shallow",
+ "Description" : "Bundle (Shallow)",
+ "Class" : "PBXBundleProductType"
+ },
+ {
+ "Description" : "Application",
+ "Class" : "PBXApplicationProductType",
+ "Name" : "Application",
+ "RunpathSearchPathForEmbeddedFrameworks" : "@executable_path\/..\/Frameworks",
+ "CanEmbedAddressSanitizerLibraries" : "YES",
+ "ValidateEmbeddedBinaries" : "YES",
+ "DefaultTargetName" : "Application",
+ "DefaultBuildProperties" : {
+ "INSTALL_PATH" : "$(LOCAL_APPS_DIR)",
+ "WRAPPER_EXTENSION" : "app",
+ "GCC_DYNAMIC_NO_PIC" : "NO",
+ "STRIP_STYLE" : "all",
+ "CODE_SIGNING_ALLOWED" : "YES",
+ "GCC_INLINES_ARE_PRIVATE_EXTERN" : "YES",
+ "WRAPPER_SUFFIX" : ".$(WRAPPER_EXTENSION)",
+ "GCC_SYMBOLS_PRIVATE_EXTERN" : "YES",
+ "MACH_O_TYPE" : "mh_execute"
+ },
+ "BasedOn" : "com.apple.product-type.bundle",
+ "PackageTypes" : [
+ "com.apple.package-type.wrapper.application"
+ ],
+ "Type" : "ProductType",
+ "Identifier" : "com.apple.product-type.application",
+ "IconNamePrefix" : "TargetApp"
+ },
+ {
+ "PackageTypes" : [
+ "com.apple.package-type.wrapper.application.shallow"
+ ],
+ "Type" : "ProductType",
+ "BasedOn" : "com.apple.product-type.application",
+ "Name" : "Application (Shallow Bundle)",
+ "Identifier" : "com.apple.product-type.application.shallow",
+ "Description" : "Application (Shallow Bundle)",
+ "Class" : "PBXApplicationProductType"
+ },
+ {
+ "DefaultBuildProperties" : {
+ "PKGINFO_PATH" : "",
+ "INFOPLIST_PATH" : ""
+ },
+ "IsJava" : "YES",
+ "Type" : "ProductType",
+ "BasedOn" : "com.apple.product-type.application",
+ "Name" : "Java Application",
+ "Identifier" : "com.apple.product-type.application.java",
+ "Description" : "Java Application",
+ "DefaultTargetName" : "Java Application"
+ },
+ {
+ "IconNamePrefix" : "TargetFramework",
+ "DefaultTargetName" : "Framework",
+ "DefaultBuildProperties" : {
+ "WRAPPER_EXTENSION" : "framework",
+ "DYLIB_INSTALL_NAME_BASE" : "$(INSTALL_PATH)",
+ "STRIP_STYLE" : "debugging",
+ "FRAMEWORK_VERSION" : "A",
+ "CODE_SIGNING_ALLOWED" : "YES",
+ "LD_DYLIB_INSTALL_NAME" : "$(DYLIB_INSTALL_NAME_BASE:standardizepath)\/$(EXECUTABLE_PATH)",
+ "INSTALL_PATH" : "$(LOCAL_LIBRARY_DIR)\/Frameworks",
+ "WRAPPER_SUFFIX" : ".$(WRAPPER_EXTENSION)",
+ "MACH_O_TYPE" : "mh_dylib"
+ },
+ "PackageTypes" : [
+ "com.apple.package-type.wrapper.framework"
+ ],
+ "Type" : "ProductType",
+ "BasedOn" : "com.apple.product-type.bundle",
+ "Name" : "Framework",
+ "Identifier" : "com.apple.product-type.framework",
+ "Description" : "Framework",
+ "Class" : "PBXFrameworkProductType"
+ },
+ {
+ "PackageTypes" : [
+ "com.apple.package-type.wrapper.framework.shallow"
+ ],
+ "Type" : "ProductType",
+ "BasedOn" : "com.apple.product-type.framework",
+ "Name" : "Framework (Shallow Bundle)",
+ "Identifier" : "com.apple.product-type.framework.shallow",
+ "Description" : "Framework (Shallow Bundle)",
+ "Class" : "PBXFrameworkProductType"
+ },
+ {
+ "IconNamePrefix" : "TargetFramework",
+ "DefaultTargetName" : "Static Framework",
+ "DefaultBuildProperties" : {
+ "SEPARATE_STRIP" : "YES",
+ "WRAPPER_EXTENSION" : "framework",
+ "DYLIB_INSTALL_NAME_BASE" : "",
+ "CODE_SIGNING_ALLOWED" : "NO",
+ "FRAMEWORK_VERSION" : "A",
+ "LD_DYLIB_INSTALL_NAME" : "",
+ "GCC_INLINES_ARE_PRIVATE_EXTERN" : "NO",
+ "INSTALL_PATH" : "$(LOCAL_LIBRARY_DIR)\/Frameworks",
+ "WRAPPER_SUFFIX" : ".$(WRAPPER_EXTENSION)",
+ "MACH_O_TYPE" : "staticlib"
+ },
+ "AlwaysPerformSeparateStrip" : "YES",
+ "PackageTypes" : [
+ "com.apple.package-type.wrapper.framework.static"
+ ],
+ "Type" : "ProductType",
+ "BasedOn" : "com.apple.product-type.framework",
+ "Name" : "Static Framework",
+ "Identifier" : "com.apple.product-type.framework.static",
+ "Description" : "Static Framework",
+ "Class" : "XCStaticFrameworkProductType"
+ },
+ {
+ "DefaultTargetName" : "Kernel Extension",
+ "DefaultBuildProperties" : {
+ "GCC_ENABLE_BUILTIN_FUNCTIONS" : "NO",
+ "MODULE_START" : "0",
+ "PRIVATE_HEADERS_FOLDER_PATH" : "$(KEXT_FRAMEWORK)\/Contents\/PrivateHeaders\/$(KEXT_FAMILY_NAME)",
+ "WRAPPER_SUFFIX" : ".$(WRAPPER_EXTENSION)",
+ "MACH_O_TYPE" : "mh_execute",
+ "GCC_ENABLE_KERNEL_DEVELOPMENT" : "YES",
+ "MODULE_STOP" : "0",
+ "GCC_ENABLE_FLOATING_POINT_LIBRARY_CALLS" : "YES",
+ "GCC_PRODUCT_TYPE_PREPROCESSOR_DEFINITIONS" : "$(inherited) KERNEL KERNEL_PRIVATE DRIVER_PRIVATE APPLE NeXT",
+ "GCC_DISABLE_STATIC_FUNCTION_INLINING" : "YES",
+ "ENABLE_APPLE_KEXT_CODE_GENERATION" : "YES",
+ "CODE_SIGNING_ALLOWED" : "YES",
+ "GCC_FORCE_CPU_SUBTYPE_ALL" : "YES",
+ "WRAPPER_EXTENSION" : "kext",
+ "KERNEL_EXTENSION_HEADER_SEARCH_PATHS" : "$(KERNEL_FRAMEWORK)\/PrivateHeaders $(KERNEL_FRAMEWORK_HEADERS)",
+ "GCC_INLINES_ARE_PRIVATE_EXTERN" : "NO",
+ "KEXT_FRAMEWORK_NAME" : "Kernel",
+ "GCC_NO_COMMON_BLOCKS" : "YES",
+ "GCC_ENABLE_PASCAL_STRINGS" : "NO",
+ "PUBLIC_HEADERS_FOLDER_PATH" : "$(KEXT_FRAMEWORK)\/Contents\/Headers\/$(KEXT_FAMILY_NAME)",
+ "GCC_ENABLE_FUNCTION_INLINING" : "YES",
+ "KERNEL_FRAMEWORK_HEADERS" : "$(KERNEL_FRAMEWORK)\/Headers",
+ "KEXT_FAMILY_NAME" : "family",
+ "KEXT_FRAMEWORK" : "$(SYSTEM_LIBRARY_DIR)\/Frameworks\/$(KEXT_FRAMEWORK_NAME).framework",
+ "GCC_ENABLE_CPP_EXCEPTIONS" : "NO",
+ "GCC_ENABLE_CPP_RTTI" : "NO",
+ "MODULE_NAME" : "com.company.driver.modulename",
+ "GCC_USE_STANDARD_INCLUDE_SEARCHING" : "NO",
+ "KERNEL_FRAMEWORK" : "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)\/Frameworks\/Kernel.framework",
+ "MODULE_VERSION" : "1.0",
+ "INSTALL_PATH" : "$(DEFAULT_KEXT_INSTALL_PATH)",
+ "PRODUCT_TYPE_HEADER_SEARCH_PATHS" : "$(inherited) $(KERNEL_EXTENSION_HEADER_SEARCH_PATHS)",
+ "GCC_CHECK_RETURN_VALUE_OF_OPERATOR_NEW" : "YES",
+ "STRIP_STYLE" : "debugging"
+ },
+ "PackageTypes" : [
+ "com.apple.package-type.wrapper.kernel-extension",
+ "com.apple.package-type.wrapper.kernel-extension.shallow"
+ ],
+ "Type" : "ProductType",
+ "BasedOn" : "com.apple.product-type.bundle",
+ "Name" : "Kernel Extension",
+ "Identifier" : "com.apple.product-type.kernel-extension",
+ "Description" : "Kernel extension",
+ "Class" : "XCKernelExtensionProductType"
+ },
+ {
+ "DefaultBuildProperties" : {
+
+ },
+ "PackageTypes" : [
+ "com.apple.package-type.wrapper.kernel-extension.shallow"
+ ],
+ "Type" : "ProductType",
+ "BasedOn" : "com.apple.product-type.kernel-extension",
+ "Name" : "Kernel Extension (Shallow)",
+ "Identifier" : "com.apple.product-type.kernel-extension.shallow",
+ "Description" : "Kernel extension (shallow)",
+ "Class" : "XCKernelExtensionProductType"
+ },
+ {
+ "DefaultTargetName" : "IOKit Kernel Extension",
+ "DefaultBuildProperties" : {
+ "CODE_SIGNING_ALLOWED" : "YES"
+ },
+ "PackageTypes" : [
+ "com.apple.package-type.wrapper.kernel-extension",
+ "com.apple.package-type.wrapper.kernel-extension.shallow"
+ ],
+ "Type" : "ProductType",
+ "BasedOn" : "com.apple.product-type.kernel-extension",
+ "Name" : "IOKit Kernel Extension",
+ "Identifier" : "com.apple.product-type.kernel-extension.iokit",
+ "Description" : "IOKit Kernel extension",
+ "Class" : "XCKernelExtensionProductType"
+ },
+ {
+ "DefaultTargetName" : "IOKit Kernel Extension (Shallow)",
+ "DefaultBuildProperties" : {
+
+ },
+ "PackageTypes" : [
+ "com.apple.package-type.wrapper.kernel-extension.shallow"
+ ],
+ "Type" : "ProductType",
+ "BasedOn" : "com.apple.product-type.kernel-extension",
+ "Name" : "IOKit Kernel Extension (Shallow)",
+ "Identifier" : "com.apple.product-type.kernel-extension.iokit.shallow",
+ "Description" : "IOKit Kernel extension (Shallow)",
+ "Class" : "XCKernelExtensionProductType"
+ },
+ {
+ "DefaultBuildProperties" : {
+ "TEST_FRAMEWORK_SEARCH_PATHS" : [
+ "$(inherited)",
+ "$(PLATFORM_DIR)\/Developer\/Library\/Frameworks"
+ ],
+ "PRODUCT_SPECIFIC_LDFLAGS" : "-framework XCTest",
+ "WRAPPER_EXTENSION" : "xctest",
+ "PRODUCT_TYPE_FRAMEWORK_SEARCH_PATHS" : "$(TEST_FRAMEWORK_SEARCH_PATHS)"
+ },
+ "PackageTypes" : [
+ "com.apple.package-type.bundle.unit-test"
+ ],
+ "Type" : "ProductType",
+ "BasedOn" : "com.apple.product-type.bundle",
+ "Name" : "Unit Test Bundle",
+ "Identifier" : "com.apple.product-type.bundle.unit-test",
+ "Description" : "Unit Test Bundle",
+ "Class" : "PBXXCTestBundleProductType"
+ },
+ {
+ "DefaultBuildProperties" : {
+ "TEST_FRAMEWORK_SEARCH_PATHS" : [
+ "$(inherited)",
+ "$(PLATFORM_DIR)\/Developer\/Library\/Frameworks"
+ ],
+ "PRODUCT_SPECIFIC_LDFLAGS" : "-framework XCTest",
+ "WRAPPER_EXTENSION" : "xctest",
+ "USES_XCTRUNNER" : "YES",
+ "PRODUCT_TYPE_FRAMEWORK_SEARCH_PATHS" : "$(TEST_FRAMEWORK_SEARCH_PATHS)"
+ },
+ "PackageTypes" : [
+ "com.apple.package-type.bundle.unit-test"
+ ],
+ "Type" : "ProductType",
+ "BasedOn" : "com.apple.product-type.bundle.unit-test",
+ "Name" : "UI Testing Bundle",
+ "Identifier" : "com.apple.product-type.bundle.ui-testing",
+ "Description" : "UI Testing Bundle",
+ "Class" : "PBXXCTestBundleProductType"
+ },
+ {
+ "DefaultBuildProperties" : {
+ "WRAPPER_EXTENSION" : "octest"
+ },
+ "PackageTypes" : [
+ "com.apple.package-type.bundle.ocunit-test"
+ ],
+ "Type" : "ProductType",
+ "BasedOn" : "com.apple.product-type.bundle",
+ "Name" : "OCUnit Test Bundle",
+ "Identifier" : "com.apple.product-type.bundle.ocunit-test",
+ "Description" : "OCUnit Test Bundle",
+ "Class" : "PBXBundleProductType"
+ },
+ {
+ "HasInfoPlistStrings" : "NO",
+ "PackageTypes" : [
+ "com.apple.package-type.in-app-purchase-content"
+ ],
+ "HasInfoPlist" : "YES",
+ "IsWrapper" : "YES",
+ "Type" : "ProductType",
+ "DefaultBuildProperties" : {
+ "FULL_PRODUCT_NAME" : "$(WRAPPER_NAME)"
+ },
+ "Name" : "In-App Purchase Content",
+ "Identifier" : "com.apple.product-type.in-app-purchase-content",
+ "Description" : "In-App Purchase Content",
+ "Class" : "PBXBundleProductType"
+ },
+ {
+ "IconNamePrefix" : "XPCService",
+ "DefaultTargetName" : "XPC Service",
+ "CanEmbedAddressSanitizerLibraries" : "YES",
+ "DefaultBuildProperties" : {
+ "MACH_O_TYPE" : "mh_execute",
+ "WRAPPER_EXTENSION" : "xpc"
+ },
+ "PackageTypes" : [
+ "com.apple.package-type.xpc-service"
+ ],
+ "Type" : "ProductType",
+ "BasedOn" : "com.apple.product-type.bundle",
+ "Name" : "XPC Service",
+ "Identifier" : "com.apple.product-type.xpc-service",
+ "Description" : "XPC Service",
+ "Class" : "PBXBundleProductType"
+ },
+ {
+ "IconNamePrefix" : "XPCService",
+ "DefaultTargetName" : "PlugInKit PlugIn",
+ "DefaultBuildProperties" : {
+ "WRAPPER_EXTENSION" : "pluginkit",
+ "PRODUCT_SPECIFIC_LDFLAGS" : "$(SDKROOT)\/System\/Library\/PrivateFrameworks\/PlugInKit.framework\/PlugInKit"
+ },
+ "PackageTypes" : [
+ "com.apple.package-type.pluginkit-plugin"
+ ],
+ "Type" : "ProductType",
+ "BasedOn" : "com.apple.product-type.xpc-service",
+ "Name" : "PlugInKit PlugIn",
+ "Identifier" : "com.apple.product-type.pluginkit-plugin",
+ "Description" : "PlugInKit PlugIn",
+ "Class" : "PBXBundleProductType"
+ },
+ {
+ "IconNamePrefix" : "AppExtension",
+ "DefaultTargetName" : "App Extension",
+ "DefaultBuildProperties" : {
+ "APPLICATION_EXTENSION_API_ONLY" : "YES",
+ "PRODUCT_SPECIFIC_LDFLAGS" : "-e _NSExtensionMain",
+ "WRAPPER_EXTENSION" : "appex",
+ "CODE_SIGNING_ALLOWED" : "YES"
+ },
+ "PackageTypes" : [
+ "com.apple.package-type.app-extension"
+ ],
+ "Type" : "ProductType",
+ "BasedOn" : "com.apple.product-type.pluginkit-plugin",
+ "Name" : "App Extension",
+ "Identifier" : "com.apple.product-type.app-extension",
+ "Description" : "App Extension",
+ "Class" : "PBXBundleProductType"
+ },
+ {
+ "DefaultTargetName" : "Spotlight",
+ "DefaultBuildProperties" : {
+ "CODE_SIGNING_ALLOWED" : "YES"
+ },
+ "PackageTypes" : [
+ "com.apple.package-type.spotlight-importer"
+ ],
+ "Type" : "ProductType",
+ "BasedOn" : "com.apple.product-type.bundle",
+ "Name" : "Spotlight Importer",
+ "Identifier" : "com.apple.product-type.spotlight-importer",
+ "Description" : "Spotlight Importer",
+ "Class" : "PBXBundleProductType"
+ }
+]
diff --git a/share/qbs/modules/bundle/bundle.js b/share/qbs/modules/bundle/bundle.js
index 95425c90b..d6ab4b56a 100644
--- a/share/qbs/modules/bundle/bundle.js
+++ b/share/qbs/modules/bundle/bundle.js
@@ -29,7 +29,40 @@
****************************************************************************/
var DarwinTools = loadExtension("qbs.DarwinTools");
-var PropertyList = loadExtension("qbs.PropertyList");
+var Process = loadExtension("qbs.Process");
+
+// HACK: Workaround until the PropertyList extension is supported cross-platform
+var PropertyList2 = (function () {
+ function PropertyList2() {
+ }
+ PropertyList2.prototype.readFromFile = function (filePath) {
+ var str;
+ var process = new Process();
+ try {
+ if (process.exec("plutil", ["-convert", "json", "-o", "-", filePath], false) === 0) {
+ str = process.readStdOut();
+ } else {
+ var tf = new TextFile(filePath);
+ try {
+ str = tf.readAll();
+ } finally {
+ tf.close();
+ }
+ }
+ } finally {
+ process.close();
+ }
+
+ if (str)
+ this.obj = JSON.parse(str);
+ };
+ PropertyList2.prototype.toObject = function () {
+ return this.obj;
+ };
+ PropertyList2.prototype.clear = function () {
+ };
+ return PropertyList2;
+}());
// Order is significant due to productTypeIdentifier() search path
var _productTypeIdentifiers = {
@@ -52,16 +85,15 @@ function productTypeIdentifier(productType) {
}
var XcodeBuildSpecsReader = (function () {
- function XcodeBuildSpecsReader(developerPath, additionalSettings, useShallowBundles) {
+ function XcodeBuildSpecsReader(specsPath, separator, additionalSettings, useShallowBundles) {
this._additionalSettings = additionalSettings;
this._useShallowBundles = useShallowBundles;
var i;
- var plist = new PropertyList();
- var plist2 = new PropertyList();
+ var plist = new PropertyList2();
+ var plist2 = new PropertyList2();
try {
- developerPath += "/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications";
- plist.readFromFile(developerPath + "/MacOSX Package Types.xcspec");
- plist2.readFromFile(developerPath + "/MacOSX Product Types.xcspec");
+ plist.readFromFile(specsPath + ["/MacOSX", "Package", "Types.xcspec"].join(separator));
+ plist2.readFromFile(specsPath + ["/MacOSX", "Product", "Types.xcspec"].join(separator));
this._packageTypes = plist.toObject();
this._productTypes = plist2.toObject();
this._types = {};
diff --git a/share/qbs/modules/bundle/update-specs.sh b/share/qbs/modules/bundle/update-specs.sh
new file mode 100755
index 000000000..869fb011f
--- /dev/null
+++ b/share/qbs/modules/bundle/update-specs.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+# Update build specs from Xcode - this script should be run when new Xcode releases are made.
+specs_dir="$(xcrun --sdk macosx --show-sdk-platform-path)/Developer/Library/Xcode/Specifications"
+spec_files=("MacOSX Package Types.xcspec" "MacOSX Product Types.xcspec")
+for spec_file in "${spec_files[@]}" ; do
+ printf "%s\n" "$(plutil -convert json -r -o - "$specs_dir/$spec_file")" > "${spec_file// /-}"
+done
+xcode_version="$(/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' \
+ "$(xcode-select --print-path)/../Info.plist")"
+echo "Updated build specs from Xcode $xcode_version"
diff --git a/tests/auto/blackbox/testdata/bundle-structure/bundle-structure.qbs b/tests/auto/blackbox/testdata/bundle-structure/bundle-structure.qbs
index 46a2969e1..19586522c 100644
--- a/tests/auto/blackbox/testdata/bundle-structure/bundle-structure.qbs
+++ b/tests/auto/blackbox/testdata/bundle-structure/bundle-structure.qbs
@@ -10,11 +10,14 @@ Project {
"bundle.symlink.version", "bundle.hpp", "bundle.resource",
]
+ property stringList buildableProducts: ["A", "B", "C", "D", "E", "F", "G"]
+
Application {
Depends { name: "cpp" }
Depends { name: "B" }
Depends { name: "C" }
Depends { name: "D" }
+ condition: buildableProducts.contains("A")
name: "A"
bundle.isBundle: true
bundle.publicHeaders: ["dummy.h"]
@@ -28,8 +31,49 @@ Project {
}
}
+ Application {
+ Depends { name: "cpp" }
+ Depends { name: "B" }
+ Depends { name: "C" }
+ Depends { name: "D" }
+ condition: buildableProducts.contains("ABadApple")
+ name: "ABadApple"
+ bundle._productTypeIdentifier: "com.apple.product-type.will.never.exist.ever.guaranteed"
+ bundle.isBundle: true
+ bundle.publicHeaders: ["dummy.h"]
+ bundle.privateHeaders: ["dummy_p.h"]
+ bundle.resources: ["resource.txt"]
+ files: ["dummy.c"]
+ Group {
+ fileTagsFilter: product.type.concat(project.bundleFileTags)
+ qbs.install: true
+ qbs.installSourceBase: product.buildDirectory
+ }
+ }
+
+ Application {
+ Depends { name: "cpp" }
+ Depends { name: "B" }
+ Depends { name: "C" }
+ Depends { name: "D" }
+ condition: buildableProducts.contains("ABadThirdParty")
+ name: "ABadThirdParty"
+ bundle._productTypeIdentifier: "org.special.third.party.non.existent.product.type"
+ bundle.isBundle: true
+ bundle.publicHeaders: ["dummy.h"]
+ bundle.privateHeaders: ["dummy_p.h"]
+ bundle.resources: ["resource.txt"]
+ files: ["dummy.c"]
+ Group {
+ fileTagsFilter: product.type.concat(project.bundleFileTags)
+ qbs.install: true
+ qbs.installSourceBase: product.buildDirectory
+ }
+ }
+
DynamicLibrary {
Depends { name: "cpp" }
+ condition: buildableProducts.containsAny(["A", "B", "ABadApple", "ABadThirdParty"])
name: "B"
bundle.isBundle: true
bundle.publicHeaders: ["dummy.h"]
@@ -45,6 +89,7 @@ Project {
StaticLibrary {
Depends { name: "cpp" }
+ condition: buildableProducts.containsAny(["A", "C", "ABadApple", "ABadThirdParty"])
name: "C"
bundle.isBundle: true
bundle.publicHeaders: ["dummy.h"]
@@ -60,6 +105,7 @@ Project {
LoadableModule {
Depends { name: "cpp" }
+ condition: buildableProducts.containsAny(["A", "D", "ABadApple", "ABadThirdParty"])
name: "D"
bundle.isBundle: true
bundle.publicHeaders: ["dummy.h"]
@@ -75,6 +121,7 @@ Project {
ApplicationExtension {
Depends { name: "cpp" }
+ condition: buildableProducts.contains("E")
name: "E"
bundle.isBundle: true
bundle.publicHeaders: ["dummy.h"]
@@ -90,6 +137,7 @@ Project {
XPCService {
Depends { name: "cpp" }
+ condition: buildableProducts.contains("F")
name: "F"
bundle.isBundle: true
bundle.publicHeaders: ["dummy.h"]
@@ -105,6 +153,7 @@ Project {
Product {
Depends { name: "bundle" }
+ condition: buildableProducts.contains("G")
type: ["inapppurchase"]
name: "G"
bundle.isBundle: true
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 9bedc86b9..4a6fdd8b8 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -540,167 +540,238 @@ void TestBlackbox::bundleStructure()
if (!HostOsInfo::isOsxHost())
QSKIP("only applies on OS X");
+ QFETCH(QString, productName);
+ QFETCH(QString, productTypeIdentifier);
+ QFETCH(bool, isShallow);
+
QDir::setCurrent(testDataDir + "/bundle-structure");
QbsRunParameters params;
- QCOMPARE(runQbs(params), 0);
+ params.arguments << "project.buildableProducts:" + productName;
+ if (isShallow) {
+ // Coerce shallow bundles - don't set bundle.isShallow directly because we want to test the
+ // automatic detection
+ params.arguments
+ << "qbs.targetOS:ios,darwin,bsd,unix"
+ << "qbs.architecture:arm64";
+ }
+
+ if (productName == "ABadApple" || productName == "ABadThirdParty")
+ params.expectFailure = true;
- QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/Contents").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/Contents/Info.plist").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/Contents/MacOS").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/Contents/MacOS/A").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/Contents/PkgInfo").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/Contents/Resources").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/Contents/Resources/resource.txt").isRegularFile());
-
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/B").isFileSymLink());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Headers").isDirSymLink());
- //QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Modules").isDirSymLink());
- QVERIFY(!QFileInfo2(defaultInstallRoot + "/B.framework/PkgInfo").exists());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/PrivateHeaders").isDirSymLink());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Resources").isDirSymLink());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/B").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/Headers").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/Headers/dummy.h").isRegularFile());
- //QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/Modules").isRegularDir());
- //QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/Modules/module.modulemap").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/PrivateHeaders").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/PrivateHeaders/dummy_p.h").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/Resources").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/Resources/Info.plist").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/Current").isDirSymLink());
-
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/C").isFileSymLink());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Headers").isDirSymLink());
- //QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Modules").isDirSymLink());
- QVERIFY(!QFileInfo2(defaultInstallRoot + "/C.framework/PkgInfo").exists());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/PrivateHeaders").isDirSymLink());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Resources").isDirSymLink());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/C").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/Headers").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/Headers/dummy.h").isRegularFile());
- //QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/Modules").isRegularDir());
- //QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/Modules/module.modulemap").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/PrivateHeaders").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/PrivateHeaders/dummy_p.h").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/Resources").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/Resources/Info.plist").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/Current").isDirSymLink());
-
- QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Contents").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Contents/Info.plist").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Contents/MacOS").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Contents/MacOS/D").isRegularFile());
- QVERIFY(!QFileInfo2(defaultInstallRoot + "/D.bundle/Contents/PkgInfo").exists());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Contents/Resources").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Contents/Resources/resource.txt").isRegularFile());
-
- QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Contents").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Contents/Info.plist").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Contents/MacOS").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Contents/MacOS/E").isRegularFile());
- QVERIFY(!QFileInfo2(defaultInstallRoot + "/E.appex/Contents/PkgInfo").exists());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Contents/Resources").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Contents/Resources/resource.txt").isRegularFile());
-
- QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Contents").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Contents/Info.plist").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Contents/MacOS").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Contents/MacOS/F").isRegularFile());
- QVERIFY(!QFileInfo2(defaultInstallRoot + "/F.xpc/Contents/PkgInfo").exists());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Contents/Resources").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Contents/Resources/resource.txt").isRegularFile());
-
- QVERIFY(QFileInfo2(defaultInstallRoot + "/G").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/G/ContentInfo.plist").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/G/Contents/resource.txt").isRegularFile());
-
- // Coerce shallow bundles - don't set bundle.isShallow directly because we want to test the
- // automatic detection
- params.arguments = QStringList()
- << "qbs.targetOS:ios,darwin,bsd,unix"
- << "qbs.architecture:arm64";
rmDirR(relativeBuildDir());
- QCOMPARE(runQbs(params), 0);
+ const int status = runQbs(params);
+ if (status != 0) {
+ QVERIFY2(m_qbsStderr.contains("Bundle product type "
+ + productTypeIdentifier.toLatin1()
+ + " is not supported."),
+ m_qbsStderr.constData());
+ return;
+ }
+
+ QCOMPARE(status, 0);
+
+ if (!isShallow) {
+ if (productName == "A") {
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/Contents").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/Contents/Info.plist").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/Contents/MacOS").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/Contents/MacOS/A").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/Contents/PkgInfo").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/Contents/Resources").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/Contents/Resources/resource.txt").isRegularFile());
+ }
+
+ if (productName == "B") {
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/B").isFileSymLink());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Headers").isDirSymLink());
+ //QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Modules").isDirSymLink());
+ QVERIFY(!QFileInfo2(defaultInstallRoot + "/B.framework/PkgInfo").exists());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/PrivateHeaders").isDirSymLink());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Resources").isDirSymLink());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/B").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/Headers").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/Headers/dummy.h").isRegularFile());
+ //QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/Modules").isRegularDir());
+ //QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/Modules/module.modulemap").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/PrivateHeaders").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/PrivateHeaders/dummy_p.h").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/Resources").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/A/Resources/Info.plist").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Versions/Current").isDirSymLink());
+ }
+
+ if (productName == "C") {
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/C").isFileSymLink());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Headers").isDirSymLink());
+ //QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Modules").isDirSymLink());
+ QVERIFY(!QFileInfo2(defaultInstallRoot + "/C.framework/PkgInfo").exists());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/PrivateHeaders").isDirSymLink());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Resources").isDirSymLink());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/C").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/Headers").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/Headers/dummy.h").isRegularFile());
+ //QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/Modules").isRegularDir());
+ //QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/Modules/module.modulemap").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/PrivateHeaders").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/PrivateHeaders/dummy_p.h").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/Resources").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/A/Resources/Info.plist").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Versions/Current").isDirSymLink());
+ }
+
+ if (productName == "D") {
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Contents").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Contents/Info.plist").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Contents/MacOS").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Contents/MacOS/D").isRegularFile());
+ QVERIFY(!QFileInfo2(defaultInstallRoot + "/D.bundle/Contents/PkgInfo").exists());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Contents/Resources").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Contents/Resources/resource.txt").isRegularFile());
+ }
+
+ if (productName == "E") {
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Contents").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Contents/Info.plist").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Contents/MacOS").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Contents/MacOS/E").isRegularFile());
+ QVERIFY(!QFileInfo2(defaultInstallRoot + "/E.appex/Contents/PkgInfo").exists());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Contents/Resources").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Contents/Resources/resource.txt").isRegularFile());
+ }
+
+ if (productName == "F") {
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Contents").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Contents/Info.plist").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Contents/MacOS").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Contents/MacOS/F").isRegularFile());
+ QVERIFY(!QFileInfo2(defaultInstallRoot + "/F.xpc/Contents/PkgInfo").exists());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Contents/Resources").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Contents/Resources/resource.txt").isRegularFile());
+ }
+
+ if (productName == "G") {
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/G").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/G/ContentInfo.plist").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/G/Contents/resource.txt").isRegularFile());
+ }
+ } else {
+ if (productName == "A") {
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/A").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/Info.plist").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/PkgInfo").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/resource.txt").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/ResourceRules.plist").isRegularFile());
+ }
+
+ if (productName == "B") {
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/B").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Headers").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Headers/dummy.h").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Info.plist").isRegularFile());
+ //QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Modules").isRegularDir());
+ //QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Modules/module.modulemap").isRegularFile());
+ QVERIFY(!QFileInfo2(defaultInstallRoot + "/B.framework/PkgInfo").exists());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/PrivateHeaders").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/PrivateHeaders/dummy_p.h").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/resource.txt").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/ResourceRules.plist").isRegularFile());
+ }
+
+ if (productName == "C") {
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/C").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Headers").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Headers/dummy.h").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Info.plist").isRegularFile());
+ //QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Modules").isRegularDir());
+ //QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Modules/module.modulemap").isRegularFile());
+ QVERIFY(!QFileInfo2(defaultInstallRoot + "/C.framework/PkgInfo").exists());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/PrivateHeaders").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/PrivateHeaders/dummy_p.h").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/resource.txt").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/ResourceRules.plist").isRegularFile());
+ }
+
+ if (productName == "D") {
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/D").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Headers").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Headers/dummy.h").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Info.plist").isRegularFile());
+ QVERIFY(!QFileInfo2(defaultInstallRoot + "/D.bundle/PkgInfo").exists());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/PrivateHeaders").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/PrivateHeaders/dummy_p.h").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/resource.txt").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/ResourceRules.plist").isRegularFile());
+ }
+
+ if (productName == "E") {
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/E").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Headers").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Headers/dummy.h").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Info.plist").isRegularFile());
+ QVERIFY(!QFileInfo2(defaultInstallRoot + "/E.appex/PkgInfo").exists());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/PrivateHeaders").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/PrivateHeaders/dummy_p.h").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/resource.txt").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/ResourceRules.plist").isRegularFile());
+ }
+
+ if (productName == "F") {
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/F").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Headers").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Headers/dummy.h").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Info.plist").isRegularFile());
+ QVERIFY(!QFileInfo2(defaultInstallRoot + "/F.xpc/PkgInfo").exists());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/PrivateHeaders").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/PrivateHeaders/dummy_p.h").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/resource.txt").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/ResourceRules.plist").isRegularFile());
+ }
+
+ if (productName == "G") {
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/G").isRegularDir());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/G/ContentInfo.plist").isRegularFile());
+ QVERIFY(QFileInfo2(defaultInstallRoot + "/G/Contents/resource.txt").isRegularFile());
+ }
+ }
+}
+
+void TestBlackbox::bundleStructure_data()
+{
+ QTest::addColumn<QString>("productName");
+ QTest::addColumn<QString>("productTypeIdentifier");
+ QTest::addColumn<bool>("isShallow");
+
+ const auto addRows = [](bool isShallow) {
+ const QString s = (isShallow ? " shallow" : "");
+ QTest::newRow(("A" + s).toLatin1()) << "A" << "com.apple.product-type.application" << isShallow;
+ QTest::newRow(("ABadApple" + s).toLatin1()) << "ABadApple" << "com.apple.product-type.will.never.exist.ever.guaranteed" << isShallow;
+ QTest::newRow(("ABadThirdParty" + s).toLatin1()) << "ABadThirdParty" << "org.special.third.party.non.existent.product.type" << isShallow;
+ QTest::newRow(("B" + s).toLatin1()) << "B" << "com.apple.product-type.framework" << isShallow;
+ QTest::newRow(("C" + s).toLatin1()) << "C" << "com.apple.product-type.framework.static" << isShallow;
+ QTest::newRow(("D" + s).toLatin1()) << "D" << "com.apple.product-type.bundle" << isShallow;
+ QTest::newRow(("E" + s).toLatin1()) << "E" << "com.apple.product-type.app-extension" << isShallow;
+ QTest::newRow(("F" + s).toLatin1()) << "F" << "com.apple.product-type.xpc-service" << isShallow;
+ QTest::newRow(("G" + s).toLatin1()) << "G" << "com.apple.product-type.in-app-purchase-content" << isShallow;
+ };
- QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/A").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/Info.plist").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/PkgInfo").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/resource.txt").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/A.app/ResourceRules.plist").isRegularFile());
-
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/B").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Headers").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Headers/dummy.h").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Info.plist").isRegularFile());
- //QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Modules").isRegularDir());
- //QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/Modules/module.modulemap").isRegularFile());
- QVERIFY(!QFileInfo2(defaultInstallRoot + "/B.framework/PkgInfo").exists());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/PrivateHeaders").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/PrivateHeaders/dummy_p.h").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/resource.txt").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/B.framework/ResourceRules.plist").isRegularFile());
-
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/C").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Headers").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Headers/dummy.h").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Info.plist").isRegularFile());
- //QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Modules").isRegularDir());
- //QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/Modules/module.modulemap").isRegularFile());
- QVERIFY(!QFileInfo2(defaultInstallRoot + "/C.framework/PkgInfo").exists());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/PrivateHeaders").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/PrivateHeaders/dummy_p.h").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/resource.txt").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/C.framework/ResourceRules.plist").isRegularFile());
-
- QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/D").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Headers").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Headers/dummy.h").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/Info.plist").isRegularFile());
- QVERIFY(!QFileInfo2(defaultInstallRoot + "/D.bundle/PkgInfo").exists());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/PrivateHeaders").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/PrivateHeaders/dummy_p.h").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/resource.txt").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/D.bundle/ResourceRules.plist").isRegularFile());
-
- QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/E").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Headers").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Headers/dummy.h").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/Info.plist").isRegularFile());
- QVERIFY(!QFileInfo2(defaultInstallRoot + "/E.appex/PkgInfo").exists());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/PrivateHeaders").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/PrivateHeaders/dummy_p.h").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/resource.txt").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/E.appex/ResourceRules.plist").isRegularFile());
-
- QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/F").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Headers").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Headers/dummy.h").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/Info.plist").isRegularFile());
- QVERIFY(!QFileInfo2(defaultInstallRoot + "/F.xpc/PkgInfo").exists());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/PrivateHeaders").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/PrivateHeaders/dummy_p.h").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/resource.txt").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/F.xpc/ResourceRules.plist").isRegularFile());
-
- QVERIFY(QFileInfo2(defaultInstallRoot + "/G").isRegularDir());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/G/ContentInfo.plist").isRegularFile());
- QVERIFY(QFileInfo2(defaultInstallRoot + "/G/Contents/resource.txt").isRegularFile());
+ addRows(true);
+ addRows(false);
}
void TestBlackbox::changedFiles_data()
diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h
index 825d7ad12..2a087fcbb 100644
--- a/tests/auto/blackbox/tst_blackbox.h
+++ b/tests/auto/blackbox/tst_blackbox.h
@@ -104,6 +104,7 @@ private slots:
void badInterpreter();
void buildDirectories();
void bundleStructure();
+ void bundleStructure_data();
void changedFiles_data();
void changedFiles();
void changeInDisabledProduct();