OLD | NEW |
---|---|
1 import("../vulcanize.gni") | 1 import("../vulcanize.gni") |
2 import("//tools/grit/grit_rule.gni") | 2 import("//tools/grit/grit_rule.gni") |
3 import("//chrome/common/features.gni") | 3 import("//chrome/common/features.gni") |
4 | 4 |
5 vulcanized_unbuilt = "vulcanized.unbuilt.html" | 5 vulcanized_unbuilt = "vulcanized.unbuilt.html" |
6 settings_pak_file = "settings_resources.pak" | |
7 unpack_pak_folder = "settings_resources.unpak" | |
Dan Beam
2017/03/10 00:10:32
nit: unpack_pak -> unpak everywhere? ;)
dpapad
2017/03/10 01:42:31
Done (except from renaming unpack_pak.py itself).
| |
6 | 8 |
7 vulcanize("vulcanize") { | 9 vulcanize("vulcanize") { |
8 host = "md-settings" | 10 host = "md-settings" |
9 html_in_file = "settings.html" | 11 html_in_file = "settings.html" |
10 html_out_file = vulcanized_unbuilt | 12 html_out_file = vulcanized_unbuilt |
11 insert_in_head = "<base href=\"chrome://\$i18n{hostname}\">" | 13 insert_in_head = "<base href=\"chrome://\$i18n{hostname}\">" |
12 input = rebase_path(root_gen_dir, root_build_dir) + | 14 input = rebase_path("$target_gen_dir/$unpack_pak_folder", root_build_dir) |
13 "/chrome/browser/resources/settings/settings_resources.pak" | |
14 js_out_file = "crisper.js" | 15 js_out_file = "crisper.js" |
15 | 16 |
16 deps = [ | 17 deps = [ |
18 ":unpack", | |
19 ] | |
20 } | |
21 | |
22 unpack_pak("unpack") { | |
23 pak_file = settings_pak_file | |
24 out_folder = unpack_pak_folder | |
25 | |
26 deps = [ | |
17 ":flattened_resources", | 27 ":flattened_resources", |
18 ] | 28 ] |
19 } | 29 } |
20 | 30 |
21 polymer_css_build("build") { | 31 polymer_css_build("build") { |
22 input_files = [ vulcanized_unbuilt ] | 32 input_files = [ vulcanized_unbuilt ] |
23 output_files = [ "vulcanized.html" ] | 33 output_files = [ "vulcanized.html" ] |
24 deps = [ | 34 deps = [ |
25 ":vulcanize", | 35 ":vulcanize", |
26 ] | 36 ] |
27 } | 37 } |
28 | 38 |
29 grit("flattened_resources") { | 39 grit("flattened_resources") { |
30 source = "settings_resources.grd" | 40 source = "settings_resources.grd" |
31 | 41 |
32 # TODO(thestig): use_qualified_include = true | 42 # TODO(thestig): use_qualified_include = true |
33 defines = chrome_grit_defines | 43 defines = chrome_grit_defines |
34 outputs = [ | 44 outputs = [ |
35 "grit/settings_resources.h", | 45 "grit/settings_resources.h", |
36 "grit/settings_resources_map.cc", | 46 "grit/settings_resources_map.cc", |
37 "grit/settings_resources_map.h", | 47 "grit/settings_resources_map.h", |
38 "settings_resources.pak", | 48 settings_pak_file, |
39 ] | 49 ] |
40 output_dir = "$root_gen_dir/chrome/browser/resources/settings" | 50 output_dir = "$root_gen_dir/chrome/browser/resources/settings" |
41 } | 51 } |
OLD | NEW |