Add a build step to copy resources from WebKitAdditions as bundle resources in WebKit
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Jan 2018 05:36:38 +0000 (05:36 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Jan 2018 05:36:38 +0000 (05:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=182268
<rdar://problem/37003784>

Reviewed by Tim Horton and Dan Bernstein.

Adds a "Copy Additional Resources" phase when building WebKit. This phase copies resources from
usr/local/include/WebKitAdditions/WebKit/AdditionalResources in the build directory into the
unlocalized resources directory. If the AdditionalResources directory does not exist in the build
directory, we fall back to searching the SDK.

* WebKit.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227771 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/WebKit.xcodeproj/project.pbxproj

index e8be436..6ba71a8 100644 (file)
@@ -1,3 +1,18 @@
+2018-01-29  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        Add a build step to copy resources from WebKitAdditions as bundle resources in WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=182268
+        <rdar://problem/37003784>
+
+        Reviewed by Tim Horton and Dan Bernstein.
+
+        Adds a "Copy Additional Resources" phase when building WebKit. This phase copies resources from
+        usr/local/include/WebKitAdditions/WebKit/AdditionalResources in the build directory into the
+        unlocalized resources directory. If the AdditionalResources directory does not exist in the build
+        directory, we fall back to searching the SDK.
+
+        * WebKit.xcodeproj/project.pbxproj:
+
 2018-01-29  Youenn Fablet  <youenn@apple.com>
 
         ServiceWorkerClientFetch should not consider responses without Location headers as redirection responses
index 4960442..5ac4964 100644 (file)
                                BC8283F916B4FDDE00A278FE /* com.apple.WebKit.Plugin.32.xpc */,
                                BC82841F16B4FDF600A278FE /* com.apple.WebKit.Plugin.64.xpc */,
                                51F7DC4A180CC93600212CA3 /* com.apple.WebKit.Storage.xpc */,
+                               372EBB462017E64300085064 /* com.apple.WebKit.WebContent.Development.xpc */,
                                BC3DE46615A91763008D26FC /* com.apple.WebKit.WebContent.xpc */,
                                1AC25FB012A48EA700BD2671 /* PluginProcessShim.dylib */,
                                510031F61379CACB00C8DFE4 /* SecItemShim.dylib */,
                                8DC2EF5B0486A6940098B216 /* WebKit.framework */,
                                CDC3830617211799008A2FC3 /* WebProcessShim.dylib */,
-                               372EBB462017E64300085064 /* com.apple.WebKit.WebContent.Development.xpc */,
                        );
                        name = Products;
                        sourceTree = "<group>";
                                1A4F976E100E7B6600637A18 /* Version.xcconfig */,
                                7C0BB9A818DCDE890006C086 /* WebContent-iOS.entitlements */,
                                37B418EB1C9624F20031E63B /* WebContent-OSX.entitlements */,
-                               BCACC40E16B0B8A800B6E092 /* WebContentService.xcconfig */,
                                372EBB4A2017E76000085064 /* WebContentService.Development.xcconfig */,
+                               BCACC40E16B0B8A800B6E092 /* WebContentService.xcconfig */,
                                BCB86F4B116AAACD00CE20B7 /* WebKit.xcconfig */,
                                A1EDD2DD1884B9E300BBFE98 /* WebProcessShim.xcconfig */,
                        );
                                375A248817E5048E00C9A086 /* Postprocess WKBase.h */,
                                1AD98ECF191D867300CAA6DF /* Postprocess WKFoundation.h */,
                                1A1D2115191D96380001619F /* Postprocess Framework Headers */,
+                               2E16B6F42019BC25008996D6 /* Copy Additional Resources */,
                                8DC2EF520486A6940098B216 /* Resources */,
                                372589431C1E496800C92CA9 /* Copy Shims */,
                                7CB16FEE1724BA05007A0A95 /* Copy Plug-in Sandbox Profiles */,
                        shellPath = /bin/sh;
                        shellScript = "# Touch Info.plist to let Xcode know it needs to copy it into the built product\nif [[ \"${CONFIGURATION}\" != \"Production\" ]]; then\ntouch \"${PROJECT_DIR}/Info.plist\";\nfi;\n";
                };
+               2E16B6F42019BC25008996D6 /* Copy Additional Resources */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 12;
+                       files = (
+                       );
+                       name = "Copy Additional Resources";
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "set -e\n\nRELATIVE_SOURCE_PATH=\"usr/local/include/WebKitAdditions/WebKit/AdditionalResources\"\nSOURCE_PATH=\"$BUILT_PRODUCTS_DIR/$RELATIVE_SOURCE_PATH\"\n\nif [[ ! -d \"$SOURCE_PATH\" ]]; then\n    SOURCE_PATH=\"$SDK_DIR/$RELATIVE_SOURCE_PATH\"\nfi\n\nif [[ -d \"$SOURCE_PATH\" ]]; then\n    ditto $SOURCE_PATH \"$BUILT_PRODUCTS_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH\"\nfi";
+               };
                3713F0231429063D0036387F /* Check For Inappropriate Objective-C Class Names */ = {
                        isa = PBXShellScriptBuildPhase;
                        buildActionMask = 2147483647;