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

Side by Side Diff: chrome/chrome_exe.gypi

Issue 501125: Revert 34983 - Split more targets from chrome.gyp to add support for building... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_dll.gypi ('k') | chrome/common/resource_dispatcher_dummy.cc » ('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 (c) 2009 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 'target_defaults': {
7 'variables': {
8 'chrome_exe_target': 0,
9 },
10 'target_conditions': [
11 ['chrome_exe_target==1', {
12 'sources': [
13 # .cc, .h, and .mm files under app that are used on all
14 # platforms, including both 32-bit and 64-bit Windows.
15 # Test files are not included.
16 'app/breakpad_win.cc',
17 'app/breakpad_win.h',
18 'app/chrome_exe_main.cc',
19 'app/chrome_exe_main.mm',
20 'app/chrome_exe_main_gtk.cc',
21 'app/chrome_exe_resource.h',
22 'app/client_util.cc',
23 'app/client_util.h',
24 'app/hard_error_handler_win.cc',
25 'app/hard_error_handler_win.h',
26 'app/scoped_ole_initializer.h',
27 ],
28 'mac_bundle_resources': [
29 'app/app-Info.plist',
30 ],
31 # TODO(mark): Come up with a fancier way to do this. It should only
32 # be necessary to list app-Info.plist once, not the three times it is
33 # listed here.
34 'mac_bundle_resources!': [
35 'app/app-Info.plist',
36 ],
37 'xcode_settings': {
38 'INFOPLIST_FILE': 'app/app-Info.plist',
39 },
40 'conditions': [
41 ['OS=="win"', {
42 'sources': [
43 'app/chrome_exe.rc',
44 'app/chrome_exe_version.rc.version',
45 ],
46 'include_dirs': [
47 '<(SHARED_INTERMEDIATE_DIR)/chrome',
48 ],
49 'msvs_settings': {
50 'VCLinkerTool': {
51 'DelayLoadDLLs': [
52 'dbghelp.dll',
53 'dwmapi.dll',
54 'uxtheme.dll',
55 'ole32.dll',
56 'oleaut32.dll',
57 ],
58 # Set /SUBSYSTEM:WINDOWS for chrome.exe itself.
59 'SubSystem': '2',
60 },
61 'VCManifestTool': {
62 'AdditionalManifestFiles': '$(ProjectDir)\\app\\chrome.exe.manif est',
63 },
64 },
65 'actions': [
66 {
67 'action_name': 'version',
68 'variables': {
69 'template_input_path': 'app/chrome_exe_version.rc.version',
70 },
71 'conditions': [
72 [ 'branding == "Chrome"', {
73 'variables': {
74 'branding_path': 'app/theme/google_chrome/BRANDING',
75 },
76 }, { # else branding!="Chrome"
77 'variables': {
78 'branding_path': 'app/theme/chromium/BRANDING',
79 },
80 }],
81 ],
82 'inputs': [
83 '<(template_input_path)',
84 '<(version_path)',
85 '<(branding_path)',
86 ],
87 'outputs': [
88 '<(SHARED_INTERMEDIATE_DIR)/chrome/chrome_exe_version.rc',
89 ],
90 'action': [
91 'python',
92 '<(version_py_path)',
93 '-f', '<(version_path)',
94 '-f', '<(branding_path)',
95 '<(template_input_path)',
96 '<@(_outputs)',
97 ],
98 'process_outputs_as_sources': 1,
99 'message': 'Generating version information in <(_outputs)'
100 },
101 {
102 'action_name': 'first_run',
103 'inputs': [
104 'app/FirstRun',
105 ],
106 'outputs': [
107 '<(PRODUCT_DIR)/First Run',
108 ],
109 'action': ['cp', '-f', '<@(_inputs)', '<@(_outputs)'],
110 'message': 'Copy first run complete sentinel file',
111 },
112 ],
113 }, { # 'OS!="win"
114 'sources!': [
115 'app/chrome_exe_main.cc',
116 'app/client_util.cc',
117 ]
118 }],
119 ],
120 }],
121 ],
122 },
123 'targets': [
124 {
125 'target_name': 'chrome',
126 'type': 'executable',
127 'mac_bundle': 1,
128 'msvs_guid': '7B219FAA-E360-43C8-B341-804A94EEFFAC',
129 'variables': {
130 'chrome_exe_target': 1,
131 },
132 'conditions': [
133 ['chrome_frame_define==1 and OS=="win"', {
134 # TODO(gregoryd): This could be shared with the 64-bit target, but
135 # it does not work due to a gyp issue.
136 'dependencies': [
137 '../chrome_frame/chrome_frame.gyp:npchrome_tab',
138 ],
139 }],
140 ['OS=="linux" or OS=="freebsd"', {
141 'actions': [
142 {
143 'action_name': 'manpage',
144 'conditions': [
145 [ 'branding == "Chrome"', {
146 'variables': {
147 'name': 'Google Chrome',
148 'filename': 'google-chrome',
149 'confdir': 'google-chrome',
150 },
151 }, { # else branding!="Chrome"
152 'variables': {
153 'name': 'Chromium',
154 'filename': 'chromium-browser',
155 'confdir': 'chromium',
156 },
157 }],
158 ],
159 'inputs': [
160 'tools/build/linux/sed.sh',
161 'app/resources/manpage.1.in',
162 ],
163 'outputs': [
164 '<(PRODUCT_DIR)/chrome.1',
165 ],
166 'action': [
167 'tools/build/linux/sed.sh',
168 'app/resources/manpage.1.in',
169 '<@(_outputs)',
170 '-e', 's/@@NAME@@/<(name)/',
171 '-e', 's/@@FILENAME@@/<(filename)/',
172 '-e', 's/@@CONFDIR@@/<(confdir)/',
173 ],
174 'message': 'Generating manpage'
175 },
176 ],
177 'conditions': [
178 [ 'linux_use_tcmalloc==1', {
179 'dependencies': [
180 '<(allocator_target)',
181 ],
182 },
183 ],
184 ],
185 'dependencies': [
186 # On Linux, link the dependencies (libraries) that make up actual
187 # Chromium functionality directly into the executable.
188 '<@(chromium_dependencies)',
189 # Needed for chrome_dll_main.cc #include of gtk/gtk.h
190 '../build/linux/system.gyp:gtk',
191 'packed_resources',
192 ],
193 'sources': [
194 'app/chrome_dll_main.cc',
195 'app/chrome_dll_resource.h',
196 ],
197 'copies': [
198 {
199 'destination': '<(PRODUCT_DIR)',
200 'files': ['tools/build/linux/chrome-wrapper',
201 '../third_party/xdg-utils/scripts/xdg-settings',
202 ],
203 # The wrapper script above may need to generate a .desktop file,
204 # which requires an icon. So, copy one next to the script.
205 'conditions': [
206 ['branding=="Chrome"', {
207 'files': ['app/theme/google_chrome/product_logo_48.png']
208 }, { # else: 'branding!="Chrome"
209 'files': ['app/theme/chromium/product_logo_48.png']
210 }],
211 ],
212 },
213 ],
214 }],
215 ['OS=="linux" and (toolkit_views==1 or chromeos==1)', {
216 'dependencies': [
217 '../views/views.gyp:views',
218 ],
219 }],
220 ['OS=="mac"', {
221 'variables': {
222 'mac_packaging_dir':
223 '<(PRODUCT_DIR)/<(mac_product_name) Packaging',
224 # <(PRODUCT_DIR) expands to $(BUILT_PRODUCTS_DIR), which doesn't
225 # work properly in a shell script, where ${BUILT_PRODUCTS_DIR} is
226 # needed.
227 'mac_packaging_sh_dir':
228 '${BUILT_PRODUCTS_DIR}/<(mac_product_name) Packaging',
229 },
230 # 'branding' is a variable defined in common.gypi
231 # (e.g. "Chromium", "Chrome")
232 'conditions': [
233 ['branding=="Chrome"', {
234 'mac_bundle_resources': [
235 'app/theme/google_chrome/app.icns',
236 'app/theme/google_chrome/document.icns',
237 ],
238 }, { # else: 'branding!="Chrome"
239 'mac_bundle_resources': [
240 'app/theme/chromium/app.icns',
241 'app/theme/chromium/document.icns',
242 ],
243 }],
244 ['mac_breakpad==1', {
245 'variables': {
246 # A real .dSYM is needed for dump_syms to operate on.
247 'mac_real_dsym': 1,
248 },
249 'dependencies': [
250 '../breakpad/breakpad.gyp:dump_syms',
251 '../breakpad/breakpad.gyp:symupload',
252 ],
253 # The "Dump Symbols" post-build step is in a target_conditions
254 # block so that it will follow the "Strip If Needed" step if that
255 # is also being used. There is no standard configuration where
256 # both of these steps occur together, but Mark likes to use this
257 # configuraiton sometimes when testing Breakpad-enabled builds
258 # without the time overhead of creating real .dSYM files. When
259 # both "Dump Symbols" and "Strip If Needed" are present, "Dump
260 # Symbols" must come second because "Strip If Needed" creates
261 # a fake .dSYM that dump_syms needs to fake dump. Since
262 # "Strip If Needed" is added in a target_conditions block in
263 # common.gypi, "Dump Symbols" needs to be in an (always true)
264 # target_conditions block.
265 'target_conditions': [
266 ['1 == 1', {
267 'postbuilds': [
268 {
269 'postbuild_name': 'Dump Symbols',
270 'variables': {
271 'dump_product_syms_path':
272 'tools/build/mac/dump_product_syms',
273 },
274 'action': ['<(dump_product_syms_path)',
275 '<(branding)'],
276 },
277 ],
278 }],
279 ],
280 }], # mac_breakpad
281 ['mac_keystone==1', {
282 'copies': [
283 {
284 # Put keystone_install.sh where the packaging system will
285 # find it. The packager will copy this script to the
286 # correct location on the disk image.
287 'destination': '<(mac_packaging_dir)',
288 'files': [
289 'tools/build/mac/keystone_install.sh',
290 ],
291 },
292 ],
293 }], # mac_keystone
294 ['buildtype=="Official"', {
295 'actions': [
296 {
297 # Create sign.sh, the script that the packaging system will
298 # use to sign the .app bundle.
299 'action_name': 'Make sign.sh',
300 'variables': {
301 'make_sign_sh_path': 'tools/build/mac/make_sign_sh',
302 'sign_sh_in_path': 'tools/build/mac/sign.sh.in',
303 'app_resource_rules_in_path':
304 'tools/build/mac/app_resource_rules.plist.in',
305 },
306 'inputs': [
307 '<(make_sign_sh_path)',
308 '<(sign_sh_in_path)',
309 '<(app_resource_rules_in_path)',
310 '<(version_path)',
311 ],
312 'outputs': [
313 '<(mac_packaging_dir)/sign.sh',
314 '<(mac_packaging_dir)/app_resource_rules.plist',
315 ],
316 'action': [
317 '<(make_sign_sh_path)',
318 '<(mac_packaging_sh_dir)',
319 '<(mac_product_name)',
320 '<(version_full)',
321 ],
322 },
323 ],
324 }], # buildtype=="Official"
325 ],
326 'product_name': '<(mac_product_name)',
327 'xcode_settings': {
328 # chrome/app/app-Info.plist has:
329 # CFBundleIdentifier of CHROMIUM_BUNDLE_ID
330 # CFBundleName of CHROMIUM_SHORT_NAME
331 # CFBundleSignature of CHROMIUM_CREATOR
332 # Xcode then replaces these values with the branded values we set
333 # as settings on the target.
334 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
335 'CHROMIUM_CREATOR': '<(mac_creator)',
336 'CHROMIUM_SHORT_NAME': '<(branding)',
337 },
338 'dependencies': [
339 'helper_app',
340 'infoplist_strings_tool',
341 # This library provides the real implementation for NaClSyscallSeg
342 '../native_client/src/trusted/service_runtime/arch/x86_32/service_ru ntime_x86_32.gyp:service_runtime_x86_32_chrome'
343 ],
344 'actions': [
345 {
346 # Generate the InfoPlist.strings file
347 'action_name': 'Generating InfoPlist.strings files',
348 'variables': {
349 'tool_path': '<(PRODUCT_DIR)/infoplist_strings_tool',
350 # Unique dir to write to so the [lang].lproj/InfoPlist.strings
351 # for the main app and the helper app don't name collide.
352 'output_path': '<(INTERMEDIATE_DIR)/app_infoplist_strings',
353 },
354 'conditions': [
355 [ 'branding == "Chrome"', {
356 'variables': {
357 'branding_name': 'google_chrome_strings',
358 },
359 }, { # else branding!="Chrome"
360 'variables': {
361 'branding_name': 'chromium_strings',
362 },
363 }],
364 ],
365 'inputs': [
366 '<(tool_path)',
367 '<(version_path)',
368 # TODO: remove this helper when we have loops in GYP
369 '>!@(<(apply_locales_cmd) \'<(grit_out_dir)/<(branding_name)_ZZL OCALE.pak\' <(locales))',
370 ],
371 'outputs': [
372 # TODO: remove this helper when we have loops in GYP
373 '>!@(<(apply_locales_cmd) -d \'<(output_path)/ZZLOCALE.lproj/Inf oPlist.strings\' <(locales))',
374 ],
375 'action': [
376 '<(tool_path)',
377 '-b', '<(branding_name)',
378 '-v', '<(version_path)',
379 '-g', '<(grit_out_dir)',
380 '-o', '<(output_path)',
381 '-t', 'main',
382 '<@(locales)',
383 ],
384 'message': 'Generating the language InfoPlist.strings files',
385 'process_outputs_as_mac_bundle_resources': 1,
386 },
387 ],
388 'copies': [
389 {
390 'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Contents/Ve rsions/<(version_full)',
391 'files': [
392 '<(PRODUCT_DIR)/<(mac_product_name) Helper.app',
393 ],
394 },
395 ],
396 'postbuilds': [
397 {
398 'postbuild_name': 'Copy <(mac_product_name) Framework.framework',
399 'action': [
400 'tools/build/mac/copy_framework_unversioned',
401 '${BUILT_PRODUCTS_DIR}/<(mac_product_name) Framework.framework',
402 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Versions/<(versio n_full)',
403 ],
404 },
405 {
406 # Modify the Info.plist as needed. The script explains why this
407 # is needed. This is also done in the helper_app and chrome_dll
408 # targets. Use -b0 and -k0 to not include any Breakpad or
409 # Keystone information; that all goes into the framework's
410 # Info.plist. Use -s1 to include Subversion information.
411 'postbuild_name': 'Tweak Info.plist',
412 'action': ['<(tweak_info_plist_path)',
413 '-b0',
414 '-k0',
415 '-s1',
416 '<(branding)',
417 '<(mac_bundle_id)'],
418 },
419 {
420 'postbuild_name': 'Clean up old versions',
421 'action': [
422 'tools/build/mac/clean_up_old_versions',
423 '<(version_full)'
424 ],
425 },
426 ], # postbuilds
427 }],
428 ['OS=="linux"', {
429 'conditions': [
430 ['branding=="Chrome"', {
431 'dependencies': [
432 'installer/installer.gyp:linux_installer_configs',
433 ],
434 }],
435 ['selinux==0', {
436 'dependencies': [
437 '../sandbox/sandbox.gyp:sandbox',
438 ],
439 }],
440 ['linux_sandbox_path != ""', {
441 'defines': [
442 'LINUX_SANDBOX_PATH="<(linux_sandbox_path)"',
443 ],
444 }],
445 ],
446 }],
447 ['OS != "mac"', {
448 'conditions': [
449 ['branding=="Chrome"', {
450 'product_name': 'chrome'
451 }, { # else: Branding!="Chrome"
452 # TODO: change to:
453 # 'product_name': 'chromium'
454 # whenever we convert the rest of the infrastructure
455 # (buildbots etc.) to use "gyp -Dbranding=Chrome".
456 # NOTE: chrome/app/theme/chromium/BRANDING and
457 # chrome/app/theme/google_chrome/BRANDING have the short names,
458 # etc.; should we try to extract from there instead?
459 'product_name': 'chrome'
460 }],
461 ],
462 }],
463 ['OS=="mac" or OS=="win"', {
464 'dependencies': [
465 # On Windows and Mac, make sure we've built chrome_dll, which
466 # contains all of the library code with Chromium functionality.
467 'chrome_dll',
468 ],
469 }],
470 ['OS=="win"', {
471 'dependencies': [
472 'installer/installer.gyp:installer_util',
473 'installer/installer.gyp:installer_util_strings',
474 '../breakpad/breakpad.gyp:breakpad_handler',
475 '../breakpad/breakpad.gyp:breakpad_sender',
476 '../sandbox/sandbox.gyp:sandbox',
477 'app/locales/locales.gyp:*',
478 ],
479 'msvs_settings': {
480 'VCLinkerTool': {
481 'ImportLibrary': '$(OutDir)\\lib\\chrome_exe.lib',
482 'ProgramDatabaseFile': '$(OutDir)\\chrome_exe.pdb',
483 },
484 },
485 }],
486 ],
487 },
488 ],
489 'conditions': [
490 ['OS=="win"', {
491 'targets': [
492 {
493 'target_name': 'chrome_nacl_win64',
494 'type': 'executable',
495 'product_name': 'nacl',
496 'msvs_guid': 'BB1AE956-038B-4092-96A2-951D2B418548',
497 'variables': {
498 'chrome_exe_target': 1,
499 },
500 'dependencies': [
501 # On Windows make sure we've built Win64 version of chrome_dll,
502 # which contains all of the library code with Chromium
503 # functionality.
504 'chrome_dll_nacl_win64',
505 'installer/installer.gyp:installer_util_nacl_win64',
506 'common_constants_win64',
507 '../breakpad/breakpad.gyp:breakpad_handler_win64',
508 '../breakpad/breakpad.gyp:breakpad_sender_win64',
509 '../base/base.gyp:base_nacl_win64',
510 # TODO(gregoryd): build sandbox for 64 bit
511 # '../sandbox/sandbox.gyp:sandbox',
512 ],
513 'defines': [
514 '<@(nacl_win64_defines)',
515 ],
516 'include_dirs': [
517 '<(SHARED_INTERMEDIATE_DIR)/chrome',
518 ],
519 'msvs_settings': {
520 'VCLinkerTool': {
521 'ImportLibrary': '$(OutDir)\\lib\\nacl_exe.lib',
522 'ProgramDatabaseFile': '$(OutDir)\\nacl_exe.pdb',
523 },
524 },
525 'conditions': [
526 ['chrome_frame_define==1 and OS=="win"', {
527 # TODO(gregoryd): This could be shared with the 32-bit target, but
528 # it does not work due to a gyp issue.
529 'dependencies': [
530 '../chrome_frame/chrome_frame.gyp:npchrome_tab',
531 ],
532 }],
533 ],
534 'configurations': {
535 'Common': {
536 'msvs_target_platform': 'x64',
537 },
538 },
539 },
540 ],
541 }],
542 ],
543 }
OLDNEW
« no previous file with comments | « chrome/chrome_dll.gypi ('k') | chrome/common/resource_dispatcher_dummy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698