blob: c3f1391c2714a6a4fd71ee18582c314d9d4f84bb [file] [log] [blame]
# Copyright (c) 2006-2008 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.
Import(['env', 'env_res'])
AddTargetGroup('all_languages', 'resource dlls for languages can be built')
env_res = env_res.Clone()
env.Append(
LINKFLAGS = [
'/INCREMENTAL:NO',
'/DELAYLOAD:"dwmapi.dll"',
'/DELAYLOAD:"uxtheme.dll"',
'/NOENTRY',
'/BASE:"0x3CF00000"',
'/MACHINE:X86',
'/FIXED:No',
'/safeseh',
'/dynamicbase',
'/ignore:4199',
'/nxcompat',
],
PDB = '${TARGET}.pdb',
no_import_lib = True, # We don't need the .lib and .exp.
)
env_res.Append(
CPPPATH = [
'.',
'$CHROME_SRC_DIR/chrome/Debug/obj/chrome_dll',
'$CHROME_SRC_DIR',
'$CHROME_SRC_DIR/chrome/Debug/obj',
],
RCFLAGS = [
['/l', '0x409'],
['/I', '$TARGET_ROOT/grit_derived_sources'],
],
)
env_dll = env.Clone(COMPONENT_LIBRARY_GROUPS = ['all_languages'])
locale_list = [
'ar',
'bg',
'bn',
'ca',
'cs',
'da',
'de',
'el',
'en-GB',
'en-US',
'es-419',
'es',
'et',
'fi',
'fil',
'fr',
'gu',
'he',
'hi',
'hr',
'hu',
'id',
'it',
'ja',
'kn',
'ko',
'lt',
'lv',
'ml',
'mr',
'nb',
'nl',
'or',
'pl',
'pt-BR',
'pt-PT',
'ro',
'ru',
'sk',
'sl',
'sr',
'sv',
'ta',
'te',
'th',
'tr',
'uk',
'vi',
'zh-CN',
'zh-TW',
]
# TODO(sgk): remove these when we no longer want to worry about
# consistent GUIDs in the .vcproj files from checkin to checkin.
locale_GUIDMap = {
'ar' : '{3AB90E6A-56FF-4C9D-B918-AB76DDBF8BE8}',
'bg' : '{5BDB7EE1-A1FD-410C-9598-21519A1B7952}',
'bn' : '{4B60E8B8-416F-40B2-8A54-F75970A21992}',
'ca' : '{F7790A54-4078-4E4A-8231-818BE9FB1F94}',
'cs' : '{7EA8C4AB-F9C6-4FA1-8B0A-74F5650430B2}',
'da' : '{A493331B-3180-49FE-8D0E-D121645E63AD}',
'de' : '{BA62FF5E-08A6-4102-9675-C12E8C9D4CC0}',
'el' : '{D314F1B3-9299-4866-8362-08BF811B0FA3}',
'en-GB' : '{34231B28-C51C-4C1C-AF07-C763668B1404}',
'en-US' : '{CAE2D1E6-3F19-492F-A35C-68AA7ACAD6D3}',
'es-419' : '{FA660037-EB40-4A43-AA9D-9653C57F2789}',
'es' : '{5AEA4BF6-27CD-47FC-9370-D87771CFA196}',
'et' : '{0557BC3C-DE87-4127-BDAA-9BD9BDB13FB4}',
'fi' : '{64D81334-DE73-457D-8FC1-9492508A2663}',
'fil' : '{3A932C39-AFA9-4BDC-B775-F71A426D04BF}',
'fr' : '{0D54A5C4-B78B-41A2-BF8A-5DA48AC90495}',
'gu' : '{256DECCE-9886-4C21-96A5-EE47DF5E07E9}',
'he' : '{A28310B8-7BD0-4CDF-A7D8-59CAB42AA1C4}',
'hi' : '{228DD844-9926-420E-B193-6973BF2A4D0B}',
'hr' : '{CE1426F6-7D2B-4574-9929-58387BF7B05F}',
'hu' : '{AFF332BF-AF3D-4D35-86FC-42A727F01D36}',
'id' : '{E3DF045F-2174-4685-9CF7-0630A79F324B}',
'it' : '{275F2993-EE9B-4E00-9C85-10A182FD423A}',
'ja' : '{B2D715CE-4CBB-415A-A032-E700C90ADF91}',
'kn' : '{3E6B24F6-9FA9-4066-859E-BF747FA3080A}',
'ko' : '{32167995-4014-4E4C-983B-F7E17C24EB25}',
'lt' : '{80E37CB5-059D-4F4B-AEF6-08265468D368}',
'lv' : '{A5C5D801-4026-49F2-BBF1-250941855306}',
'ml' : '{CAB69303-0F02-4C68-A12E-FFE55DB52526}',
'mr' : '{A464166F-8507-49B4-9B02-5CB77C498B25}',
'nb' : '{B30B0E1F-1CE9-4DEF-A752-7498FD709C1F}',
'nl' : '{63011A7B-CE4D-4DF1-B5DA-1B133C14A2E8}',
'or' : '{E07D267C-34C3-4DDB-8B41-94697808714A}',
'pl' : '{9F53807E-9382-47BD-8371-E5D04F517E9C}',
'pt-BR' : '{2F914112-2657-49EC-8EA6-3BA63340DE27}',
'pt-PT' : '{0A13F602-B497-4BC1-ABD8-03CA8E95B2AF}',
'ro' : '{C70D3509-57C4-4326-90C1-2EC0AE34848D}',
'ru' : '{7D456640-3619-4D23-A56D-E0084400CCBF}',
'sk' : '{82F5BFE5-FDCE-47D4-8B38-BEEBED561681}',
'sl' : '{C2A444C2-9D74-4AD7-AE7C-04F5EDA17060}',
'sr' : '{300C6A09-663E-48B6-8E07-A0D50CAF8F25}',
'sv' : '{B0D5BD91-6153-4CA6-BC2F-4E3BD43E5DB7}',
'ta' : '{7A0BA0C5-0D90-49AE-919A-4BE096F69E4F}',
'te' : '{9D13D9B8-6C28-42A7-935C-B769EBC55BAA}',
'th' : '{226B3533-1FF3-42F6-A8E3-C4DDBC955290}',
'tr' : '{65C78BBB-8FCB-48E4-94C8-1F0F981929AF}',
'uk' : '{182D578D-2DAC-4BB7-AFEC-9A2855E56F94}',
'vi' : '{DA5C6FCB-FCFD-49B8-8DDA-8351638096DB}',
'zh-CN' : '{C0C7DA58-C90D-4BDE-AE44-588997339F5D}',
'zh-TW' : '{E7B11CF0-FE40-4A69-AE20-1B882F4D7585}',
}
gcs_rc = '$TARGET_ROOT/grit_derived_sources/google_chrome_strings_%s.rc'
cs_rc = '$TARGET_ROOT/grit_derived_sources/chromium_strings_%s.rc'
gr_res = '$TARGET_ROOT/grit_derived_sources/generated_resources_%s.res'
ws_res = '$TARGET_ROOT/grit_derived_sources/webkit_strings_%s.res'
dest_vcproj = '$CHROME_SRC_DIR/chrome/app/locales/%s.vcproj'
locale_dlls = []
for locale in locale_list:
res = env_res.RES('locale_settings_%s.rc' % locale)
# TODO(sgk): find out why this implicit dependency isn't discovered
env.Depends(res, gcs_rc % locale)
env.Depends(res, cs_rc % locale)
dll = env_dll.ChromeSharedLibrary(locale,
[ gr_res % locale,
res,
ws_res % locale])
locale_dlls.append(dll)
p = env.ChromeMSVSProject('../locales/%s.vcproj' % locale,
dest=dest_vcproj % locale,
guid=locale_GUIDMap.get(locale),
buildtargets=dll,
relative_path_substitutions = [
('../../../..', '$(OutDir)'),
],
tools=[
'VCPreBuildEventTool',
'VCCustomBuildTool',
'VCXMLDataGeneratorTool',
'VCWebServiceProxyGeneratorTool',
'VCMIDLTool',
'VCCLCompilerTool',
'VCManagedResourceCompilerTool',
'VCResourceCompilerTool',
'VCPreLinkEventTool',
'VCLinkerTool',
'VCALinkTool',
'VCManifestTool',
'VCXDCMakeTool',
'VCBscMakeTool',
'VCFxCopTool',
'VCAppVerifierTool',
'VCWebDeploymentTool',
'VCPostBuildEventTool',
],
ConfigurationType='2')
if locale == 'en-US':
kw = {'CharacterSet' : '1'}
else:
kw = {}
p.AddConfig('Debug|Win32',
InheritedPropertySheets=[
'$(SolutionDir)../build/common.vsprops',
'$(SolutionDir)../build/debug.vsprops',
'../../tools/build/win/data_dll.vsprops',
'../../tools/build/win/language_dll.vsprops',
],
**kw)
p.AddConfig('Release|Win32',
InheritedPropertySheets=[
'$(SolutionDir)../build/common.vsprops',
'$(SolutionDir)../build/release.vsprops',
'../../tools/build/win/data_dll.vsprops',
'../../tools/build/win/language_dll.vsprops',
],
**kw)
i = env.Install('$DESTINATION_ROOT/locales/', locale_dlls)
env.Alias('chrome_locales', i)