 Chromium Code Reviews
 Chromium Code Reviews Issue 9513006:
  First pass at content shell for the Mac. Doesn't work yet.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 9513006:
  First pass at content shell for the Mac. Doesn't work yet.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| Index: content/content_shell.gypi | 
| diff --git a/content/content_shell.gypi b/content/content_shell.gypi | 
| index 72820bc7483464f866f4ecb815decc23f487132e..b5b1767dfcad983b7f382ca2b0dd0427eccb1657 100644 | 
| --- a/content/content_shell.gypi | 
| +++ b/content/content_shell.gypi | 
| @@ -3,6 +3,9 @@ | 
| # found in the LICENSE file. | 
| { | 
| + 'variables': { | 
| + 'content_shell_product_name': 'Content Shell', | 
| + }, | 
| 'targets': [ | 
| { | 
| 'target_name': 'content_shell_lib', | 
| @@ -114,7 +117,19 @@ | 
| }, | 
| }, | 
| }, | 
| - }], | 
| + }], # OS=="win" | 
| + ['OS=="mac"', { | 
| + 'type': 'shared_library', | 
| + 'product_name': '<(content_shell_product_name) Framework', | 
| 
Mark Mentovai
2012/02/28 20:12:40
No Info.plist?
 
Avi (use Gerrit)
2012/02/29 19:46:50
Do I need one?
 | 
| + 'mac_bundle': 1, | 
| + 'mac_bundle_resources': [ | 
| + 'shell/mac/English.lproj/MainMenu.xib', | 
| + '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak' | 
| + ], | 
| + 'xcode_settings': { | 
| + 'EXPORTED_SYMBOLS_FILE': 'shell/mac/exported_symbols.exp', | 
| 
Mark Mentovai
2012/02/28 20:12:40
That name’s kinda redundant, no? Following the exa
 
Avi (use Gerrit)
2012/02/29 19:46:50
mooted.
 | 
| + }, | 
| + }], # OS=="mac" | 
| ], | 
| }, | 
| { | 
| @@ -194,6 +209,7 @@ | 
| { | 
| 'target_name': 'content_shell', | 
| 'type': 'executable', | 
| + 'mac_bundle': 1, | 
| 'defines!': ['CONTENT_IMPLEMENTATION'], | 
| 'variables': { | 
| 'chromium_code': 1, | 
| @@ -209,6 +225,19 @@ | 
| 'app/startup_helper_win.cc', | 
| 'shell/shell_main.cc', | 
| 
Mark Mentovai
2012/02/28 20:12:40
In this file:
#if defined(OS_MACOSX)
__attribute_
 
Avi (use Gerrit)
2012/02/29 19:46:50
Simplified.
 | 
| ], | 
| + 'mac_bundle_resources': [ | 
| + 'shell/mac/app.icns', | 
| + 'shell/mac/Info.plist', | 
| 
Mark Mentovai
2012/02/28 20:12:40
app-Info.plist. Again on 236 and 239.
 
Avi (use Gerrit)
2012/02/29 19:46:50
Done.
 | 
| + ], | 
| + # TODO(mark): Come up with a fancier way to do this. It should only | 
| + # be necessary to list app-Info.plist once, not the three times it is | 
| + # listed here. | 
| + 'mac_bundle_resources!': [ | 
| + 'shell/mac/Info.plist', | 
| + ], | 
| + 'xcode_settings': { | 
| + 'INFOPLIST_FILE': 'shell/mac/Info.plist', | 
| + }, | 
| 'msvs_settings': { | 
| 'VCLinkerTool': { | 
| 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS | 
| @@ -230,17 +259,40 @@ | 
| }, | 
| }, | 
| }, | 
| - }], | 
| + }], # OS=="win" | 
| ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', { | 
| 'dependencies': [ | 
| '../sandbox/sandbox.gyp:sandbox', | 
| ], | 
| - }], | 
| + }], # OS=="win" or (toolkit_uses_gtk == 1 and selinux == 0) | 
| ['toolkit_uses_gtk == 1', { | 
| 'dependencies': [ | 
| '<(DEPTH)/build/linux/system.gyp:gtk', | 
| ], | 
| - }], | 
| + }], # toolkit_uses_gtk | 
| + ['OS=="mac"', { | 
| + 'product_name': '<(content_shell_product_name)', | 
| + 'postbuilds': [ | 
| 
Mark Mentovai
2012/02/28 20:12:40
It’d be nice to run tweak_info_plist just to get t
 
Mark Mentovai
2012/02/28 20:12:40
The “verify” build step from chrome_exe would be v
 
Avi (use Gerrit)
2012/02/29 19:46:50
Done.
 
Avi (use Gerrit)
2012/02/29 19:46:50
Done.
 | 
| + { | 
| + 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework', | 
| + 'action': [ | 
| + '../build/mac/copy_framework_unversioned', | 
| + '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework', | 
| + '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks', | 
| + ], | 
| + }, | 
| + { | 
| + 'postbuild_name': 'Fix Framework Link', | 
| + 'action': [ | 
| + 'install_name_tool', | 
| + '-change', | 
| + '/Library/Frameworks/<(content_shell_product_name) Framework.framework/Versions/A/<(content_shell_product_name) Framework', | 
| + '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework', | 
| + '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}' | 
| + ], | 
| + }, | 
| + ], | 
| + }], # OS=="mac" | 
| ], | 
| }, | 
| ], |