Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Unified Diff: remoting/host/installer/win/BUILD.gn

Issue 2308813002: Moving CRD Windows targets to subdirectories. (Closed)
Patch Set: Correcting format. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/host/installer/win/BUILD.gn
diff --git a/remoting/host/installer/win/BUILD.gn b/remoting/host/installer/win/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..a151461ae8a433c369892f653d2a8b7183f7b237
--- /dev/null
+++ b/remoting/host/installer/win/BUILD.gn
@@ -0,0 +1,156 @@
+# Copyright 2016 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("//remoting/build/config/remoting_build.gni")
+import("//build/toolchain/win/midl.gni")
+import("//build/win/message_compiler.gni")
+
+action("remoting_me2me_host_archive") {
+ script = "//remoting/host/installer/build-installer-archive.py"
+
+ deps = [
+ "//remoting/host:remoting_native_messaging_manifests",
+ "//remoting/host:remoting_start_host",
+ "//remoting/host/installer:credits",
+ "//remoting/host/it2me:remote_assistance_host",
+ "//remoting/host/win:remoting_core",
+ "//remoting/host/win:remoting_desktop",
+ "//remoting/host/win:remoting_me2me_host",
+ "//remoting/host/win:remoting_native_messaging_host",
+ "//third_party/icu:icudata",
+ ]
+
+ public_deps = [
+ "//remoting/host/security_key:remote_security_key",
+ ]
+
+ _output = "$root_out_dir/remoting-me2me-host-$target_os.zip"
+
+ outputs = [
+ _output,
+ ]
+ if (is_chrome_branded) {
+ _branding = "Chrome"
+ } else {
+ _branding = "Chromium"
+ }
+
+ if (is_official_build) {
+ _official_build = "1"
+ } else {
+ _official_build = "0"
+ }
+
+ # TODO(brettw) these should not be generated via exec_script. This should be
+ # part of the build process rather than the metabuild. Instead, a script
+ # should generate a header containing the #defines for this as well as the
+ # IDL file with the values.
+ clsids = exec_script("//remoting/host/win/get_clsids.py",
+ [
+ daemon_controller_guid,
+ rdp_desktop_session_guid,
+ chrome_version_full,
+ ],
+ "value")
+ daemon_controller_clsid = clsids[0]
+ rdp_desktop_session_clsid = clsids[1]
+
+ # Due to GN build issue http://crbug.com/633650, we need to actively set
+ # inputs parameter to tell GN to depend on these files. So change to each
+ # following files will trigger this target to be rebuilt.
+ # TODO(zijiehe): Remove inputs parameter once bug 633650 has been
+ # addressed.
+ inputs = [
+ "$root_out_dir/remote_assistance_host.exe",
+ "$root_out_dir/remote_security_key.exe",
+ "$root_out_dir/remoting_core.dll",
+ "$root_out_dir/remoting_desktop.exe",
+ "$root_out_dir/remoting_host.exe",
+ "$root_out_dir/remoting_native_messaging_host.exe",
+ "$root_out_dir/remoting_start_host.exe",
+ "$root_gen_dir/remoting/CREDITS.txt",
+ "$root_out_dir/remoting/com.google.chrome.remote_assistance.json",
+ "$root_out_dir/remoting/com.google.chrome.remote_desktop.json",
+ "$root_out_dir/icudtl.dat",
+ ]
+
+ _generated_files = rebase_path(inputs, root_build_dir)
+ _generated_files += [ rebase_path("//remoting/resources/chromoting.ico") ]
+
+ # _generated_dst_files must contain the same files in the same order as
+ # _generated_files, otherwise the Windows MSI will not be built correctly.
+ _generated_dst_files = [
+ "files/remote_assistance_host.exe",
+ "files/remote_security_key.exe",
+ "files/remoting_core.dll",
+ "files/remoting_desktop.exe",
+ "files/remoting_host.exe",
+ "files/remoting_native_messaging_host.exe",
+ "files/remoting_start_host.exe",
+ "files/CREDITS.txt",
+ "files/com.google.chrome.remote_assistance.json",
+ "files/com.google.chrome.remote_desktop.json",
+ "files/icudtl.dat",
+ "files/chromoting.ico",
+ ]
+
+ args = [
+ rebase_path("$root_gen_dir/remoting_installation", root_build_dir),
+ rebase_path(_output, root_build_dir),
+ "--source-file-roots",
+ rebase_path("//remoting/host/installer/win"),
+ "--source-files",
+ rebase_path("//remoting/host/installer/win/chromoting.wxs"),
+ rebase_path("//remoting/host/installer/win/parameters.json"),
+
+ # Input files
+ "--generated-files",
+ ] + _generated_files +
+ [
+ # Position of files in zip file
+ "--generated-files-dst",
+ ] + _generated_dst_files +
+ [
+ # Defs
+ "--defs",
+ "BRANDING=$_branding",
+ "DAEMON_CONTROLLER_CLSID={$daemon_controller_clsid}",
+ "RDP_DESKTOP_SESSION_CLSID={$rdp_desktop_session_clsid}",
+ "VERSION=$chrome_version_full",
+ "OFFICIAL_BUILD=$_official_build",
+ ]
+}
+
+if (is_chrome_branded) {
+ # We do not release a 64 bits binary. So to avoid any potential
+ # misunderstanding, we only build 32 bits MSI file.
+ if (!is_component_build && target_cpu == "x86") {
+ # The script uses "ia32" instead of "x86".
+ msi_script_arch = "ia32"
+
+ 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
+ deps = [
+ "//remoting/host:remoting_me2me_host_archive",
+ ]
+ script = "//remoting/tools/zip2msi.py"
+ outputs = [
+ "$root_out_dir/chromoting.msi",
+ ]
+ args = [
+ "--wix_path",
+ rebase_path("//third_party/wix"),
+ "--intermediate_dir",
+ rebase_path("$root_gen_dir/remoting_installation", root_build_dir),
+ "--target_arch",
+ msi_script_arch,
+ rebase_path("$root_out_dir/remoting-me2me-host-$current_os.zip",
+ root_build_dir),
+ rebase_path(outputs[0], root_build_dir),
+ ]
+ }
+ }
+} else {
+ group("remoting_host_installation") {
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698