| OLD | NEW |
| 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 Import(['env', 'env_res']) | 5 Import(['env', 'env_res']) |
| 6 | 6 |
| 7 env = env.Clone() | |
| 8 env_res = env_res.Clone() | 7 env_res = env_res.Clone() |
| 9 | 8 |
| 10 env_res.Append( | 9 env_res.Append( |
| 11 CPPPATH = [ | 10 CPPPATH = [ |
| 12 '.', | 11 '.', |
| 13 '$CHROME_SRC_DIR/chrome/Debug/obj/chrome_dll', | 12 '$CHROME_SRC_DIR/chrome/Debug/obj/chrome_dll', |
| 14 '$CHROME_SRC_DIR', | 13 '$CHROME_SRC_DIR', |
| 15 '$CHROME_SRC_DIR/chrome/Debug/obj', | 14 '$CHROME_SRC_DIR/chrome/Debug/obj', |
| 16 ], | 15 ], |
| 17 RCFLAGS = [ | 16 RCFLAGS = [ |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 ], | 87 ], |
| 89 PDB = '${TARGET}.pdb', | 88 PDB = '${TARGET}.pdb', |
| 90 no_import_lib = True, # We don't need the .lib and .exp. | 89 no_import_lib = True, # We don't need the .lib and .exp. |
| 91 ) | 90 ) |
| 92 | 91 |
| 93 import re | 92 import re |
| 94 extract_lang = re.compile(r'locale_settings_(.*)\.res') | 93 extract_lang = re.compile(r'locale_settings_(.*)\.res') |
| 95 | 94 |
| 96 locale_dlls = [] | 95 locale_dlls = [] |
| 97 | 96 |
| 97 env_lang = env.Clone() |
| 98 AddTargetGroup('all_languages', 'resource dlls for languages can be built') |
| 99 env_lang['COMPONENT_LIBRARY_GROUPS'] = ['all_languages'] |
| 100 |
| 98 for locale_settings_res in resources: | 101 for locale_settings_res in resources: |
| 99 s = str(locale_settings_res) | 102 s = str(locale_settings_res) |
| 100 #lang = '$CHROME_DIR/locales/' + extract_lang.match(s).group(1) | 103 #lang = '$CHROME_DIR/locales/' + extract_lang.match(s).group(1) |
| 101 lang = extract_lang.match(s).group(1) | 104 lang = extract_lang.match(s).group(1) |
| 102 g_r_res = s.replace('locale_settings', 'generated_resources') | 105 g_r_res = s.replace('locale_settings', 'generated_resources') |
| 103 w_s_res = s.replace('locale_settings', | 106 w_s_res = s.replace('locale_settings', |
| 104 '$WEBKIT_DIR/build/localized_strings/webkit_strings') | 107 '$WEBKIT_DIR/build/localized_strings/webkit_strings') |
| 105 dll = env.ChromeSharedLibrary( | 108 dll = env_lang.ChromeSharedLibrary( |
| 106 lang, | 109 lang, |
| 107 [ | 110 [ |
| 108 g_r_res, | 111 g_r_res, |
| 109 w_s_res, | 112 w_s_res, |
| 110 locale_settings_res, | 113 locale_settings_res, |
| 111 ]) | 114 ]) |
| 112 | 115 |
| 113 locale_dlls.append(dll) | 116 locale_dlls.append(dll) |
| 114 | 117 |
| 115 i = env.Install('$TARGET_ROOT/locales/', locale_dlls) | 118 i = env.Install('$TARGET_ROOT/locales/', locale_dlls) |
| 116 env.Alias('chrome', i) | 119 env.Alias('chrome', i) |
| 117 | |
| OLD | NEW |