Index: pylib/gyp/xcodeproj_file.py |
diff --git a/pylib/gyp/xcodeproj_file.py b/pylib/gyp/xcodeproj_file.py |
index 13eaf3aa3d27481c3dc454742d01ae620abac3d2..50d3dc0e3203997125f58aace774d80cadf318c6 100644 |
--- a/pylib/gyp/xcodeproj_file.py |
+++ b/pylib/gyp/xcodeproj_file.py |
@@ -1946,22 +1946,28 @@ class PBXCopyFilesBuildPhase(XCBuildPhase): |
# path_tree_re matches "$(DIR)/path" or just "$(DIR)". Match group 1 is |
# "DIR", match group 3 is "path" or None. |
- path_tree_re = re.compile('^\\$\\((.*)\\)(/(.*)|)$') |
+ path_tree_re = re.compile('^\\$\\((.*?)\\)(/(.*)|)$') |
# path_tree_to_subfolder maps names of Xcode variables to the associated |
# dstSubfolderSpec property value used in a PBXCopyFilesBuildPhase object. |
path_tree_to_subfolder = { |
- 'BUILT_PRODUCTS_DIR': 16, # Products Directory |
- # Other types that can be chosen via the Xcode UI. |
- # TODO(mark): Map Xcode variable names to these. |
- # : 1, # Wrapper |
- # : 6, # Executables: 6 |
- # : 7, # Resources |
- # : 15, # Java Resources |
- # : 10, # Frameworks |
- # : 11, # Shared Frameworks |
- # : 12, # Shared Support |
- # : 13, # PlugIns |
+ # Types that can be chosen via the Xcode UI. |
+ 'BUILT_PRODUCTS_DIR': 16, # Products Directory |
Mark Mentovai
2014/08/13 17:56:43
Can you sort this list a little bit better?
|
+ 'WRAPPER_NAME': 1, # Wrapper |
+ # Although Xcode's friendly name is "Executables", the destination |
+ # is demonstrably the value of the build setting |
+ # EXECUTABLE_FOLDER_PATH not EXECUTABLES_FOLDER_PATH. |
+ 'EXECUTABLE_FOLDER_PATH': 6, # Executables. |
Mark Mentovai
2014/08/13 17:56:43
No period at the end of this comment.
|
+ 'UNLOCALIZED_RESOURCES_FOLDER_PATH': 7, # Resources |
+ 'JAVA_FOLDER_PATH': 15, # Java Resources |
+ 'FRAMEWORKS_FOLDER_PATH': 10, # Frameworks |
+ 'SHARED_FRAMEWORKS_FOLDER_PATH': 11, # Shared Frameworks |
+ 'SHARED_SUPPORT_FOLDER_PATH': 12, # Shared Support |
+ 'PLUGINS_FOLDER_PATH': 13, # PlugIns |
+ # For XPC Services, Xcode sets both dstPath and dstSubfolderSpec. |
+ # Note that it re-uses the BUILT_PRODUCTS_DIR value for |
+ # dstSubfolderSpec. dstPath is set below. |
+ 'XPCSERVICES_FOLDER_PATH': 16, # XPC Services. |
} |
def Name(self): |
@@ -1985,11 +1991,16 @@ class PBXCopyFilesBuildPhase(XCBuildPhase): |
# Everything else needs to be relative to an Xcode variable. |
path_tree = path_tree_match.group(1) |
relative_path = path_tree_match.group(3) |
+ separator = '/' |
Mark Mentovai
2014/08/13 17:56:43
I think that separator is '/' if match group 2 is
|
if path_tree in self.path_tree_to_subfolder: |
subfolder = self.path_tree_to_subfolder[path_tree] |
if relative_path is None: |
relative_path = '' |
+ separator = '' |
+ if path_tree == 'XPCSERVICES_FOLDER_PATH': |
+ relative_path = '$(CONTENTS_FOLDER_PATH)/XPCServices' \ |
+ + separator + relative_path |
else: |
# The path starts with an unrecognized Xcode variable |
# name like $(SRCROOT). Xcode will still handle this |