# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'conditions': [ ['OS=="mac" or OS=="win"', { 'targets': [ { 'target_name': 'chrome_dll', 'type': 'none', 'dependencies': [ 'chrome_main_dll', ], 'conditions': [ ['incremental_chrome_dll==1', { # Linking to a different directory and then hardlinking back # to OutDir is a workaround to avoid having the .ilk for # chrome.exe and chrome.dll conflicting. See crbug.com/92528 # for more information. Done on the dll instead of the exe so # that people launching from VS don't need to modify # $(TargetPath) for the exe. 'actions': [ { 'action_name': 'hardlink_to_output', 'inputs': [ '$(OutDir)\\initial\\chrome.dll', ], 'outputs': [ '$(OutDir)\\chrome.dll', ], 'action': ['tools\\build\\win\\hardlink_failsafe.bat', '$(OutDir)\\initial\\chrome.dll', '$(OutDir)\\chrome.dll'], 'msvs_cygwin_shell': 0, } ], }], ] }, { 'target_name': 'chrome_main_dll', 'type': 'shared_library', 'variables': { 'enable_wexit_time_destructors': 1, }, 'dependencies': [ '<@(chromium_dependencies)', 'app/policy/cloud_policy_codegen.gyp:policy', ], 'conditions': [ ['use_aura==1', { 'dependencies': [ '../ui/compositor/compositor.gyp:compositor', ], }], ['use_ash==1', { 'sources': [ '<(SHARED_INTERMEDIATE_DIR)/ash/ash_resources/ash_wallpaper_resources.rc', ], }], ['OS=="win"', { 'product_name': 'chrome', 'dependencies': [ # On Windows, link the dependencies (libraries) that make # up actual Chromium functionality into this .dll. 'chrome_resources.gyp:chrome_resources', 'chrome_version_resources', '../content/content.gyp:content_worker', '../crypto/crypto.gyp:crypto', '../printing/printing.gyp:printing', '../net/net.gyp:net_resources', '../third_party/cld/cld.gyp:cld', '../ui/views/views.gyp:views', '../webkit/support/webkit_support.gyp:webkit_resources', ], 'sources': [ 'app/chrome_command_ids.h', 'app/chrome_dll.rc', 'app/chrome_dll_resource.h', 'app/chrome_main.cc', 'app/chrome_main_delegate.cc', 'app/chrome_main_delegate.h', '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc', '../base/win/dllmain.cc', '../webkit/glue/resources/aliasb.cur', '../webkit/glue/resources/cell.cur', '../webkit/glue/resources/col_resize.cur', '../webkit/glue/resources/copy.cur', '../webkit/glue/resources/none.cur', '../webkit/glue/resources/row_resize.cur', '../webkit/glue/resources/vertical_text.cur', '../webkit/glue/resources/zoom_in.cur', '../webkit/glue/resources/zoom_out.cur', # TODO: It would be nice to have these pulled in # automatically from direct_dependent_settings in # their various targets (net.gyp:net_resources, etc.), # but that causes errors in other targets when # resulting .res files get referenced multiple times. '<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.rc', '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc', '<(SHARED_INTERMEDIATE_DIR)/chrome/extensions_api_resources.rc', '<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources.rc', '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.rc', '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.rc', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc', # TODO(sgk): left-over from pre-gyp build, figure out # if we still need them and/or how to update to gyp. #'app/check_dependents.bat', #'app/chrome.dll.deps', ], 'include_dirs': [ '<(DEPTH)/third_party/wtl/include', ], 'defines': [ 'CHROME_DLL', 'BROWSER_DLL', 'RENDERER_DLL', 'PLUGIN_DLL', ], 'configurations': { 'Debug_Base': { 'msvs_settings': { 'VCLinkerTool': { 'LinkIncremental': '<(msvs_large_module_debug_link_mode)', }, }, }, }, 'msvs_settings': { 'VCLinkerTool': { 'AdditionalLibraryDirectories': ['$(DXSDK_DIR)/lib/x86'], 'BaseAddress': '0x01c30000', 'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib', 'ProgramDatabaseFile': '$(OutDir)\\chrome_dll.pdb', # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency). 'SubSystem': '2', 'conditions': [ ['incremental_chrome_dll==1', { 'OutputFile': '$(OutDir)\\initial\\chrome.dll', 'UseLibraryDependencyInputs': "true", }], ], 'DelayLoadDLLs': [ 'comdlg32.dll', 'crypt32.dll', 'cryptui.dll', 'dhcpcsvc.dll', 'imagehlp.dll', 'imm32.dll', 'iphlpapi.dll', 'setupapi.dll', 'urlmon.dll', 'winhttp.dll', 'wininet.dll', 'winspool.drv', 'ws2_32.dll', 'wsock32.dll', ], }, 'VCManifestTool': { 'AdditionalManifestFiles': '$(ProjectDir)\\app\\chrome.dll.manifest', }, }, }], # OS=="win" ['OS=="mac"', { # The main browser executable's name is <(mac_product_name). # Certain things will get confused if two modules in the # executable share the same name, so append " Framework" to the # product_name used for the framework. This will result in # a name like "Chromium Framework.framework". 'product_name': '<(mac_product_name) Framework', 'mac_bundle': 1, 'xcode_settings': { 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)', # The dylib versions are of the form a[.b[.c]], where a is a # 16-bit unsigned integer, and b and c are 8-bit unsigned # integers. Any missing component is taken to be 0. The # best mapping from product version numbers into this scheme # is to just use a=BUILD, b=(PATCH/256), c=(PATCH%256). There # is no ambiguity in this scheme because the build and patch # numbers are guaranteed unique even across distinct major # and minor version numbers. These settings correspond to # -compatibility_version and -current_version. 'DYLIB_COMPATIBILITY_VERSION': '<(version_mac_dylib)', 'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)', # The framework is placed within the .app's versioned # directory. DYLIB_INSTALL_NAME_BASE and # LD_DYLIB_INSTALL_NAME affect -install_name. 'DYLIB_INSTALL_NAME_BASE': '@executable_path/../Versions/<(version_full)', # See /build/mac/copy_framework_unversioned.sh for # information on LD_DYLIB_INSTALL_NAME. 'LD_DYLIB_INSTALL_NAME': '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(WRAPPER_NAME)/$(PRODUCT_NAME)', 'INFOPLIST_FILE': 'app/framework-Info.plist', # Define the order of symbols within the framework. This # sets -order_file. 'ORDER_FILE': 'app/framework.order', }, 'sources': [ 'app/chrome_command_ids.h', 'app/chrome_dll_resource.h', 'app/chrome_main.cc', 'app/chrome_main_delegate.cc', 'app/chrome_main_delegate.h', 'app/chrome_main_app_mode_mac.mm', 'app/chrome_main_mac.mm', 'app/chrome_main_mac.h', ], 'include_dirs': [ '<(grit_out_dir)', ], 'includes': [ 'chrome_nibs.gypi', ], # TODO(mark): Come up with a fancier way to do this. It should # only be necessary to list framework-Info.plist once, not the # three times it is listed here. 'mac_bundle_resources': [ # This image is used to badge the lock icon in the # authentication dialogs, such as those used for installation # from disk image and Keystone promotion (if so enabled). It # needs to exist as a file on disk and not just something in a # resource bundle because that's the interface that # Authorization Services uses. Also, Authorization Services # can't deal with .icns files. 'app/theme/default_100_percent/<(theme_dir_name)/product_logo_32.png', 'app/framework-Info.plist', '<@(mac_all_xibs)', 'app/theme/balloon_wrench.pdf', 'app/theme/chevron.pdf', 'app/theme/find_next_Template.pdf', 'app/theme/find_prev_Template.pdf', 'app/theme/menu_hierarchy_arrow.pdf', 'app/theme/menu_overflow_down.pdf', 'app/theme/menu_overflow_up.pdf', 'browser/mac/install.sh', '<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak', '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak', '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak', '