OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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("//tools/grit/repack.gni") | |
6 import("//build/config/ios/rules.gni") | 5 import("//build/config/ios/rules.gni") |
7 | 6 |
8 ios_app_bundle("ios_web_view_shell") { | 7 ios_app_bundle("ios_web_view_shell") { |
9 info_plist = "Info.plist" | 8 info_plist = "Info.plist" |
10 | 9 |
11 deps = [ | 10 deps = [ |
12 ":shell", | 11 ":shell", |
| 12 "//ios/web_view", |
| 13 "//ios/web_view:web_view+link", |
13 ] | 14 ] |
14 bundle_deps = [ | 15 bundle_deps = [ "//ios/web_view:web_view+bundle" ] |
15 ":resources", | |
16 ":packed_resources", | |
17 ] | |
18 | 16 |
19 configs += [ "//build/config/compiler:enable_arc" ] | 17 configs += [ "//build/config/compiler:enable_arc" ] |
20 } | 18 } |
21 | 19 |
22 source_set("shell") { | 20 source_set("shell") { |
23 sources = [ | 21 sources = [ |
24 "shell_app_delegate.h", | 22 "shell_app_delegate.h", |
25 "shell_app_delegate.m", | 23 "shell_app_delegate.m", |
26 "shell_delegate.h", | 24 "shell_delegate.h", |
27 "shell_delegate.m", | 25 "shell_delegate.m", |
28 "shell_exe_main.m", | 26 "shell_exe_main.m", |
29 "shell_view_controller.h", | 27 "shell_view_controller.h", |
30 "shell_view_controller.m", | 28 "shell_view_controller.m", |
31 "translate_controller.h", | 29 "translate_controller.h", |
32 "translate_controller.m", | 30 "translate_controller.m", |
33 ] | 31 ] |
34 | 32 |
35 deps = [ | 33 deps = [ |
36 "//base", | 34 ":resources", |
37 "//ios/web_view", | 35 "//ios/web_view", |
38 ] | 36 ] |
39 | 37 |
40 libs = [ | 38 libs = [ |
41 "CFNetwork.framework", | 39 "CFNetwork.framework", |
42 "CoreFoundation.framework", | 40 "CoreFoundation.framework", |
43 "CoreGraphics.framework", | 41 "CoreGraphics.framework", |
44 "CoreText.framework", | 42 "CoreText.framework", |
45 "Foundation.framework", | 43 "Foundation.framework", |
46 "ImageIO.framework", | 44 "ImageIO.framework", |
47 "MobileCoreServices.framework", | 45 "MobileCoreServices.framework", |
48 "Security.framework", | 46 "Security.framework", |
49 "SystemConfiguration.framework", | 47 "SystemConfiguration.framework", |
50 "UIKit.framework", | 48 "UIKit.framework", |
51 "WebKit.framework", | 49 "WebKit.framework", |
52 "resolv", | 50 "resolv", |
53 ] | 51 ] |
54 | 52 |
55 configs += [ "//build/config/compiler:enable_arc" ] | 53 configs += [ "//build/config/compiler:enable_arc" ] |
56 } | 54 } |
57 | 55 |
58 bundle_data("resources") { | 56 bundle_data("resources") { |
59 visibility = [ ":ios_web_view_shell" ] | 57 visibility = [ ":shell" ] |
60 sources = [ | 58 sources = [ |
61 "Default-568h@2x.png", | 59 "Default-568h@2x.png", |
62 "textfield_background@2x.png", | 60 "textfield_background@2x.png", |
63 "toolbar_back@2x.png", | 61 "toolbar_back@2x.png", |
64 "toolbar_forward@2x.png", | 62 "toolbar_forward@2x.png", |
65 "toolbar_stop@2x.png", | 63 "toolbar_stop@2x.png", |
66 ] | 64 ] |
67 outputs = [ | 65 outputs = [ |
68 "{{bundle_resources_dir}}/{{source_file_part}}", | 66 "{{bundle_resources_dir}}/{{source_file_part}}", |
69 ] | 67 ] |
70 } | 68 } |
71 | |
72 repack("repack_resources") { | |
73 visibility = [ ":packed_resources" ] | |
74 deps = [ | |
75 "//components/resources:components_resources", | |
76 ] | |
77 sources = [ | |
78 "$root_gen_dir/components/components_resources.pak", | |
79 ] | |
80 output = "$target_gen_dir/web_view_resources.pak" | |
81 } | |
82 | |
83 bundle_data("packed_resources") { | |
84 visibility = [ ":ios_web_view_shell" ] | |
85 public_deps = [ | |
86 ":repack_resources", | |
87 ] | |
88 sources = [ | |
89 "$target_gen_dir/web_view_resources.pak", | |
90 ] | |
91 outputs = [ | |
92 "{{bundle_resources_dir}}/{{source_file_part}}", | |
93 ] | |
94 } | |
OLD | NEW |