1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
# 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_res = env_res.Clone()
env_res.Append(
CPPPATH = [
'.',
'$CHROME_SRC_DIR/chrome/Debug/obj/chrome_dll',
'$CHROME_SRC_DIR',
'$CHROME_SRC_DIR/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:
res = env_res.RES(rc)
resources.extend(res)
# TODO(sgk): find out why this implicit dependency isn't discovered
env.Depends(res, rc.replace('locale_settings', 'google_chrome_strings'))
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 = []
env_lang = env.Clone()
AddTargetGroup('all_languages', 'resource dlls for languages can be built')
env_lang['COMPONENT_LIBRARY_GROUPS'] = ['all_languages']
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_lang.ChromeSharedLibrary(
lang,
[
g_r_res,
w_s_res,
locale_settings_res,
])
locale_dlls.append(dll)
i = env.Install('$DESTINATION_ROOT/locales/', locale_dlls)
env.Alias('chrome_locales', i)
|