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.
6 ['OS=="mac" or OS=="win"', {
9 'target_name': 'chrome_dll',
15 ['incremental_chrome_dll==1', {
16 # Linking to a different directory and then hardlinking back
17 # to OutDir is a workaround to avoid having the .ilk for
18 # chrome.exe and chrome.dll conflicting. See crbug.com/92528
19 # for more information. Done on the dll instead of the exe so
20 # that people launching from VS don't need to modify
21 # $(TargetPath) for the exe.
24 'action_name': 'hardlink_to_output',
26 '$(OutDir)\\initial\\chrome.dll',
29 '$(OutDir)\\chrome.dll',
31 'action': ['tools\\build\\win\\hardlink_failsafe.bat',
32 '$(OutDir)\\initial\\chrome.dll',
33 '$(OutDir)\\chrome.dll'],
34 'msvs_cygwin_shell': 0,
41 'target_name': 'chrome_main_dll',
42 'type': 'shared_library',
44 'enable_wexit_time_destructors': 1,
47 '<@(chromium_dependencies)',
48 'app/policy/cloud_policy_codegen.gyp:policy',
53 '../ui/gfx/compositor/compositor.gyp:compositor',
57 'product_name': 'chrome',
59 # On Windows, link the dependencies (libraries) that make
60 # up actual Chromium functionality into this .dll.
61 'chrome_resources.gyp:chrome_resources',
62 'chrome_version_resources',
63 'installer_util_strings',
64 '../content/content.gyp:content_worker',
65 '../crypto/crypto.gyp:crypto',
66 '../printing/printing.gyp:printing',
67 '../net/net.gyp:net_resources',
68 '../third_party/cld/cld.gyp:cld',
69 '../ui/views/views.gyp:views',
70 '../webkit/support/webkit_support.gyp:webkit_resources',
73 'app/chrome_command_ids.h',
75 'app/chrome_dll_resource.h',
77 'app/chrome_main_delegate.cc',
78 'app/chrome_main_delegate.h',
80 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
81 '../base/win/dllmain.cc',
83 '../webkit/glue/resources/aliasb.cur',
84 '../webkit/glue/resources/cell.cur',
85 '../webkit/glue/resources/col_resize.cur',
86 '../webkit/glue/resources/copy.cur',
87 '../webkit/glue/resources/none.cur',
88 '../webkit/glue/resources/row_resize.cur',
89 '../webkit/glue/resources/vertical_text.cur',
90 '../webkit/glue/resources/zoom_in.cur',
91 '../webkit/glue/resources/zoom_out.cur',
93 # TODO: It would be nice to have these pulled in
94 # automatically from direct_dependent_settings in
95 # their various targets (net.gyp:net_resources, etc.),
96 # but that causes errors in other targets when
97 # resulting .res files get referenced multiple times.
98 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.rc',
99 '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
100 '<(SHARED_INTERMEDIATE_DIR)/chrome/extensions_api_resources.rc',
101 '<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources.rc',
102 '<(SHARED_INTERMEDIATE_DIR)/chrome/theme_resources.rc',
103 '<(SHARED_INTERMEDIATE_DIR)/chrome/theme_resources_standard.rc',
104 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.rc',
105 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
106 '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.rc',
107 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.rc',
108 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.rc',
109 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.rc',
110 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc',
112 # TODO(sgk): left-over from pre-gyp build, figure out
113 # if we still need them and/or how to update to gyp.
114 #'app/check_dependents.bat',
115 #'app/chrome.dll.deps',
118 '<(DEPTH)/third_party/wtl/include',
130 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
137 'AdditionalLibraryDirectories': ['$(DXSDK_DIR)/lib/x86'],
138 'BaseAddress': '0x01c30000',
139 'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
140 'ProgramDatabaseFile': '$(OutDir)\\chrome_dll.pdb',
141 # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
144 ['incremental_chrome_dll==1', {
145 'OutputFile': '$(OutDir)\\initial\\chrome.dll',
146 'UseLibraryDependencyInputs': "true",
167 'AdditionalManifestFiles': '$(ProjectDir)\\app\\chrome.dll.manifest',
172 # The main browser executable's name is <(mac_product_name).
173 # Certain things will get confused if two modules in the
174 # executable share the same name, so append " Framework" to the
175 # product_name used for the framework. This will result in
176 # a name like "Chromium Framework.framework".
177 'product_name': '<(mac_product_name) Framework',
180 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
182 # The dylib versions are of the form a[.b[.c]], where a is a
183 # 16-bit unsigned integer, and b and c are 8-bit unsigned
184 # integers. Any missing component is taken to be 0. The
185 # best mapping from product version numbers into this scheme
186 # is to just use a=BUILD, b=(PATCH/256), c=(PATCH%256). There
187 # is no ambiguity in this scheme because the build and patch
188 # numbers are guaranteed unique even across distinct major
189 # and minor version numbers. These settings correspond to
190 # -compatibility_version and -current_version.
191 'DYLIB_COMPATIBILITY_VERSION': '<(version_mac_dylib)',
192 'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)',
194 # The framework is placed within the .app's versioned
195 # directory. DYLIB_INSTALL_NAME_BASE and
196 # LD_DYLIB_INSTALL_NAME affect -install_name.
197 'DYLIB_INSTALL_NAME_BASE':
198 '@executable_path/../Versions/<(version_full)',
199 # See /build/mac/copy_framework_unversioned.sh for
200 # information on LD_DYLIB_INSTALL_NAME.
201 'LD_DYLIB_INSTALL_NAME':
202 '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(WRAPPER_NAME)/$(PRODUCT_NAME)',
204 'INFOPLIST_FILE': 'app/framework-Info.plist',
206 # Define the order of symbols within the framework. This
208 'ORDER_FILE': 'app/framework.order',
211 'app/chrome_command_ids.h',
212 'app/chrome_dll_resource.h',
213 'app/chrome_main.cc',
214 'app/chrome_main_delegate.cc',
215 'app/chrome_main_delegate.h',
216 'app/chrome_main_app_mode_mac.mm',
217 'app/chrome_main_mac.mm',
218 'app/chrome_main_mac.h',
223 # TODO(mark): Come up with a fancier way to do this. It should
224 # only be necessary to list framework-Info.plist once, not the
225 # three times it is listed here.
226 'mac_bundle_resources': [
227 # This image is used to badge the lock icon in the
228 # authentication dialogs, such as those used for installation
229 # from disk image and Keystone promotion (if so enabled). It
230 # needs to exist as a file on disk and not just something in a
231 # resource bundle because that's the interface that
232 # Authorization Services uses. Also, Authorization Services
233 # can't deal with .icns files.
234 'app/theme/<(theme_dir_name)/product_logo_32.png',
236 'app/framework-Info.plist',
237 'app/nibs/AboutIPC.xib',
238 'app/nibs/AvatarMenuItem.xib',
239 'app/nibs/BookmarkAllTabs.xib',
240 'app/nibs/BookmarkBar.xib',
241 'app/nibs/BookmarkBarFolderWindow.xib',
242 'app/nibs/BookmarkBubble.xib',
243 'app/nibs/BookmarkEditor.xib',
244 'app/nibs/BookmarkNameFolder.xib',
245 'app/nibs/BrowserWindow.xib',
246 'app/nibs/ChromeToMobileBubble.xib',
247 'app/nibs/CollectedCookies.xib',
248 'app/nibs/CookieDetailsView.xib',
249 'app/nibs/ContentBlockedCookies.xib',
250 'app/nibs/ContentBlockedImages.xib',
251 'app/nibs/ContentBlockedJavaScript.xib',
252 'app/nibs/ContentBlockedPlugins.xib',
253 'app/nibs/ContentBlockedPopups.xib',
254 'app/nibs/ContentBlockedGeolocation.xib',
255 'app/nibs/DownloadItem.xib',
256 'app/nibs/DownloadShelf.xib',
257 'app/nibs/EditSearchEngine.xib',
258 'app/nibs/ExtensionInstallPrompt.xib',
259 'app/nibs/ExtensionInstallPromptBundle.xib',
260 'app/nibs/ExtensionInstallPromptInline.xib',
261 'app/nibs/ExtensionInstallPromptNoWarnings.xib',
262 'app/nibs/ExtensionInstalledBubble.xib',
263 'app/nibs/ExtensionInstalledBubbleBundle.xib',
264 'app/nibs/FindBar.xib',
265 'app/nibs/FirstRunBubble.xib',
266 'app/nibs/FirstRunDialog.xib',
267 'app/nibs/FullscreenExitBubble.xib',
268 'app/nibs/GlobalErrorBubble.xib',
269 'app/nibs/HungRendererDialog.xib',
270 'app/nibs/HttpAuthLoginSheet.xib',
271 'app/nibs/ImportProgressDialog.xib',
272 'app/nibs/InfoBar.xib',
273 'app/nibs/InfoBarContainer.xib',
274 'app/nibs/MainMenu.xib',
275 'app/nibs/Notification.xib',
276 'app/nibs/OneClickSigninBubble.xib',
277 'app/nibs/OneClickSigninDialog.xib',
278 'app/nibs/Panel.xib',
279 'app/nibs/PreviewableContents.xib',
280 'app/nibs/SaveAccessoryView.xib',
281 'app/nibs/SadTab.xib',
282 'app/nibs/SpeechRecognitionBubble.xib',
283 'app/nibs/TabView.xib',
284 'app/nibs/TaskManager.xib',
285 'app/nibs/Toolbar.xib',
286 'app/nibs/WrenchMenu.xib',
287 'app/theme/balloon_wrench.pdf',
288 'app/theme/chevron.pdf',
289 'app/theme/find_next_Template.pdf',
290 'app/theme/find_prev_Template.pdf',
291 'app/theme/menu_hierarchy_arrow.pdf',
292 'app/theme/menu_overflow_down.pdf',
293 'app/theme/menu_overflow_up.pdf',
295 'app/theme/omnibox_extension_app.pdf',
296 'app/theme/omnibox_history.pdf',
297 'app/theme/omnibox_http.pdf',
298 'app/theme/omnibox_https_invalid.pdf',
299 'app/theme/omnibox_https_valid.pdf',
300 'app/theme/omnibox_https_warning.pdf',
301 'app/theme/omnibox_search.pdf',
302 'app/theme/omnibox_tts.pdf',
303 'app/theme/otr_icon.pdf',
304 'app/theme/star.pdf',
305 'app/theme/star_lit.pdf',
306 'browser/mac/install.sh',
307 '<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak',
308 '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak',
309 '<!@pymod_do_main(repack_locales -o -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))',
310 # Note: pseudo_locales are generated via the packed_resources
311 # dependency but not copied to the final target. See
312 # common.gypi for more info.
314 'mac_bundle_resources!': [
315 'app/framework-Info.plist',
319 # Bring in pdfsqueeze and run it on all pdfs
320 '../build/temp_gyp/pdfsqueeze.gyp:pdfsqueeze',
321 '../crypto/crypto.gyp:crypto',
322 # On Mac, Flash gets put into the framework, so we need this
323 # dependency here. flash_player.gyp will copy the Flash bundle
325 # TODO(viettrungluu): Once enabled for Mac, Flapper binaries
326 # will also need to be put into the bundle.
327 '../third_party/adobe/flash/flash_player.gyp:flash_player',
328 '../third_party/adobe/flash/flash_player.gyp:flapper_binaries',
329 'chrome_resources.gyp:packed_extra_resources',
330 'chrome_resources.gyp:packed_resources',
334 'rule_name': 'pdfsqueeze',
337 '<(PRODUCT_DIR)/pdfsqueeze',
340 '<(INTERMEDIATE_DIR)/pdfsqueeze/<(RULE_INPUT_ROOT).pdf',
342 'action': ['<(PRODUCT_DIR)/pdfsqueeze',
343 '<(RULE_INPUT_PATH)', '<@(_outputs)'],
344 'message': 'Running pdfsqueeze on <(RULE_INPUT_PATH)',
349 ['branding=="Chrome"', {
350 'theme_dir_name': 'google_chrome',
351 }, { # else: 'branding!="Chrome"
352 'theme_dir_name': 'chromium',
355 'repack_path': '../tools/grit/grit/format/repack.py',
359 'includes': ['chrome_repack_theme_resources_2x.gypi']
364 # This step causes an error to be raised if the .order file
365 # does not account for all global text symbols. It
366 # validates the completeness of the .order file.
367 'postbuild_name': 'Verify global text symbol order',
369 'verify_order_path': 'tools/build/mac/verify_order',
372 '<(verify_order_path)',
374 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
378 # Modify the Info.plist as needed. The script explains why
379 # this is needed. This is also done in the chrome target.
380 # The framework needs the Breakpad keys if this feature is
381 # enabled. It does not need the Keystone keys; these always
382 # come from the outer application bundle. The framework
383 # doesn't currently use the Subversion keys for anything,
384 # but this seems like a really good place to store them.
385 'postbuild_name': 'Tweak Info.plist',
386 'action': ['<(tweak_info_plist_path)',
387 '--breakpad=<(mac_breakpad_compiled_in)',
388 '--breakpad_uploads=<(mac_breakpad_uploads)',
391 '--branding=<(branding)'],
394 'postbuild_name': 'Symlink Libraries',
398 'Versions/Current/Libraries',
399 '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Libraries'
405 # Copy FFmpeg binaries for audio/video support.
406 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
408 '<(PRODUCT_DIR)/ffmpegsumo.so',
412 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Internet Plug-Ins',
415 ['branding == "Chrome"', {
417 '<(PRODUCT_DIR)/Flash Player Plugin for Chrome.plugin',
418 '<(PRODUCT_DIR)/plugin.vch',
423 '<(PRODUCT_DIR)/PDF.plugin',
426 ['disable_nacl!=1', {
428 '<(PRODUCT_DIR)/ppGoogleNaClPluginChrome.plugin',
429 # We leave out nacl_irt_x86_64.nexe because we only
430 # support x86-32 NaCl on Mac OS X.
431 '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
437 # Copy of resources used by tests.
438 'destination': '<(PRODUCT_DIR)',
440 '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak'
444 # Copy of resources used by tests.
445 'destination': '<(PRODUCT_DIR)/pseudo_locales',
447 '<(SHARED_INTERMEDIATE_DIR)/<(pseudo_locales).pak'
451 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/resources',
453 # Loader bundle for platform apps.
454 '<(PRODUCT_DIR)/app_mode_loader.app',
457 ['debug_devtools!=0', {
459 '<(PRODUCT_DIR)/resources/inspector',
466 ['branding=="Chrome"', {
469 # This location is for the Mac build. Note that the
470 # copying of these files for Windows and Linux is handled
471 # in chrome.gyp, as Mac needs to be dropped inside the
474 '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Default Apps',
475 'files': ['<@(default_apps_list)'],
479 ['mac_breakpad==1', {
481 # A real .dSYM is needed for dump_syms to operate on.
485 ['mac_breakpad_compiled_in==1', {
487 'app/breakpad_mac.mm',
488 'app/breakpad_mac.h',
491 '../breakpad/breakpad.gyp:breakpad',
492 'app/policy/cloud_policy_codegen.gyp:policy',
496 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
498 '<(PRODUCT_DIR)/crash_inspector',
499 '<(PRODUCT_DIR)/crash_report_sender.app'
503 }, { # else: mac_breakpad_compiled_in!=1
504 # No Breakpad, put in the stubs.
506 'app/breakpad_mac_stubs.mm',
507 'app/breakpad_mac.h',
509 }], # mac_breakpad_compiled_in
510 ['mac_keystone==1', {
511 'mac_bundle_resources': [
512 'browser/mac/keystone_promote_preflight.sh',
513 'browser/mac/keystone_promote_postflight.sh',
517 'postbuild_name': 'Copy KeystoneRegistration.framework',
519 '../build/mac/copy_framework_unversioned.sh',
520 '../third_party/googlemac/Releases/Keystone/KeystoneRegistration.framework',
521 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
525 'postbuild_name': 'Symlink Frameworks',
529 'Versions/Current/Frameworks',
530 '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Frameworks'
537 '../pdf/pdf.gyp:pdf',
543 }, # target chrome_dll
545 }], # OS=="mac" or OS=="win"