# 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']) env = env.Clone() env_res = env_res.Clone() env_res.Append( CPPPATH = [ '.', '#/../chrome/Debug/obj/chrome_dll', '#/..', '#/../chrome/Debug/obj', ], RCFLAGS = [ ['/l', '0x409'], ], ) rc_files = [ 'locale_settings_ar.rc', 'locale_settings_bg.rc', 'locale_settings_ca.rc', 'locale_settings_cs.rc', 'locale_settings_da.rc', 'locale_settings_de.rc', 'locale_settings_el.rc', 'locale_settings_en-GB.rc', 'locale_settings_en-US.rc', 'locale_settings_es-419.rc', 'locale_settings_es.rc', 'locale_settings_et.rc', 'locale_settings_fi.rc', 'locale_settings_fil.rc', 'locale_settings_fr.rc', 'locale_settings_he.rc', 'locale_settings_hi.rc', 'locale_settings_hr.rc', 'locale_settings_hu.rc', 'locale_settings_id.rc', 'locale_settings_it.rc', 'locale_settings_ja.rc', 'locale_settings_ko.rc', 'locale_settings_lt.rc', 'locale_settings_lv.rc', 'locale_settings_nb.rc', 'locale_settings_nl.rc', 'locale_settings_pl.rc', 'locale_settings_pt-BR.rc', 'locale_settings_pt-PT.rc', 'locale_settings_ro.rc', 'locale_settings_ru.rc', 'locale_settings_sk.rc', 'locale_settings_sl.rc', 'locale_settings_sr.rc', 'locale_settings_sv.rc', 'locale_settings_th.rc', 'locale_settings_tr.rc', 'locale_settings_uk.rc', 'locale_settings_vi.rc', 'locale_settings_zh-CN.rc', 'locale_settings_zh-TW.rc', ] resources = [] for rc in rc_files: resources.extend(env_res.RES(rc)) 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. ) import re extract_lang = re.compile(r'locale_settings_(.*)\.res') locale_dlls = [] for locale_settings_res in resources: s = str(locale_settings_res) #lang = '$CHROME_DIR/locales/' + extract_lang.match(s).group(1) lang = extract_lang.match(s).group(1) g_r_res = s.replace('locale_settings', 'generated_resources') w_s_res = s.replace('locale_settings', '$WEBKIT_DIR/build/localized_strings/webkit_strings') dll = env.ChromeSharedLibrary( lang, [ g_r_res, w_s_res, locale_settings_res, ]) locale_dlls.append(dll) i = env.Install('$TARGET_ROOT/locales/', locale_dlls) env.Alias('chrome', i)