diff options
author | Jake Petroules <jake.petroules@petroules.com> | 2013-11-28 13:47:40 -0500 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-12-02 17:35:55 +0100 |
commit | 671255d520428bccdf5fb0fa0af7a6cf57136c6a (patch) | |
tree | 16bb8e66a5bc0fa572279096debcee56987ffea1 | |
parent | 3b6b1b7fbc50bca101ad89a8acd80774bc668dde (diff) |
Support :rfc1034identifier in Info.plist processing.
Example projects have been updated to test it.
Task-number: QBS-465
Change-Id: I6e444512132293f7466e5f6372fdae12645c9db1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
5 files changed, 25 insertions, 19 deletions
diff --git a/examples/cocoa-application/CocoaApplication.qbs b/examples/cocoa-application/CocoaApplication.qbs index 99ee60d9d..025c207ad 100644 --- a/examples/cocoa-application/CocoaApplication.qbs +++ b/examples/cocoa-application/CocoaApplication.qbs @@ -42,7 +42,7 @@ CppApplication { Depends { condition: product.condition; name: "ib" } condition: qbs.targetOS.contains("osx") type: "applicationbundle" - name: "CocoaApplication" + name: "Cocoa Application" cpp.precompiledHeader: "CocoaApplication/CocoaApplication-Prefix.pch" diff --git a/examples/cocoa-application/CocoaApplication.xcodeproj/project.pbxproj b/examples/cocoa-application/CocoaApplication.xcodeproj/project.pbxproj index 6f2a6beda..a284a7768 100644 --- a/examples/cocoa-application/CocoaApplication.xcodeproj/project.pbxproj +++ b/examples/cocoa-application/CocoaApplication.xcodeproj/project.pbxproj @@ -16,7 +16,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 14ABF7A31717761200140DA2 /* CocoaApplication.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CocoaApplication.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 14ABF7A31717761200140DA2 /* Cocoa Application.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Cocoa Application.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 14ABF7A61717761200140DA2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 14ABF7A91717761200140DA2 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 14ABF7AA1717761200140DA2 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; @@ -55,7 +55,7 @@ 14ABF7A41717761200140DA2 /* Products */ = { isa = PBXGroup; children = ( - 14ABF7A31717761200140DA2 /* CocoaApplication.app */, + 14ABF7A31717761200140DA2 /* Cocoa Application.app */, ); name = Products; sourceTree = "<group>"; @@ -105,9 +105,9 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 14ABF7A21717761200140DA2 /* CocoaApplication */ = { + 14ABF7A21717761200140DA2 /* Cocoa Application */ = { isa = PBXNativeTarget; - buildConfigurationList = 14ABF7C01717761300140DA2 /* Build configuration list for PBXNativeTarget "CocoaApplication" */; + buildConfigurationList = 14ABF7C01717761300140DA2 /* Build configuration list for PBXNativeTarget "Cocoa Application" */; buildPhases = ( 14ABF79F1717761200140DA2 /* Sources */, 14ABF7A01717761200140DA2 /* Frameworks */, @@ -117,9 +117,9 @@ ); dependencies = ( ); - name = CocoaApplication; + name = "Cocoa Application"; productName = CocoaApplication; - productReference = 14ABF7A31717761200140DA2 /* CocoaApplication.app */; + productReference = 14ABF7A31717761200140DA2 /* Cocoa Application.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -143,7 +143,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 14ABF7A21717761200140DA2 /* CocoaApplication */, + 14ABF7A21717761200140DA2 /* Cocoa Application */, ); }; /* End PBXProject section */ @@ -294,13 +294,14 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 14ABF7C01717761300140DA2 /* Build configuration list for PBXNativeTarget "CocoaApplication" */ = { + 14ABF7C01717761300140DA2 /* Build configuration list for PBXNativeTarget "Cocoa Application" */ = { isa = XCConfigurationList; buildConfigurations = ( 14ABF7C11717761300140DA2 /* Debug */, 14ABF7C21717761300140DA2 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/examples/cocoa-touch-application/CocoaTouchApplication.qbs b/examples/cocoa-touch-application/CocoaTouchApplication.qbs index 66ca558fc..1e40cf905 100644 --- a/examples/cocoa-touch-application/CocoaTouchApplication.qbs +++ b/examples/cocoa-touch-application/CocoaTouchApplication.qbs @@ -42,7 +42,7 @@ CppApplication { Depends { condition: product.condition; name: "ib" } condition: qbs.targetOS.contains("ios") type: "applicationbundle" - name: "CocoaTouchApplication" + name: "Cocoa Touch Application" cpp.precompiledHeader: "CocoaTouchApplication/CocoaTouchApplication-Prefix.pch" diff --git a/examples/cocoa-touch-application/CocoaTouchApplication.xcodeproj/project.pbxproj b/examples/cocoa-touch-application/CocoaTouchApplication.xcodeproj/project.pbxproj index 56dc757a8..4dc8a6d4c 100644 --- a/examples/cocoa-touch-application/CocoaTouchApplication.xcodeproj/project.pbxproj +++ b/examples/cocoa-touch-application/CocoaTouchApplication.xcodeproj/project.pbxproj @@ -25,7 +25,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 14E3FEA6175FB2E800C857C6 /* CocoaTouchApplication.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CocoaTouchApplication.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 14E3FEA6175FB2E800C857C6 /* Cocoa Touch Application.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Cocoa Touch Application.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 14E3FEA9175FB2E800C857C6 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 14E3FEAB175FB2E800C857C6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 14E3FEAD175FB2E800C857C6 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; @@ -74,7 +74,7 @@ 14E3FEA7175FB2E800C857C6 /* Products */ = { isa = PBXGroup; children = ( - 14E3FEA6175FB2E800C857C6 /* CocoaTouchApplication.app */, + 14E3FEA6175FB2E800C857C6 /* Cocoa Touch Application.app */, ); name = Products; sourceTree = "<group>"; @@ -124,9 +124,9 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 14E3FEA5175FB2E800C857C6 /* CocoaTouchApplication */ = { + 14E3FEA5175FB2E800C857C6 /* Cocoa Touch Application */ = { isa = PBXNativeTarget; - buildConfigurationList = 14E3FED5175FB2E900C857C6 /* Build configuration list for PBXNativeTarget "CocoaTouchApplication" */; + buildConfigurationList = 14E3FED5175FB2E900C857C6 /* Build configuration list for PBXNativeTarget "Cocoa Touch Application" */; buildPhases = ( 14E3FEA2175FB2E800C857C6 /* Sources */, 14E3FEA3175FB2E800C857C6 /* Frameworks */, @@ -136,9 +136,9 @@ ); dependencies = ( ); - name = CocoaTouchApplication; + name = "Cocoa Touch Application"; productName = CocoaTouchApplication; - productReference = 14E3FEA6175FB2E800C857C6 /* CocoaTouchApplication.app */; + productReference = 14E3FEA6175FB2E800C857C6 /* Cocoa Touch Application.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -162,7 +162,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 14E3FEA5175FB2E800C857C6 /* CocoaTouchApplication */, + 14E3FEA5175FB2E800C857C6 /* Cocoa Touch Application */, ); }; /* End PBXProject section */ @@ -333,13 +333,14 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 14E3FED5175FB2E900C857C6 /* Build configuration list for PBXNativeTarget "CocoaTouchApplication" */ = { + 14E3FED5175FB2E900C857C6 /* Build configuration list for PBXNativeTarget "Cocoa Touch Application" */ = { isa = XCConfigurationList; buildConfigurations = ( 14E3FED6175FB2E900C857C6 /* Debug */, 14E3FED7175FB2E900C857C6 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/share/qbs/modules/cpp/darwin-tools.js b/share/qbs/modules/cpp/darwin-tools.js index fa05361f4..fe49351fc 100644 --- a/share/qbs/modules/cpp/darwin-tools.js +++ b/share/qbs/modules/cpp/darwin-tools.js @@ -62,7 +62,9 @@ function doRepl(obj, env, warn) var j = value.indexOf(brace === '(' ? ')' : '}', i + 2); if (j === -1) break; - var varName = value.slice(i + 2, j); + var varParts = value.slice(i + 2, j).split(':'); + var varName = varParts[0]; + var varFormatter = varParts[1]; var varValue = env[varName]; if (undefined === varValue) { // skip replacement @@ -71,6 +73,8 @@ function doRepl(obj, env, warn) } else { changes = true; varValue = String(varValue); + if (varFormatter === "rfc1034identifier") + varValue = rfc1034(varValue); value = value.slice(0, i) + varValue + value.slice(j + 1); // avoid recursive substitutions to avoid potentially infinite loops i += varValue.length; |