OLD | NEW |
---|---|
(Empty) | |
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 | |
3 # found in the LICENSE file. | |
4 | |
5 import("//remoting/build/config/remoting_build.gni") | |
6 import("//build/toolchain/win/midl.gni") | |
7 import("//build/win/message_compiler.gni") | |
8 | |
9 action("remoting_me2me_host_archive") { | |
10 script = "//remoting/host/installer/build-installer-archive.py" | |
11 | |
12 deps = [ | |
13 "//remoting/host:remoting_native_messaging_manifests", | |
14 "//remoting/host:remoting_start_host", | |
15 "//remoting/host/installer:credits", | |
16 "//remoting/host/it2me:remote_assistance_host", | |
17 "//remoting/host/win:remoting_core", | |
18 "//remoting/host/win:remoting_desktop", | |
19 "//remoting/host/win:remoting_me2me_host", | |
20 "//remoting/host/win:remoting_native_messaging_host", | |
21 "//third_party/icu:icudata", | |
22 ] | |
23 | |
24 public_deps = [ | |
25 "//remoting/host/security_key:remote_security_key", | |
26 ] | |
27 | |
28 _output = "$root_out_dir/remoting-me2me-host-$target_os.zip" | |
29 | |
30 outputs = [ | |
31 _output, | |
32 ] | |
33 if (is_chrome_branded) { | |
34 _branding = "Chrome" | |
35 } else { | |
36 _branding = "Chromium" | |
37 } | |
38 | |
39 if (is_official_build) { | |
40 _official_build = "1" | |
41 } else { | |
42 _official_build = "0" | |
43 } | |
44 | |
45 # TODO(brettw) these should not be generated via exec_script. This should be | |
46 # part of the build process rather than the metabuild. Instead, a script | |
47 # should generate a header containing the #defines for this as well as the | |
48 # IDL file with the values. | |
49 clsids = exec_script("//remoting/host/win/get_clsids.py", | |
50 [ | |
51 daemon_controller_guid, | |
52 rdp_desktop_session_guid, | |
53 chrome_version_full, | |
54 ], | |
55 "value") | |
56 daemon_controller_clsid = clsids[0] | |
57 rdp_desktop_session_clsid = clsids[1] | |
58 | |
59 # Due to GN build issue http://crbug.com/633650, we need to actively set | |
60 # inputs parameter to tell GN to depend on these files. So change to each | |
61 # following files will trigger this target to be rebuilt. | |
62 # TODO(zijiehe): Remove inputs parameter once bug 633650 has been | |
63 # addressed. | |
64 inputs = [ | |
65 "$root_out_dir/remote_assistance_host.exe", | |
66 "$root_out_dir/remote_security_key.exe", | |
67 "$root_out_dir/remoting_core.dll", | |
68 "$root_out_dir/remoting_desktop.exe", | |
69 "$root_out_dir/remoting_host.exe", | |
70 "$root_out_dir/remoting_native_messaging_host.exe", | |
71 "$root_out_dir/remoting_start_host.exe", | |
72 "$root_gen_dir/remoting/CREDITS.txt", | |
73 "$root_out_dir/remoting/com.google.chrome.remote_assistance.json", | |
74 "$root_out_dir/remoting/com.google.chrome.remote_desktop.json", | |
75 "$root_out_dir/icudtl.dat", | |
76 ] | |
77 | |
78 _generated_files = rebase_path(inputs, root_build_dir) | |
79 _generated_files += [ rebase_path("//remoting/resources/chromoting.ico") ] | |
80 | |
81 # _generated_dst_files must contain the same files in the same order as | |
82 # _generated_files, otherwise the Windows MSI will not be built correctly. | |
83 _generated_dst_files = [ | |
84 "files/remote_assistance_host.exe", | |
85 "files/remote_security_key.exe", | |
86 "files/remoting_core.dll", | |
87 "files/remoting_desktop.exe", | |
88 "files/remoting_host.exe", | |
89 "files/remoting_native_messaging_host.exe", | |
90 "files/remoting_start_host.exe", | |
91 "files/CREDITS.txt", | |
92 "files/com.google.chrome.remote_assistance.json", | |
93 "files/com.google.chrome.remote_desktop.json", | |
94 "files/icudtl.dat", | |
95 "files/chromoting.ico", | |
96 ] | |
97 | |
98 args = [ | |
99 rebase_path("$root_gen_dir/remoting_installation", root_build_dir), | |
100 rebase_path(_output, root_build_dir), | |
101 "--source-file-roots", | |
102 rebase_path("//remoting/host/installer/win"), | |
103 "--source-files", | |
104 rebase_path("//remoting/host/installer/win/chromoting.wxs"), | |
105 rebase_path("//remoting/host/installer/win/parameters.json"), | |
106 | |
107 # Input files | |
108 "--generated-files", | |
109 ] + _generated_files + | |
110 [ | |
111 # Position of files in zip file | |
112 "--generated-files-dst", | |
113 ] + _generated_dst_files + | |
114 [ | |
115 # Defs | |
116 "--defs", | |
117 "BRANDING=$_branding", | |
118 "DAEMON_CONTROLLER_CLSID={$daemon_controller_clsid}", | |
119 "RDP_DESKTOP_SESSION_CLSID={$rdp_desktop_session_clsid}", | |
120 "VERSION=$chrome_version_full", | |
121 "OFFICIAL_BUILD=$_official_build", | |
122 ] | |
123 } | |
124 | |
125 if (is_chrome_branded) { | |
126 # We do not release a 64 bits binary. So to avoid any potential | |
127 # misunderstanding, we only build 32 bits MSI file. | |
128 if (!is_component_build && target_cpu == "x86") { | |
129 # The script uses "ia32" instead of "x86". | |
130 msi_script_arch = "ia32" | |
131 | |
132 action("remoting_host_installation") { | |
Hzj_jie
2016/09/12 22:32:10
GN cannot handle two targets with unique name well
nicholss
2016/09/12 23:01:43
While it is true that GN does not allow duplicate
Hzj_jie
2016/09/12 23:07:22
No, I totally agree to use no-op group target to a
| |
133 deps = [ | |
134 "//remoting/host:remoting_me2me_host_archive", | |
135 ] | |
136 script = "//remoting/tools/zip2msi.py" | |
137 outputs = [ | |
138 "$root_out_dir/chromoting.msi", | |
139 ] | |
140 args = [ | |
141 "--wix_path", | |
142 rebase_path("//third_party/wix"), | |
143 "--intermediate_dir", | |
144 rebase_path("$root_gen_dir/remoting_installation", root_build_dir), | |
145 "--target_arch", | |
146 msi_script_arch, | |
147 rebase_path("$root_out_dir/remoting-me2me-host-$current_os.zip", | |
148 root_build_dir), | |
149 rebase_path(outputs[0], root_build_dir), | |
150 ] | |
151 } | |
152 } | |
153 } else { | |
154 group("remoting_host_installation") { | |
155 } | |
156 } | |
OLD | NEW |