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_NAME)', 38 39 'INFOPLIST_FILE': 'app/framework-Info.plist', 40 }, 41 'includes': [ 42 'chrome_nibs.gypi', 43 ], 44 # TODO(mark): Come up with a fancier way to do this. It should 45 # only be necessary to list framework-Info.plist once, not the 46 # three times it is listed here. 47 'mac_bundle_resources': [ 48 # This image is used to badge the lock icon in the 49 # authentication dialogs, such as those used for installation 50 # from disk image and Keystone promotion (if so enabled). It 51 # needs to exist as a file on disk and not just something in a 52 # resource bundle because that's the interface that 53 # Authorization Services uses. Also, Authorization Services 54 # can't deal with .icns files. 55 'app/theme/default_100_percent/<(theme_dir_name)/product_logo_32.png', 56 57 'app/framework-Info.plist', 58 '<@(mac_all_xibs)', 59 'app/theme/find_next_Template.pdf', 60 'app/theme/find_prev_Template.pdf', 61 'app/theme/menu_overflow_down.pdf', 62 'app/theme/menu_overflow_up.pdf', 63 'browser/mac/install.sh', 64 '<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak', 65 '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak', 66 '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak', 67 '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))', 68 # Note: pseudo_locales are generated via the packed_resources 69 # dependency but not copied to the final target. See 70 # common.gypi for more info. 71 ], 72 'mac_bundle_resources!': [ 73 'app/framework-Info.plist', 74 ], 75 'dependencies': [ 76 'app_mode_app', 77 # Bring in pdfsqueeze and run it on all pdfs 78 '../build/temp_gyp/pdfsqueeze.gyp:pdfsqueeze', 79 '../crypto/crypto.gyp:crypto', 80 # On Mac, Flash gets put into the framework, so we need this 81 # dependency here. flash_player.gyp will copy the Flash bundle 82 # into PRODUCT_DIR. 83 '../third_party/adobe/flash/flash_player.gyp:flapper_binaries', 84 '../third_party/widevine/cdm/widevine_cdm.gyp:widevinecdmadapter', 85 'chrome_resources.gyp:packed_extra_resources', 86 'chrome_resources.gyp:packed_resources', 87 ], 88 'rules': [ 89 { 90 'rule_name': 'pdfsqueeze', 91 'extension': 'pdf', 92 'inputs': [ 93 '<(PRODUCT_DIR)/pdfsqueeze', 94 ], 95 'outputs': [ 96 '<(INTERMEDIATE_DIR)/pdfsqueeze/<(RULE_INPUT_ROOT).pdf', 97 ], 98 'action': ['<(PRODUCT_DIR)/pdfsqueeze', 99 '<(RULE_INPUT_PATH)', '<@(_outputs)'], 100 'message': 'Running pdfsqueeze on <(RULE_INPUT_PATH)', 101 }, 102 ], 103 'variables': { 104 'conditions': [ 105 ['branding=="Chrome"', { 106 'theme_dir_name': 'google_chrome', 107 }, { # else: 'branding!="Chrome" 108 'theme_dir_name': 'chromium', 109 }], 110 ], 111 'libpeer_target_type%': 'static_library', 112 'repack_path': '../tools/grit/grit/format/repack.py', 113 }, 114 'postbuilds': [ 115 { 116 # Modify the Info.plist as needed. The script explains why 117 # this is needed. This is also done in the chrome target. 118 # The framework needs the Breakpad keys if this feature is 119 # enabled. It does not need the Keystone keys; these always 120 # come from the outer application bundle. The framework 121 # doesn't currently use the SCM keys for anything, 122 # but this seems like a really good place to store them. 123 'postbuild_name': 'Tweak Info.plist', 124 'action': ['<(tweak_info_plist_path)', 125 '--breakpad=<(mac_breakpad_compiled_in)', 126 '--breakpad_uploads=<(mac_breakpad_uploads)', 127 '--keystone=0', 128 '--scm=1', 129 '--branding=<(branding)'], 130 }, 131 { 132 'postbuild_name': 'Symlink Libraries', 133 'action': [ 134 'ln', 135 '-fns', 136 'Versions/Current/Libraries', 137 '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Libraries' 138 ], 139 }, 140 ], 141 'copies': [ 142 { 143 # Copy FFmpeg binaries for audio/video support. 144 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries', 145 'files': [ 146 '<(PRODUCT_DIR)/ffmpegsumo.so', 147 ], 148 }, 149 { 150 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Internet Plug-Ins', 151 'files': [], 152 'conditions': [ 153 ['internal_pdf', { 154 'files': [ 155 '<(PRODUCT_DIR)/PDF.plugin', 156 ], 157 }], 158 ['disable_nacl!=1', { 159 'files': [ 160 '<(PRODUCT_DIR)/ppGoogleNaClPluginChrome.plugin', 161 ], 162 'conditions': [ 163 ['target_arch=="x64"', { 164 'files': [ 165 '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe', 166 ], 167 }, { 168 'files': [ 169 '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe', 170 ], 171 }], 172 ], 173 }], 174 ], 175 }, 176 { 177 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Internet Plug-Ins/PepperFlash', 178 'files': [], 179 'conditions': [ 180 ['branding == "Chrome"', { 181 'files': [ 182 '<(PRODUCT_DIR)/PepperFlash/PepperFlashPlayer.plugin', 183 ], 184 }], 185 ], 186 }, 187 { 188 # This file is used by the component installer. 189 # It is not a complete plug-in on its own. 190 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Internet Plug-Ins/', 191 'files': [], 192 'conditions': [ 193 ['branding == "Chrome"', { 194 'files': [ 195 '<(PRODUCT_DIR)/widevinecdmadapter.plugin', 196 ], 197 }], 198 ], 199 }, 200 { 201 # Copy of resources used by tests. 202 'destination': '<(PRODUCT_DIR)', 203 'files': [ 204 '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak' 205 ], 206 }, 207 { 208 # Copy of resources used by tests. 209 'destination': '<(PRODUCT_DIR)/pseudo_locales', 210 'files': [ 211 '<(SHARED_INTERMEDIATE_DIR)/<(pseudo_locales).pak' 212 ], 213 }, 214 { 215 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/resources', 216 'files': [ 217 # Loader bundle for platform apps. 218 '<(PRODUCT_DIR)/app_mode_loader.app', 219 ], 220 }, 221 ], 222 'conditions': [ 223 ['branding=="Chrome"', { 224 'copies': [ 225 { 226 # This location is for the Mac build. Note that the 227 # copying of these files for Windows and Linux is handled 228 # in chrome.gyp, as Mac needs to be dropped inside the 229 # framework. 230 'destination': 231 '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Default Apps', 232 'files': ['<@(default_apps_list)'], 233 }, 234 ], 235 }], 236 ['mac_breakpad==1', { 237 'variables': { 238 # A real .dSYM is needed for dump_syms to operate on. 239 'mac_real_dsym': 1, 240 }, 241 }], 242 ['mac_breakpad_compiled_in==1', { 243 'dependencies': [ 244 '../breakpad/breakpad.gyp:breakpad', 245 'app/policy/cloud_policy_codegen.gyp:policy', 246 ], 247 'copies': [ 248 { 249 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources', 250 'files': [ 251 '<(PRODUCT_DIR)/crash_inspector', 252 '<(PRODUCT_DIR)/crash_report_sender.app' 253 ], 254 }, 255 ], 256 }], # mac_breakpad_compiled_in 257 ['mac_keystone==1', { 258 'mac_bundle_resources': [ 259 'browser/mac/keystone_promote_preflight.sh', 260 'browser/mac/keystone_promote_postflight.sh', 261 ], 262 'postbuilds': [ 263 { 264 'postbuild_name': 'Copy KeystoneRegistration.framework', 265 'action': [ 266 '../build/mac/copy_framework_unversioned.sh', 267 '-I', 268 '../third_party/googlemac/Releases/Keystone/KeystoneRegistration.framework', 269 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks', 270 ], 271 }, 272 { 273 'postbuild_name': 'Symlink Frameworks', 274 'action': [ 275 'ln', 276 '-fns', 277 'Versions/Current/Frameworks', 278 '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Frameworks' 279 ], 280 }, 281 ], 282 }], # mac_keystone 283 ['internal_pdf', { 284 'dependencies': [ 285 '../pdf/pdf.gyp:pdf', 286 ], 287 }], 288 ['debug_devtools==1', { 289 'postbuilds': [{ 290 'postbuild_name': 'Copy inspector files', 291 'action': [ 292 'cp', 293 '-r', 294 '${BUILT_PRODUCTS_DIR}/resources/inspector', 295 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Resources', 296 ], 297 }], 298 }], 299 ['enable_hidpi==1', { 300 'mac_bundle_resources': [ 301 '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak', 302 ], 303 }], 304 ['enable_webrtc==1 and libpeer_target_type!="static_library"', { 305 'copies': [{ 306 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries', 307 'files': [ 308 '<(PRODUCT_DIR)/libpeerconnection.so', 309 ], 310 }], 311 }], 312 ], # conditions 313 } 314