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

Side by Side Diff: chrome/chrome.gyp

Issue 164177: Provide a separate app bundle for subprocesses like the renderer on the Mac.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 { 5 {
6 'variables': { 6 'variables': {
7 'chromium_code': 1, 7 'chromium_code': 1,
8 # Define the common dependencies that contain all the actual 8 # Define the common dependencies that contain all the actual
9 # Chromium functionality. This list gets pulled in below by 9 # Chromium functionality. This list gets pulled in below by
10 # the link of the actual chrome (or chromium) executable on 10 # the link of the actual chrome (or chromium) executable on
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 # TODO(jcampan): move these vars to views.gyp. 58 # TODO(jcampan): move these vars to views.gyp.
59 'views_unit_tests_sources': [ 59 'views_unit_tests_sources': [
60 '../views/view_unittest.cc', 60 '../views/view_unittest.cc',
61 '../views/focus/focus_manager_unittest.cc', 61 '../views/focus/focus_manager_unittest.cc',
62 ], 62 ],
63 'views_unit_tests_sources_win_specific': [ 63 'views_unit_tests_sources_win_specific': [
64 # TODO(jcampan): make the following tests work on Linux. 64 # TODO(jcampan): make the following tests work on Linux.
65 '../views/controls/label_unittest.cc', 65 '../views/controls/label_unittest.cc',
66 '../views/controls/table/table_view_unittest.cc', 66 '../views/controls/table/table_view_unittest.cc',
67 '../views/grid_layout_unittest.cc', 67 '../views/grid_layout_unittest.cc',
68 ] 68 ],
69 'conditions': [
70 ['OS=="mac"', {
71 'conditions': [
72 ['branding=="Chrome"', {
73 'bundle_id': 'com.google.Chrome',
74 }, { # else: branding!="Chrome"
75 'bundle_id': 'org.chromium.Chromium',
76 }], # branding
77 ], # conditions
78 }], # OS=="mac"
79 ], # conditions
69 }, 80 },
70 'includes': [ 81 'includes': [
71 '../build/common.gypi', 82 '../build/common.gypi',
72 ], 83 ],
73 'target_defaults': { 84 'target_defaults': {
74 'sources/': [ 85 'sources/': [
75 ['exclude', '/(cocoa|gtk|win)/'], 86 ['exclude', '/(cocoa|gtk|win)/'],
76 ['exclude', '_(cocoa|gtk|linux|mac|posix|skia|win|views|x)(_unittest)?\\.( cc|mm?)$'], 87 ['exclude', '_(cocoa|gtk|linux|mac|posix|skia|win|views|x)(_unittest)?\\.( cc|mm?)$'],
77 ['exclude', '/(gtk|win|x11)_[^/]*\\.cc$'], 88 ['exclude', '/(gtk|win|x11)_[^/]*\\.cc$'],
78 ], 89 ],
(...skipping 2923 matching lines...) Expand 10 before | Expand all | Expand 10 after
3002 'dependencies': [ 3013 'dependencies': [
3003 '../views/views.gyp:views', 3014 '../views/views.gyp:views',
3004 ], 3015 ],
3005 }], 3016 }],
3006 ['OS=="mac"', { 3017 ['OS=="mac"', {
3007 # 'branding' is a variable defined in common.gypi 3018 # 'branding' is a variable defined in common.gypi
3008 # (e.g. "Chromium", "Chrome") 3019 # (e.g. "Chromium", "Chrome")
3009 'conditions': [ 3020 'conditions': [
3010 ['branding=="Chrome"', { 3021 ['branding=="Chrome"', {
3011 'mac_bundle_resources': ['app/theme/google_chrome/app.icns'], 3022 'mac_bundle_resources': ['app/theme/google_chrome/app.icns'],
3012 'variables': {
3013 'bundle_id': 'com.google.Chrome',
3014 },
3015 'copies': [ 3023 'copies': [
3016 { 3024 {
3017 'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Content s/MacOS/', 3025 'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Content s/MacOS/',
3018 'files': ['../third_party/ffmpeg/binaries/chrome/libavcodec.52 .dylib', 3026 'files': ['../third_party/ffmpeg/binaries/chrome/libavcodec.52 .dylib',
3019 '../third_party/ffmpeg/binaries/chrome/libavformat.5 2.dylib', 3027 '../third_party/ffmpeg/binaries/chrome/libavformat.5 2.dylib',
3020 '../third_party/ffmpeg/binaries/chrome/libavutil.50. dylib', 3028 '../third_party/ffmpeg/binaries/chrome/libavutil.50. dylib',
3021 '<(PRODUCT_DIR)/plugin_carbon_interpose.dylib'], 3029 '<(PRODUCT_DIR)/plugin_carbon_interpose.dylib'],
3022 }, 3030 },
3023 ], 3031 ],
3024 }, { # else: 'branding!="Chrome" 3032 }, { # else: 'branding!="Chrome"
3025 'mac_bundle_resources': ['app/theme/chromium/app.icns'], 3033 'mac_bundle_resources': ['app/theme/chromium/app.icns'],
3026 'variables': {
3027 'bundle_id': 'org.chromium.Chromium',
3028 },
3029 'copies': [ 3034 'copies': [
3030 { 3035 {
3031 'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Content s/MacOS/', 3036 'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Content s/MacOS/',
3032 'files': ['../third_party/ffmpeg/binaries/chromium/libavcodec. 52.dylib', 3037 'files': ['../third_party/ffmpeg/binaries/chromium/libavcodec. 52.dylib',
3033 '../third_party/ffmpeg/binaries/chromium/libavformat .52.dylib', 3038 '../third_party/ffmpeg/binaries/chromium/libavformat .52.dylib',
3034 '../third_party/ffmpeg/binaries/chromium/libavutil.5 0.dylib', 3039 '../third_party/ffmpeg/binaries/chromium/libavutil.5 0.dylib',
3035 '<(PRODUCT_DIR)/plugin_carbon_interpose.dylib'], 3040 '<(PRODUCT_DIR)/plugin_carbon_interpose.dylib'],
3036 }, 3041 },
3037 ], 3042 ],
3038 }], 3043 }],
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
3071 'product_name': '<(mac_product_name)', 3076 'product_name': '<(mac_product_name)',
3072 'xcode_settings': { 3077 'xcode_settings': {
3073 # chrome/app/app-Info.plist has: 3078 # chrome/app/app-Info.plist has:
3074 # CFBundleIdentifier of CHROMIUM_BUNDLE_ID 3079 # CFBundleIdentifier of CHROMIUM_BUNDLE_ID
3075 # CFBundleName of CHROMIUM_SHORT_NAME 3080 # CFBundleName of CHROMIUM_SHORT_NAME
3076 # Xcode then replaces these values with the branded values we set 3081 # Xcode then replaces these values with the branded values we set
3077 # as settings on the target. 3082 # as settings on the target.
3078 'CHROMIUM_BUNDLE_ID': '<(bundle_id)', 3083 'CHROMIUM_BUNDLE_ID': '<(bundle_id)',
3079 'CHROMIUM_SHORT_NAME': '<(branding)', 3084 'CHROMIUM_SHORT_NAME': '<(branding)',
3080 }, 3085 },
3081 # Bring in pdfsqueeze and run it on all pdfs 3086 'mac_bundle_resources': [
3087 '<(PRODUCT_DIR)/<(mac_product_name) Helper.app',
3088 ],
3082 'dependencies': [ 3089 'dependencies': [
3090 'helper_app',
3091 # Bring in pdfsqueeze and run it on all pdfs
3083 '../build/temp_gyp/pdfsqueeze.gyp:pdfsqueeze', 3092 '../build/temp_gyp/pdfsqueeze.gyp:pdfsqueeze',
3084 'interpose_dependency_shim', 3093 'interpose_dependency_shim',
3085 ], 3094 ],
3086 'rules': [ 3095 'rules': [
3087 { 3096 {
3088 'rule_name': 'pdfsqueeze', 3097 'rule_name': 'pdfsqueeze',
3089 'extension': 'pdf', 3098 'extension': 'pdf',
3090 'inputs': [ 3099 'inputs': [
3091 '<(PRODUCT_DIR)/pdfsqueeze', 3100 '<(PRODUCT_DIR)/pdfsqueeze',
3092 ], 3101 ],
3093 'outputs': [ 3102 'outputs': [
3094 '<(INTERMEDIATE_DIR)/pdfsqueeze/<(RULE_INPUT_ROOT).pdf', 3103 '<(INTERMEDIATE_DIR)/pdfsqueeze/<(RULE_INPUT_ROOT).pdf',
3095 ], 3104 ],
3096 'action': ['<(PRODUCT_DIR)/pdfsqueeze', '<(RULE_INPUT_PATH)', '<@( _outputs)'], 3105 'action': ['<(PRODUCT_DIR)/pdfsqueeze', '<(RULE_INPUT_PATH)', '<@( _outputs)'],
3097 'message': 'Running pdfsqueeze on <(RULE_INPUT_PATH)', 3106 'message': 'Running pdfsqueeze on <(RULE_INPUT_PATH)',
3098 }, 3107 },
3099 ], 3108 ],
3100 'copies': [ 3109 'copies': [
3101 { 3110 {
3102 'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Contents/Fr ameworks', 3111 'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Contents/Fr ameworks',
3103 'files': ['<(PRODUCT_DIR)/<(mac_product_name) Framework.framework' ], 3112 'files': ['<(PRODUCT_DIR)/<(mac_product_name) Framework.framework' ],
3104 }, 3113 },
3114 {
3115 # Copy web inspector resources to the Contents/Resources folder.
3116 'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Contents/Re sources',
3117 'files': ['<(PRODUCT_DIR)/resources/inspector/'],
3118 },
3119 ],
3120 'postbuilds': [
3121 {
3122 # Modify the Info.plist as needed. The script explains why this
3123 # is needed. This is also done in the helper_app target.
3124 'postbuild_name': 'Tweak Info.plist',
3125 'action': ['<(DEPTH)/build/mac/tweak_app_infoplist',
3126 '-b<(mac_breakpad)',
3127 '-k<(mac_keystone)',
3128 '-s1', # Include Subversion information
3129 '<(branding)'],
3130 },
3105 ], 3131 ],
3106 }, { # else: OS != "mac" 3132 }, { # else: OS != "mac"
3107 'conditions': [ 3133 'conditions': [
3108 ['branding=="Chrome"', { 3134 ['branding=="Chrome"', {
3109 'product_name': 'chrome' 3135 'product_name': 'chrome'
3110 }, { # else: Branding!="Chrome" 3136 }, { # else: Branding!="Chrome"
3111 # TODO: change to: 3137 # TODO: change to:
3112 # 'product_name': 'chromium' 3138 # 'product_name': 'chromium'
3113 # whenever we convert the rest of the infrastructure 3139 # whenever we convert the rest of the infrastructure
3114 # (buildbots etc.) to use "gyp -Dbranding=Chrome". 3140 # (buildbots etc.) to use "gyp -Dbranding=Chrome".
3115 # NOTE: chrome/app/theme/chromium/BRANDING and 3141 # NOTE: chrome/app/theme/chromium/BRANDING and
3116 # chrome/app/theme/google_chrome/BRANDING have the short names, 3142 # chrome/app/theme/google_chrome/BRANDING have the short names,
3117 # etc.; should we try to extract from there instead? 3143 # etc.; should we try to extract from there instead?
3118 'product_name': 'chrome' 3144 'product_name': 'chrome'
3119 }], 3145 }],
3120 ], 3146 ],
3121 }], 3147 }],
3122 ['OS=="mac"', {
3123 'actions': [
3124 {
3125 # Mac adds an action to modify the Info.plist to meet our needs
3126 # (see the script for why this is done).
3127 'action_name': 'tweak_app_infoplist',
3128 # We don't list any inputs or outputs because we always want
3129 # the script to run. Why? Because it does thinks like record
3130 # the svn revision into the info.plist, so there is no file to
3131 # depend on that will change when ever that changes.
3132 'inputs': [],
3133 'outputs': [],
3134 'action': ['<(DEPTH)/build/mac/tweak_app_infoplist',
3135 '-b<(mac_breakpad)',
3136 '-k<(mac_keystone)',
3137 '<(branding)'],
3138 },
3139 ],
3140 }],
3141 ['OS=="mac"', {
3142 # Copy web inspector resources to the Contents/Resources folder.
3143 'copies': [
3144 {
3145 'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Contents/Re sources',
3146 'files': ['<(PRODUCT_DIR)/resources/inspector/'],
3147 },
3148 ],
3149 }],
3150 ['OS=="linux"', { 3148 ['OS=="linux"', {
3151 'conditions': [ 3149 'conditions': [
3152 ['branding=="Chrome"', { 3150 ['branding=="Chrome"', {
3153 'dependencies': [ 3151 'dependencies': [
3154 'installer/installer.gyp:installer_util', 3152 'installer/installer.gyp:installer_util',
3155 ], 3153 ],
3156 }], 3154 }],
3157 ], 3155 ],
3158 }], 3156 }],
3159 ['OS=="mac" or OS=="win"', { 3157 ['OS=="mac" or OS=="win"', {
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after
4389 ], 4387 ],
4390 'dependencies': [ 4388 'dependencies': [
4391 '../build/util/support/support.gyp:*', 4389 '../build/util/support/support.gyp:*',
4392 ], 4390 ],
4393 4391
4394 # For now, don't put any resources into the framework. Exclude 4392 # For now, don't put any resources into the framework. Exclude
4395 # them all and push them into the bundle resources of the sole 4393 # them all and push them into the bundle resources of the sole
4396 # app bundle, the only dependent of this target. 4394 # app bundle, the only dependent of this target.
4397 # TODO(mark): Fix. 4395 # TODO(mark): Fix.
4398 'mac_bundle_resources/': [ 4396 'mac_bundle_resources/': [
4399 ['exclude', ''], 4397 ['exclude', '.*'],
4400 ], 4398 ],
4401 'direct_dependent_settings': { 4399 'direct_dependent_settings': {
4402 'mac_bundle_resources': [ 4400 'mac_bundle_resources': [
4403 '../third_party/WebKit/WebCore/Resources/aliasCursor.png', 4401 '../third_party/WebKit/WebCore/Resources/aliasCursor.png',
4404 '../third_party/WebKit/WebCore/Resources/cellCursor.png', 4402 '../third_party/WebKit/WebCore/Resources/cellCursor.png',
4405 '../third_party/WebKit/WebCore/Resources/contextMenuCursor.png ', 4403 '../third_party/WebKit/WebCore/Resources/contextMenuCursor.png ',
4406 '../third_party/WebKit/WebCore/Resources/copyCursor.png', 4404 '../third_party/WebKit/WebCore/Resources/copyCursor.png',
4407 '../third_party/WebKit/WebCore/Resources/crossHairCursor.png', 4405 '../third_party/WebKit/WebCore/Resources/crossHairCursor.png',
4408 '../third_party/WebKit/WebCore/Resources/eastResizeCursor.png' , 4406 '../third_party/WebKit/WebCore/Resources/eastResizeCursor.png' ,
4409 '../third_party/WebKit/WebCore/Resources/eastWestResizeCursor. png', 4407 '../third_party/WebKit/WebCore/Resources/eastWestResizeCursor. png',
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
4468 }, { 4466 }, {
4469 'variables': { 4467 'variables': {
4470 'linux_breakpad%': 0, 4468 'linux_breakpad%': 0,
4471 }, 4469 },
4472 }], 4470 }],
4473 ], 4471 ],
4474 }], 4472 }],
4475 ['OS=="mac"', 4473 ['OS=="mac"',
4476 { 'targets': [ 4474 { 'targets': [
4477 { 4475 {
4476 'target_name': 'helper_app',
4477 'type': 'executable',
4478 'product_name': '<(mac_product_name) Helper',
4479 'mac_bundle': 1,
4480 'dependencies': [
4481 'chrome_dll',
4482 ],
4483 'sources': [
4484 # chrome_exe_main.mm's main() is the entry point for the "chrome"
4485 # (browser app) target. All it does is jump to chrome_dll's
4486 # ChromeMain. This is appropriate for helper processes too,
4487 # because the logic to discriminate between process types at run
4488 # time is actually directed by the --type command line argument
4489 # processed by ChromeMain. Sharing chrome_exe_main.mm with the
4490 # browser app will suffice for now.
4491 'app/chrome_exe_main.mm',
4492 'app/helper-Info.plist',
4493 ],
4494 # TODO(mark): Come up with a fancier way to do this. It should only
4495 # be necessary to list app-Info.plist once, not the three times it is
4496 # listed here.
4497 'mac_bundle_resources!': [
4498 'app/helper-Info.plist',
4499 ],
4500 # TODO(mark): For now, don't put any resources into this app. Its
4501 # resources directory will be a symbolic link to the browser app's
4502 # resources directory.
4503 'mac_bundle_resources/': [
4504 ['exclude', '.*'],
4505 ],
4506 'xcode_settings': {
4507 'CHROMIUM_BUNDLE_ID': '<(bundle_id)',
4508 'CHROMIUM_SHORT_NAME': '<(branding)',
4509 'INFOPLIST_FILE': 'app/helper-Info.plist',
4510 },
4511 'postbuilds': [
4512 {
4513 'postbuild_name': 'Make Symbolic Links',
4514 'action': ['app/make_mac_app_symlinks'],
4515 },
4516 {
4517 # Modify the Info.plist as needed. The script explains why this
4518 # is needed. This is also done in the chrome target. In
4519 # this case, -k0 is always used because Keystone never runs
4520 # within the helper app. -s0 is used to avoid placing Subversion
4521 # data in the helper app's Info.plist. It will be present in
4522 # the main app's Info.plist, which is sufficient.
4523 'postbuild_name': 'Tweak Info.plist',
4524 'action': ['<(DEPTH)/build/mac/tweak_app_infoplist',
4525 '-b<(mac_breakpad)',
4526 '-k0',
4527 '-s0',
4528 '<(branding)'],
4529 },
4530 ],
4531 'conditions': [
4532 ['mac_breakpad==1', {
4533 'variables': {
4534 # A real .dSYM is needed for dump_syms to operate on.
4535 'mac_real_dsym': 1,
4536 },
4537 }],
4538 ],
4539 },
4540 {
4478 # Convenience target to build a disk image. 4541 # Convenience target to build a disk image.
4479 'target_name': 'build_app_dmg', 4542 'target_name': 'build_app_dmg',
4480 # Don't place this in the 'all' list; most won't want it. 4543 # Don't place this in the 'all' list; most won't want it.
4481 # In GYP, booleans are 0/1, not True/False. 4544 # In GYP, booleans are 0/1, not True/False.
4482 'suppress_wildcard': 1, 4545 'suppress_wildcard': 1,
4483 'type': 'none', 4546 'type': 'none',
4484 'dependencies': [ 4547 'dependencies': [
4485 'chrome', 4548 'chrome',
4486 ], 4549 ],
4487 'variables': { 4550 'variables': {
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
5397 # Use outputs of this action as inputs for the main target build. 5460 # Use outputs of this action as inputs for the main target build.
5398 # Seems as a misnomer but makes this happy on Linux (scons). 5461 # Seems as a misnomer but makes this happy on Linux (scons).
5399 'process_outputs_as_sources': 1, 5462 'process_outputs_as_sources': 1,
5400 }, 5463 },
5401 ], # 'actions' 5464 ], # 'actions'
5402 }, 5465 },
5403 ] 5466 ]
5404 }], 5467 }],
5405 ], # 'conditions' 5468 ], # 'conditions'
5406 } 5469 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698