OLD | NEW |
| (Empty) |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 # This file contains resources for the main Mac chromium bundle. | |
6 { | |
7 # The main browser executable's name is <(mac_product_name). | |
8 # Certain things will get confused if two modules in the | |
9 # executable share the same name, so append " Framework" to the | |
10 # product_name used for the framework. This will result in | |
11 # a name like "Chromium Framework.framework". | |
12 'product_name': '<(mac_product_name) Framework', | |
13 'mac_bundle': 1, | |
14 'xcode_settings': { | |
15 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)', | |
16 | |
17 # The dylib versions are of the form a[.b[.c]], where a is a | |
18 # 16-bit unsigned integer, and b and c are 8-bit unsigned | |
19 # integers. Any missing component is taken to be 0. The | |
20 # best mapping from product version numbers into this scheme | |
21 # is to just use a=BUILD, b=(PATCH/256), c=(PATCH%256). There | |
22 # is no ambiguity in this scheme because the build and patch | |
23 # numbers are guaranteed unique even across distinct major | |
24 # and minor version numbers. These settings correspond to | |
25 # -compatibility_version and -current_version. | |
26 'DYLIB_COMPATIBILITY_VERSION': '<(version_mac_dylib)', | |
27 'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)', | |
28 | |
29 # The framework is placed within the .app's versioned | |
30 # directory. DYLIB_INSTALL_NAME_BASE and | |
31 # LD_DYLIB_INSTALL_NAME affect -install_name. | |
32 'DYLIB_INSTALL_NAME_BASE': | |
33 '@executable_path/../Versions/<(version_full)', | |
34 # See /build/mac/copy_framework_unversioned.sh for | |
35 # information on LD_DYLIB_INSTALL_NAME. | |
36 'LD_DYLIB_INSTALL_NAME': | |
37 '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(WRAPPER_NAME)/$(PRODUCT_NA
ME)', | |
38 | |
39 'INFOPLIST_FILE': 'app/framework-Info.plist', | |
40 }, | |
41 'includes': [ | |
42 'chrome_nibs.gypi', | |
43 '../media/cdm_paths.gypi', | |
44 ], | |
45 # TODO(mark): Come up with a fancier way to do this. It should | |
46 # only be necessary to list framework-Info.plist once, not the | |
47 # three times it is listed here. | |
48 'mac_bundle_resources': [ | |
49 # This image is used to badge the lock icon in the | |
50 # authentication dialogs, such as those used for installation | |
51 # from disk image and Keystone promotion (if so enabled). It | |
52 # needs to exist as a file on disk and not just something in a | |
53 # resource bundle because that's the interface that | |
54 # Authorization Services uses. Also, Authorization Services | |
55 # can't deal with .icns files. | |
56 'app/theme/default_100_percent/<(theme_dir_name)/product_logo_32.png', | |
57 | |
58 'app/framework-Info.plist', | |
59 '<@(mac_all_xibs)', | |
60 'browser/mac/install.sh', | |
61 '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak', | |
62 '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak', | |
63 '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_
INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))', | |
64 # Note: pseudo_locales are generated via the packed_resources | |
65 # dependency but not copied to the final target. See | |
66 # common.gypi for more info. | |
67 ], | |
68 'mac_bundle_resources!': [ | |
69 'app/framework-Info.plist', | |
70 ], | |
71 'dependencies': [ | |
72 'app_mode_app', | |
73 # Bring in pdfsqueeze and run it on all pdfs | |
74 '../crypto/crypto.gyp:crypto', | |
75 # On Mac, Flash gets put into the framework, so we need this | |
76 # dependency here. flash_player.gyp will copy the Flash bundle | |
77 # into PRODUCT_DIR. | |
78 '../third_party/adobe/flash/flash_player.gyp:flapper_binaries', | |
79 '../third_party/crashpad/crashpad/handler/handler.gyp:crashpad_handler', | |
80 '../third_party/widevine/cdm/widevine_cdm.gyp:widevinecdmadapter', | |
81 'chrome_resources.gyp:packed_extra_resources', | |
82 'chrome_resources.gyp:packed_resources', | |
83 ], | |
84 'variables': { | |
85 'theme_dir_name': '<(branding_path_component)', | |
86 }, | |
87 'postbuilds': [ | |
88 { | |
89 # Modify the Info.plist as needed. The script explains why | |
90 # this is needed. This is also done in the chrome target. | |
91 # The framework needs the Breakpad keys if this feature is | |
92 # enabled. It does not need the Keystone keys; these always | |
93 # come from the outer application bundle. The framework | |
94 # doesn't currently use the SCM keys for anything, | |
95 # but this seems like a really good place to store them. | |
96 'postbuild_name': 'Tweak Info.plist', | |
97 'action': ['<(tweak_info_plist_path)', | |
98 '--plist=${TARGET_BUILD_DIR}/${INFOPLIST_PATH}', | |
99 '--breakpad=<(mac_breakpad_compiled_in)', | |
100 '--breakpad_uploads=<(mac_breakpad_uploads)', | |
101 '--keystone=0', | |
102 '--scm=1', | |
103 '--branding=<(branding)'], | |
104 }, | |
105 ], | |
106 'copies': [ | |
107 { | |
108 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Helpers', | |
109 'files': [ | |
110 '<(PRODUCT_DIR)/crashpad_handler', | |
111 ], | |
112 }, | |
113 { | |
114 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Internet Plug-Ins', | |
115 'files': [], | |
116 'conditions': [ | |
117 ['disable_nacl!=1', { | |
118 'files': [ | |
119 '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe', | |
120 ], | |
121 }], | |
122 ], | |
123 }, | |
124 { | |
125 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Internet Plug-Ins/P
epperFlash', | |
126 'files': [], | |
127 'conditions': [ | |
128 ['branding == "Chrome"', { | |
129 'files': [ | |
130 '<(PRODUCT_DIR)/PepperFlash/PepperFlashPlayer.plugin', | |
131 '<(PRODUCT_DIR)/PepperFlash/manifest.json', | |
132 ], | |
133 }], | |
134 ], | |
135 }, | |
136 { | |
137 # The adapter is not a complete library on its own. It needs the Widevine | |
138 # CDM to work. | |
139 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries/<(widevin
e_cdm_path)', | |
140 'files': [], | |
141 'conditions': [ | |
142 ['branding == "Chrome"', { | |
143 'files': [ | |
144 '<(PRODUCT_DIR)/<(widevine_cdm_path)/libwidevinecdm.dylib', | |
145 '<(PRODUCT_DIR)/<(widevine_cdm_path)/widevinecdmadapter.plugin', | |
146 ], | |
147 }], | |
148 ], | |
149 }, | |
150 { | |
151 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries/WidevineC
dm', | |
152 'files': [], | |
153 'conditions': [ | |
154 ['branding == "Chrome"', { | |
155 'files': [ | |
156 '<(PRODUCT_DIR)/WidevineCdm/manifest.json', | |
157 ], | |
158 }], | |
159 ], | |
160 }, | |
161 { | |
162 # Copy of resources used by tests. | |
163 'destination': '<(PRODUCT_DIR)/pseudo_locales', | |
164 'files': [ | |
165 '<(SHARED_INTERMEDIATE_DIR)/<(pseudo_locales).pak' | |
166 ], | |
167 }, | |
168 { | |
169 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources', | |
170 'files': [ | |
171 # Loader bundle for platform apps. | |
172 '<(PRODUCT_DIR)/app_mode_loader.app', | |
173 ], | |
174 }, | |
175 ], | |
176 'conditions': [ | |
177 ['branding=="Chrome"', { | |
178 'copies': [ | |
179 { | |
180 # This location is for the Mac build. Note that the | |
181 # copying of these files for Windows and Linux is handled | |
182 # in chrome.gyp, as Mac needs to be dropped inside the | |
183 # framework. | |
184 'destination': | |
185 '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Default Apps', | |
186 'files': ['<@(default_apps_list)'], | |
187 }, | |
188 ], | |
189 }], | |
190 ['mac_breakpad==1', { | |
191 'variables': { | |
192 # A real .dSYM is needed for dump_syms to operate on. | |
193 'mac_real_dsym': 1, | |
194 }, | |
195 }], | |
196 ['mac_keystone==1', { | |
197 'mac_bundle_resources': [ | |
198 'browser/mac/keystone_promote_preflight.sh', | |
199 'browser/mac/keystone_promote_postflight.sh', | |
200 ], | |
201 'postbuilds': [ | |
202 { | |
203 'postbuild_name': 'Copy KeystoneRegistration.framework', | |
204 'action': [ | |
205 '../build/mac/copy_framework_unversioned.sh', | |
206 '-I', | |
207 '../third_party/googlemac/Releases/Keystone/KeystoneRegistration.fra
mework', | |
208 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks', | |
209 ], | |
210 }, | |
211 { | |
212 'postbuild_name:': 'Lipo KeystoneRegistration.framework', | |
213 'variables': { | |
214 'KEYSTONE_FILE': | |
215 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks/KeystoneRe
gistration.framework/KeystoneRegistration', | |
216 }, | |
217 'action': [ | |
218 'tools/mac_helpers/lipo_thin_x86_64.sh', | |
219 '<(KEYSTONE_FILE)', | |
220 ], | |
221 }, | |
222 { | |
223 'postbuild_name': 'Symlink Frameworks', | |
224 'action': [ | |
225 'ln', | |
226 '-fns', | |
227 'Versions/Current/Frameworks', | |
228 '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Frameworks' | |
229 ], | |
230 }, | |
231 ], | |
232 }], # mac_keystone | |
233 ['debug_devtools==1', { | |
234 'postbuilds': [{ | |
235 'postbuild_name': 'Copy inspector files', | |
236 'action': [ | |
237 'ln', | |
238 '-fs', | |
239 '${BUILT_PRODUCTS_DIR}/resources/inspector', | |
240 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Resources', | |
241 ], | |
242 }], | |
243 }], | |
244 ['enable_hidpi==1', { | |
245 'mac_bundle_resources': [ | |
246 '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak', | |
247 ], | |
248 }], | |
249 ['icu_use_data_file_flag==1', { | |
250 'mac_bundle_resources': [ | |
251 '<(PRODUCT_DIR)/icudtl.dat', | |
252 ], | |
253 }], | |
254 ['v8_use_external_startup_data==1', { | |
255 'mac_bundle_resources': [ | |
256 '<(PRODUCT_DIR)/natives_blob.bin', | |
257 '<(PRODUCT_DIR)/snapshot_blob.bin', | |
258 ], | |
259 }], | |
260 ], # conditions | |
261 } | |
OLD | NEW |