Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: extensions/shell/app_shell.gyp

Issue 2302743003: Inline extensions .gypi files into GN build. (Closed)
Patch Set: ChromeOS Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « extensions/shell/app_shell.gni ('k') | extensions/shell/app_shell.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2014 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 {
6 'includes': [
7 'app_shell.gypi',
8 ],
9 'variables': {
10 # Product name is used for Mac bundle.
11 'app_shell_product_name': 'App Shell',
12 # The version is high enough to be supported by Omaha (at least 31)
13 # but fake enough to be obviously not a Chrome release.
14 'app_shell_version': '38.1234.5678.9',
15 'chromium_code': 1,
16 },
17 'targets': [
18 {
19 # GN version: //extensions/shell:app_shell_lib
20 'target_name': 'app_shell_lib',
21 'type': 'static_library',
22 'dependencies': [
23 'app_shell_version_header',
24 '<(DEPTH)/base/base.gyp:base',
25 '<(DEPTH)/components/components.gyp:devtools_discovery',
26 '<(DEPTH)/components/components.gyp:devtools_http_handler',
27 '<(DEPTH)/components/components.gyp:pref_registry',
28 '<(DEPTH)/components/components.gyp:update_client',
29 '<(DEPTH)/components/components.gyp:user_prefs',
30 '<(DEPTH)/components/components.gyp:web_cache_renderer',
31 '<(DEPTH)/components/prefs/prefs.gyp:prefs',
32 '<(DEPTH)/content/content.gyp:content',
33 '<(DEPTH)/content/content.gyp:content_browser',
34 '<(DEPTH)/content/content.gyp:content_gpu',
35 '<(DEPTH)/content/content.gyp:content_ppapi_plugin',
36 '<(DEPTH)/content/content_shell_and_tests.gyp:content_shell_lib',
37 '<(DEPTH)/device/core/core.gyp:device_core',
38 '<(DEPTH)/device/hid/hid.gyp:device_hid',
39 '<(DEPTH)/extensions/browser/api/api_registration.gyp:extensions_api_reg istration',
40 '<(DEPTH)/extensions/common/api/api.gyp:extensions_api',
41 '<(DEPTH)/extensions/extensions.gyp:extensions_browser',
42 '<(DEPTH)/extensions/extensions.gyp:extensions_common',
43 '<(DEPTH)/extensions/extensions.gyp:extensions_renderer',
44 '<(DEPTH)/extensions/extensions.gyp:extensions_shell_and_test_pak',
45 '<(DEPTH)/extensions/extensions.gyp:extensions_utility',
46 '<(DEPTH)/extensions/extensions_resources.gyp:extensions_resources',
47 '<(DEPTH)/extensions/shell/browser/api/api_registration.gyp:shell_api_re gistration',
48 '<(DEPTH)/extensions/shell/common/api/api.gyp:shell_api',
49 '<(DEPTH)/extensions/shell/common/api/api.gyp:extensions_features',
50 '<(DEPTH)/mojo/mojo_edk.gyp:mojo_system_impl',
51 '<(DEPTH)/skia/skia.gyp:skia',
52 '<(DEPTH)/third_party/WebKit/public/blink.gyp:blink',
53 '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld_2',
54 '<(DEPTH)/ui/base/ime/ui_base_ime.gyp:ui_base_ime',
55 '<(DEPTH)/ui/base/ui_base.gyp:ui_base',
56 '<(DEPTH)/v8/src/v8.gyp:v8',
57 ],
58 'export_dependent_settings': [
59 '<(DEPTH)/content/content.gyp:content_browser',
60 ],
61 'include_dirs': [
62 '../..',
63 '<(SHARED_INTERMEDIATE_DIR)',
64 '<(SHARED_INTERMEDIATE_DIR)/extensions/shell',
65 ],
66 'sources': [
67 '<@(app_shell_lib_sources)',
68 ],
69 'conditions': [
70 ['use_aura==1', {
71 'dependencies': [
72 '<(DEPTH)/ui/wm/wm.gyp:wm',
73 ],
74 'sources': [
75 '<@(app_shell_lib_sources_aura)',
76 ],
77 }],
78 ['chromeos==1', {
79 'dependencies': [
80 '<(DEPTH)/chromeos/chromeos.gyp:chromeos',
81 '<(DEPTH)/ui/chromeos/ui_chromeos.gyp:ui_chromeos',
82 '<(DEPTH)/ui/display/display.gyp:display',
83 ],
84 'sources': [
85 '<@(app_shell_lib_sources_chromeos)',
86 ],
87 }],
88 ['disable_nacl==0 and OS=="linux"', {
89 'dependencies': [
90 '<(DEPTH)/components/nacl.gyp:nacl_helper',
91 ],
92 }],
93 ['disable_nacl==0', {
94 'dependencies': [
95 '<(DEPTH)/components/nacl.gyp:nacl',
96 '<(DEPTH)/components/nacl.gyp:nacl_browser',
97 '<(DEPTH)/components/nacl.gyp:nacl_common',
98 '<(DEPTH)/components/nacl.gyp:nacl_renderer',
99 '<(DEPTH)/components/nacl.gyp:nacl_switches',
100 ],
101 'sources': [
102 '<@(app_shell_lib_sources_nacl)',
103 ],
104 }],
105 ],
106 },
107 {
108 # GN version: //extensions/shell:app_shell
109 'target_name': 'app_shell',
110 'type': 'executable',
111 'mac_bundle': 1,
112 'dependencies': [
113 'app_shell_lib',
114 '<(DEPTH)/extensions/extensions.gyp:extensions_shell_and_test_pak',
115 ],
116 'include_dirs': [
117 '../..',
118 ],
119 'sources': [
120 '<@(app_shell_sources)',
121 ],
122 'conditions': [
123 ['OS=="win"', {
124 'msvs_settings': {
125 'VCLinkerTool': {
126 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
127 },
128 },
129 'dependencies': [
130 '<(DEPTH)/sandbox/sandbox.gyp:sandbox',
131 ],
132 }],
133 ['OS=="mac"', {
134 'product_name': '<(app_shell_product_name)',
135 'dependencies!': [
136 'app_shell_lib',
137 ],
138 'dependencies': [
139 'app_shell_framework',
140 'app_shell_helper',
141 ],
142 'mac_bundle_resources': [
143 'app/app-Info.plist',
144 ],
145 # TODO(mark): Come up with a fancier way to do this. It should only
146 # be necessary to list app-Info.plist once, not the three times it is
147 # listed here.
148 'mac_bundle_resources!': [
149 'app/app-Info.plist',
150 ],
151 'xcode_settings': {
152 'INFOPLIST_FILE': 'app/app-Info.plist',
153 },
154 'copies': [{
155 'destination': '<(PRODUCT_DIR)/<(app_shell_product_name).app/Conte nts/Frameworks',
156 'files': [
157 '<(PRODUCT_DIR)/<(app_shell_product_name) Helper.app',
158 ],
159 }],
160 'postbuilds': [
161 {
162 'postbuild_name': 'Copy <(app_shell_product_name) Framework.framew ork',
163 'action': [
164 '../../build/mac/copy_framework_unversioned.sh',
165 '${BUILT_PRODUCTS_DIR}/<(app_shell_product_name) Framework.frame work',
166 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
167 ],
168 },
169 {
170 # Modify the Info.plist as needed.
171 'postbuild_name': 'Tweak Info.plist',
172 'action': ['../../build/mac/tweak_info_plist.py',
173 '--plist=${TARGET_BUILD_DIR}/${INFOPLIST_PATH}',
174 '--scm=1',
175 '--version=<(app_shell_version)'],
176 },
177 ],
178 }],
179 ],
180 },
181 {
182 'target_name': 'app_shell_unittests',
183 'type': 'executable',
184 'dependencies': [
185 'app_shell_lib',
186 '<(DEPTH)/base/base.gyp:base',
187 '<(DEPTH)/base/base.gyp:test_support_base',
188 '<(DEPTH)/content/content.gyp:content_app_both',
189 '<(DEPTH)/content/content_shell_and_tests.gyp:test_support_content',
190 '<(DEPTH)/extensions/extensions.gyp:extensions_shell_and_test_pak',
191 '<(DEPTH)/extensions/extensions.gyp:extensions_test_support',
192 '<(DEPTH)/testing/gtest.gyp:gtest',
193 ],
194 'sources': [
195 '<@(app_shell_unittests_sources)',
196 ],
197 'conditions': [
198 ['disable_nacl==0', {
199 'sources': [
200 '<@(app_shell_unittests_sources_nacl)',
201 ],
202 }],
203 ['use_aura==1', {
204 'sources': [
205 '<@(app_shell_unittests_sources_aura)',
206 ],
207 'dependencies': [
208 '<(DEPTH)/ui/aura/aura.gyp:aura_test_support',
209 ],
210 }],
211 ['chromeos==1', {
212 'dependencies': [
213 '<(DEPTH)/chromeos/chromeos.gyp:chromeos_test_support_without_gmock' ,
214 ],
215 'sources': [
216 '<@(app_shell_unittests_sources_chromeos)',
217 ],
218 }],
219 ],
220 },
221 {
222 'target_name': 'app_shell_version_header',
223 'type': 'none',
224 'direct_dependent_settings': {
225 'include_dirs': [
226 '<(SHARED_INTERMEDIATE_DIR)',
227 ],
228 },
229 'actions': [
230 {
231 'action_name': 'version_header',
232 'message': 'Generating version header file: <@(_outputs)',
233 'variables': {
234 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
235 },
236 'inputs': [
237 '<(version_path)',
238 '<(lastchange_path)',
239 'common/version.h.in',
240 ],
241 'outputs': [
242 '<(SHARED_INTERMEDIATE_DIR)/extensions/shell/common/version.h',
243 ],
244 'action': [
245 'python',
246 '<(version_py_path)',
247 '-f', '<(lastchange_path)',
248 '-f', '<(version_path)',
249 'common/version.h.in',
250 '<@(_outputs)',
251 ],
252 'includes': [
253 '../../build/util/version.gypi',
254 ],
255 },
256 ],
257 },
258 ], # targets
259
260 'conditions': [
261 ['OS=="mac"', {
262 'targets': [
263 {
264 # GN version: //extensions/shell:app_shell_framework
265 'target_name': 'app_shell_framework',
266 'type': 'shared_library',
267 'product_name': '<(app_shell_product_name) Framework',
268 'mac_bundle': 1,
269 'mac_bundle_resources': [
270 '<(PRODUCT_DIR)/extensions_shell_and_test.pak',
271 'app/framework-Info.plist',
272 ],
273 'mac_bundle_resources!': [
274 'app/framework-Info.plist',
275 ],
276 'xcode_settings': {
277 # The framework is placed within the .app's Framework
278 # directory. DYLIB_INSTALL_NAME_BASE and
279 # LD_DYLIB_INSTALL_NAME affect -install_name.
280 'DYLIB_INSTALL_NAME_BASE':
281 '@executable_path/../Frameworks',
282 # See /build/mac/copy_framework_unversioned.sh for
283 # information on LD_DYLIB_INSTALL_NAME.
284 'LD_DYLIB_INSTALL_NAME':
285 '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(WRAPPER_NAME)/$(PR ODUCT_NAME)',
286
287 'INFOPLIST_FILE': 'app/framework-Info.plist',
288 },
289 'dependencies': [
290 'app_shell_lib',
291 ],
292 'include_dirs': [
293 '../..',
294 ],
295 'sources': [
296 '<@(app_shell_sources_mac)',
297 ],
298 'postbuilds': [
299 {
300 # Modify the Info.plist as needed. The script explains why
301 # this is needed. This is also done in the chrome target.
302 # The framework needs the Breakpad keys if this feature is
303 # enabled. It does not need the Keystone keys; these always
304 # come from the outer application bundle. The framework
305 # doesn't currently use the SCM keys for anything,
306 # but this seems like a really good place to store them.
307 'postbuild_name': 'Tweak Info.plist',
308 'action': ['../../build/mac/tweak_info_plist.py',
309 '--plist=${TARGET_BUILD_DIR}/${INFOPLIST_PATH}',
310 '--breakpad=0',
311 '--keystone=0',
312 '--scm=1',
313 '--version=<(app_shell_version)',
314 '--branding=<(app_shell_product_name)'],
315 },
316 ],
317 'conditions': [
318 ['icu_use_data_file_flag==1', {
319 'mac_bundle_resources': [
320 '<(PRODUCT_DIR)/icudtl.dat',
321 ],
322 }],
323 ['v8_use_external_startup_data==1', {
324 'mac_bundle_resources': [
325 '<(PRODUCT_DIR)/natives_blob.bin',
326 '<(PRODUCT_DIR)/snapshot_blob.bin',
327 ],
328 }],
329 ],
330 }, # target app_shell_framework
331 {
332 'target_name': 'app_shell_helper',
333 'type': 'executable',
334 'variables': { 'enable_wexit_time_destructors': 1, },
335 'product_name': '<(app_shell_product_name) Helper',
336 'mac_bundle': 1,
337 'dependencies': [
338 'app_shell_framework',
339 ],
340 'sources': [
341 'app/shell_main.cc',
342 'app/helper-Info.plist',
343 ],
344 # TODO(mark): Come up with a fancier way to do this. It should only
345 # be necessary to list helper-Info.plist once, not the three times it
346 # is listed here.
347 'mac_bundle_resources!': [
348 'app/helper-Info.plist',
349 ],
350 # TODO(mark): For now, don't put any resources into this app. Its
351 # resources directory will be a symbolic link to the browser app's
352 # resources directory.
353 'mac_bundle_resources/': [
354 ['exclude', '.*'],
355 ],
356 'xcode_settings': {
357 'INFOPLIST_FILE': 'app/helper-Info.plist',
358 },
359 'postbuilds': [
360 {
361 # The framework defines its load-time path
362 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
363 # (chrome). A different relative path needs to be used in
364 # helper_app.
365 'postbuild_name': 'Fix Framework Link',
366 'action': [
367 'install_name_tool',
368 '-change',
369 '@executable_path/../Frameworks/<(app_shell_product_name) Framew ork.framework/<(app_shell_product_name) Framework',
370 '@executable_path/../../../<(app_shell_product_name) Framework.f ramework/<(app_shell_product_name) Framework',
371 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
372 ],
373 },
374 {
375 # Modify the Info.plist as needed. The script explains why this
376 # is needed. This is also done in the chrome and chrome_dll
377 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
378 # are used because Breakpad, Keystone, and SCM keys are
379 # never placed into the helper.
380 'postbuild_name': 'Tweak Info.plist',
381 'action': ['../../build/mac/tweak_info_plist.py',
382 '--plist=${TARGET_BUILD_DIR}/${INFOPLIST_PATH}',
383 '--breakpad=0',
384 '--keystone=0',
385 '--scm=0',
386 '--version=<(app_shell_version)'],
387 },
388 ],
389 }, # target app_shell_helper
390 ],
391 }], # OS=="mac"
392 ['test_isolation_mode != "noop"', {
393 'targets': [
394 {
395 'target_name': 'app_shell_unittests_run',
396 'type': 'none',
397 'dependencies': [
398 'app_shell_unittests',
399 ],
400 'includes': [
401 '../../build/isolate.gypi',
402 ],
403 'sources': [
404 'app_shell_unittests.isolate',
405 ],
406 },
407 ],
408 }],
409 ],
410 }
OLDNEW
« no previous file with comments | « extensions/shell/app_shell.gni ('k') | extensions/shell/app_shell.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698