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
3 # found in the LICENSE file.
7 'chrome_dll_target': 0,
10 ['chrome_dll_target==1', {
14 'third_party/wtl/include',
24 'BaseAddress': '0x01c30000',
39 # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
43 'AdditionalManifestFiles': '$(ProjectDir)\\app\\chrome.dll.manifest',
50 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
61 ['OS=="mac" or OS=="win"', {
64 'target_name': 'chrome_dll',
65 'type': 'shared_library',
67 'chrome_dll_target': 1,
70 '<@(chromium_dependencies)',
74 'product_name': 'chrome',
75 'msvs_guid': 'C0A7EE2C-2A6D-45BE-BA78-6D006FDF52D9',
77 # On Windows, link the dependencies (libraries) that make
78 # up actual Chromium functionality into this .dll.
81 'installer/installer.gyp:installer_util_strings',
83 '../printing/printing.gyp:printing',
84 '../net/net.gyp:net_resources',
85 '../build/util/support/support.gyp:*',
86 '../third_party/cld/cld.gyp:cld',
87 '../views/views.gyp:views',
88 '../webkit/webkit.gyp:webkit_resources',
89 '../gears/gears.gyp:gears',
93 'app/chrome_dll_main.cc',
94 'app/chrome_dll_resource.h',
95 '<(SHARED_INTERMEDIATE_DIR)/chrome_dll_version/chrome_dll_version.rc',
97 '../webkit/glue/resources/aliasb.cur',
98 '../webkit/glue/resources/cell.cur',
99 '../webkit/glue/resources/col_resize.cur',
100 '../webkit/glue/resources/copy.cur',
101 '../webkit/glue/resources/row_resize.cur',
102 '../webkit/glue/resources/vertical_text.cur',
103 '../webkit/glue/resources/zoom_in.cur',
104 '../webkit/glue/resources/zoom_out.cur',
106 # TODO: It would be nice to have these pulled in
107 # automatically from direct_dependent_settings in
108 # their various targets (net.gyp:net_resources, etc.),
109 # but that causes errors in other targets when
110 # resulting .res files get referenced multiple times.
111 '<(SHARED_INTERMEDIATE_DIR)/app/app_resources/app_resources.rc',
112 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.rc',
113 '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
114 '<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources.rc',
115 '<(SHARED_INTERMEDIATE_DIR)/chrome/theme_resources.rc',
116 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
117 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc',
119 # TODO(sgk): left-over from pre-gyp build, figure out
120 # if we still need them and/or how to update to gyp.
121 #'app/check_dependents.bat',
122 #'app/chrome.dll.deps',
126 'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
127 'ProgramDatabaseFile': '$(OutDir)\\chrome_dll.pdb',
132 # The main browser executable's name is <(mac_product_name).
133 # Certain things will get confused if two modules in the
134 # executable share the same name, so append " Framework" to the
135 # product_name used for the framework. This will result in
136 # a name like "Chromium Framework.framework".
137 'product_name': '<(mac_product_name) Framework',
140 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
142 # The dylib versions are of the form a[.b[.c]], where a is a
143 # 16-bit unsigned integer, and b and c are 8-bit unsigned
144 # integers. Any missing component is taken to be 0. The
145 # best mapping from product version numbers into this scheme
146 # is to just use the build and patch numbers. There is no
147 # ambiguity in this scheme because the build number is
148 # guaranteed unique even across distinct major and minor
149 # version numbers. These settings correspond to
150 # -compatibility_version and -current_version.
151 'DYLIB_COMPATIBILITY_VERSION': '<(version_build_patch)',
152 'DYLIB_CURRENT_VERSION': '<(version_build_patch)',
154 # The framework is placed within the .app's versioned
155 # directory. DYLIB_INSTALL_NAME_BASE and
156 # LD_DYLIB_INSTALL_NAME affect -install_name.
157 'DYLIB_INSTALL_NAME_BASE':
158 '@executable_path/../Versions/<(version_full)',
159 # See tools/build/mac/copy_framework_unversioned for
160 # information on LD_DYLIB_INSTALL_NAME.
161 'LD_DYLIB_INSTALL_NAME':
162 '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(WRAPPER_NAME)/$(PRODUCT_NAME)',
164 'INFOPLIST_FILE': 'app/framework-Info.plist',
166 # Define the order of symbols within the framework. This
168 'ORDER_FILE': 'app/framework.order',
171 'app/chrome_dll_main.cc',
172 'app/chrome_dll_resource.h',
173 'app/chrome_exe_main.mm',
175 # TODO(mark): Come up with a fancier way to do this. It should
176 # only be necessary to list framework-Info.plist once, not the
177 # three times it is listed here.
178 'mac_bundle_resources': [
179 'app/framework-Info.plist',
180 'app/nibs/About.xib',
181 'app/nibs/AboutIPC.xib',
182 'app/nibs/BookmarkAllTabs.xib',
183 'app/nibs/BookmarkBar.xib',
184 'app/nibs/BookmarkBubble.xib',
185 'app/nibs/BookmarkEditor.xib',
186 'app/nibs/BookmarkManager.xib',
187 'app/nibs/BookmarkNameFolder.xib',
188 'app/nibs/BrowserWindow.xib',
189 'app/nibs/ClearBrowsingData.xib',
190 'app/nibs/Cookies.xib',
191 'app/nibs/DownloadItem.xib',
192 'app/nibs/DownloadShelf.xib',
193 'app/nibs/EditSearchEngine.xib',
194 'app/nibs/FindBar.xib',
195 'app/nibs/FirstRunDialog.xib',
196 'app/nibs/FontLanguageSettings.xib',
197 'app/nibs/HungRendererDialog.xib',
198 'app/nibs/HttpAuthLoginSheet.xib',
199 'app/nibs/ImportSettingsDialog.xib',
200 'app/nibs/InfoBar.xib',
201 'app/nibs/InfoBarContainer.xib',
202 'app/nibs/ImportProgressDialog.xib',
203 'app/nibs/KeywordEditor.xib',
204 'app/nibs/MainMenu.xib',
205 'app/nibs/PageInfo.xib',
206 'app/nibs/Preferences.xib',
207 'app/nibs/ReportBug.xib',
208 'app/nibs/SaveAccessoryView.xib',
209 'app/nibs/SadTab.xib',
210 'app/nibs/TabContents.xib',
211 'app/nibs/TabView.xib',
212 'app/nibs/TaskManager.xib',
213 'app/nibs/Toolbar.xib',
214 'app/theme/back_Template.pdf',
215 'app/theme/chevron.png', # TODO(jrg): get and use a pdf version
216 'app/theme/close_bar.pdf',
217 'app/theme/close_bar_h.pdf',
218 'app/theme/close_bar_p.pdf',
219 'app/theme/find_next_Template.pdf',
220 'app/theme/find_prev_Template.pdf',
221 'app/theme/forward_Template.pdf',
222 'app/theme/go_Template.pdf',
223 'app/theme/home_Template.pdf',
224 'app/theme/menu_chrome_rtl_Template.pdf',
225 'app/theme/menu_chrome_Template.pdf',
226 'app/theme/menu_page_rtl_Template.pdf',
227 'app/theme/menu_page_Template.pdf',
229 'app/theme/newtab.pdf',
230 'app/theme/newtab_h.pdf',
231 'app/theme/newtab_p.pdf',
232 'app/theme/otr_icon.pdf',
233 'app/theme/reload_Template.pdf',
234 'app/theme/star_Template.pdf',
235 'app/theme/starred.pdf',
236 'app/theme/stop_Template.pdf',
238 'mac_bundle_resources!': [
239 'app/framework-Info.plist',
242 # Bring in pdfsqueeze and run it on all pdfs
243 '../build/temp_gyp/pdfsqueeze.gyp:pdfsqueeze',
244 '../build/util/support/support.gyp:*',
248 'rule_name': 'pdfsqueeze',
251 '<(PRODUCT_DIR)/pdfsqueeze',
254 '<(INTERMEDIATE_DIR)/pdfsqueeze/<(RULE_INPUT_ROOT).pdf',
256 'action': ['<(PRODUCT_DIR)/pdfsqueeze',
257 '<(RULE_INPUT_PATH)', '<@(_outputs)'],
258 'message': 'Running pdfsqueeze on <(RULE_INPUT_PATH)',
262 'repack_path': '../tools/data_pack/repack.py',
265 # TODO(mark): These actions are duplicated for Linux and
266 # FreeBSD in the chrome target. Can they be unified?
268 'action_name': 'repack_chrome',
271 '<(grit_out_dir)/browser_resources.pak',
272 '<(grit_out_dir)/common_resources.pak',
273 '<(grit_out_dir)/renderer_resources.pak',
274 '<(grit_out_dir)/theme_resources.pak',
275 '<(SHARED_INTERMEDIATE_DIR)/app/app_resources/app_resources.pak',
276 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
277 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak',
285 '<(INTERMEDIATE_DIR)/repack/chrome.pak',
287 'action': ['python', '<(repack_path)', '<@(_outputs)',
289 'process_outputs_as_mac_bundle_resources': 1,
292 'action_name': 'repack_locales',
293 'process_outputs_as_mac_bundle_resources': 1,
296 ['branding=="Chrome"', {
297 'branding_flag': ['-b', 'google_chrome',],
298 }, { # else: branding!="Chrome"
299 'branding_flag': ['-b', 'chromium',],
304 'tools/build/repack_locales.py',
305 # NOTE: Ideally the common command args would be shared
306 # amongst inputs/outputs/action, but the args include shell
307 # variables which need to be passed intact, and command
308 # expansion wants to expand the shell variables. Adding the
309 # explicit quoting here was the only way it seemed to work.
310 '>!@(<(repack_locales_cmd) -i <(branding_flag) -g \'<(grit_out_dir)\' -s \'<(SHARED_INTERMEDIATE_DIR)\' -x \'<(INTERMEDIATE_DIR)\' <(locales))',
313 '>!@(<(repack_locales_cmd) -o -g \'<(grit_out_dir)\' -s \'<(SHARED_INTERMEDIATE_DIR)\' -x \'<(INTERMEDIATE_DIR)\' <(locales))',
316 '<@(repack_locales_cmd)',
318 '-g', '<(grit_out_dir)',
319 '-s', '<(SHARED_INTERMEDIATE_DIR)',
320 '-x', '<(INTERMEDIATE_DIR)',
327 # This step causes an error to be raised if the .order file
328 # does not account for all global text symbols. It
329 # validates the completeness of the .order file.
330 'postbuild_name': 'Verify global text symbol order',
332 'verify_order_path': 'tools/build/mac/verify_order',
335 '<(verify_order_path)',
337 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
341 # Modify the Info.plist as needed. The script explains why
342 # this is needed. This is also done in the chrome target.
343 # The framework needs the Breakpad and Keystone keys if
344 # those features are enabled. It doesn't currently use the
345 # Subversion keys for anything, but this seems like a really
346 # good place to store them.
347 'postbuild_name': 'Tweak Info.plist',
348 'action': ['<(tweak_info_plist_path)',
356 'postbuild_name': 'Symlink Libraries',
360 'Versions/Current/Libraries',
361 '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Libraries'
367 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
369 '<(PRODUCT_DIR)/resources/inspector/'
372 ['mac_breakpad==1', {
374 '<(PRODUCT_DIR)/crash_inspector',
375 '<(PRODUCT_DIR)/crash_report_sender.app'
382 '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
384 # TODO(ajwong): Find a way to share this path with
385 # ffmpeg.gyp so they don't diverge. (BUG=23602)
386 '<(PRODUCT_DIR)/libffmpegsumo.dylib',
391 ['mac_breakpad==1', {
393 # A real .dSYM is needed for dump_syms to operate on.
397 'app/breakpad_mac.mm',
398 'app/breakpad_mac.h',
401 '../breakpad/breakpad.gyp:breakpad',
403 }, { # else: mac_breakpad!=1
404 # No Breakpad, put in the stubs.
406 'app/breakpad_mac_stubs.mm',
407 'app/breakpad_mac.h',
410 ['mac_keystone==1', {
413 ['branding=="Chrome"', {
414 'theme_dir_name': 'google_chrome',
415 }, { # else: 'branding!="Chrome"
416 'theme_dir_name': 'chromium',
420 'mac_bundle_resources': [
421 # This image is used to badge the lock icon in the
422 # promotion authentication dialog. It needs to exist as
423 # a file on disk and not just something in a resource
424 # bundle because that's the interface that Authorization
425 # Services uses. Also, Authorization Services can't deal
427 'app/theme/<(theme_dir_name)/product_logo_32.png',
429 'browser/cocoa/keystone_promote_preflight.sh',
430 'browser/cocoa/keystone_promote_postflight.sh',
434 'postbuild_name': 'Copy KeystoneRegistration.framework',
436 'tools/build/mac/copy_framework_unversioned',
437 '../third_party/googlemac/Releases/Keystone/KeystoneRegistration.framework',
438 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks',
442 'postbuild_name': 'Symlink Frameworks',
446 'Versions/Current/Frameworks',
447 '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Frameworks'
455 }, # target chrome_dll
457 }], # OS=="mac" or OS=="win"
461 'target_name': 'chrome_dll_nacl_win64',
462 'type': 'shared_library',
463 'product_name': 'chrome_nacl_win64',
464 'msvs_guid': 'F5B2D851-1279-4CE1-9386-AB7C6433551B',
466 'chrome_dll_target': 1,
472 '<@(nacl_win64_dependencies)',
473 'chrome_dll_version',
477 '<@(nacl_win64_defines)',
480 'app/chrome_dll_main.cc',
481 'app/chrome_dll_resource.h',
482 'browser/renderer_host/render_process_host_dummy.cc',
483 '<(SHARED_INTERMEDIATE_DIR)/chrome_dll_version/chrome_dll_version.rc',
485 # TODO: It would be nice to have these pulled in
486 # automatically from direct_dependent_settings in
487 # their various targets (net.gyp:net_resources, etc.),
488 # but that causes errors in other targets when
489 # resulting .res files get referenced multiple times.
490 '<(SHARED_INTERMEDIATE_DIR)/app/app_resources/app_resources.rc',
491 '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
493 # TODO(sgk): left-over from pre-gyp build, figure out
494 # if we still need them and/or how to update to gyp.
495 #'app/check_dependents.bat',
496 #'app/chrome.dll.deps',
498 # Stub entry points for process types that are not supported
499 # by NaCl Win64 executable
500 'app/dummy_main_functions.cc',
504 'ImportLibrary': '$(OutDir)\\lib\\chrome_dll_nacl_win64.lib',
505 'ProgramDatabaseFile': '$(OutDir)\\chrome_dll_nacl_win64.pdb',
510 'msvs_target_platform': 'x64',
513 }, # target chrome_dll