| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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("//build/config/features.gni") | 5 import("//build/config/features.gni") |
| 6 import("//build/config/ui.gni") | 6 import("//build/config/ui.gni") |
| 7 import("//build/config/win/manifest.gni") | 7 import("//build/config/win/manifest.gni") |
| 8 import("//build/util/version.gni") | 8 import("//build/util/version.gni") |
| 9 import("//chrome/version.gni") |
| 9 import("//remoting/remoting_enable.gni") | 10 import("//remoting/remoting_enable.gni") |
| 10 import("//remoting/remoting_locales.gni") | 11 import("//remoting/remoting_locales.gni") |
| 11 import("//remoting/remoting_options.gni") | 12 import("//remoting/remoting_options.gni") |
| 12 import("//remoting/remoting_srcs.gni") | 13 import("//remoting/remoting_srcs.gni") |
| 13 import("//remoting/remoting_version.gni") | 14 import("//remoting/remoting_version.gni") |
| 14 import("//remoting/tools/build/remoting_localize.gni") | 15 import("//remoting/tools/build/remoting_localize.gni") |
| 15 | 16 |
| 17 process_version("remoting_version") { |
| 18 template_file = "//remoting/host/version.h.in" |
| 19 sources = [ |
| 20 branding_path, |
| 21 ] |
| 22 output = "$target_gen_dir/version.h" |
| 23 } |
| 24 |
| 16 if (is_win) { | 25 if (is_win) { |
| 17 import("//remoting/host/predefines_win.gni") | 26 import("//remoting/host/predefines_win.gni") |
| 18 } | 27 } |
| 19 | 28 |
| 20 # Reference this manifest to indicate that a process is per-monitor DPI aware. | 29 # Reference this manifest to indicate that a process is per-monitor DPI aware. |
| 21 dpi_aware_manifest = "//remoting/host/win/dpi_aware.manifest" | 30 dpi_aware_manifest = "//remoting/host/win/dpi_aware.manifest" |
| 22 | 31 |
| 23 # Depending on this target gives a default executable manifest with the addition | 32 # Depending on this target gives a default executable manifest with the addition |
| 24 # of the DPI aware tag. | 33 # of the DPI aware tag. |
| 25 windows_manifest("dpi_aware_exe_manifest") { | 34 windows_manifest("dpi_aware_exe_manifest") { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 args = [ | 74 args = [ |
| 66 "credits", | 75 "credits", |
| 67 rebase_path(about_credits_file, root_build_dir), | 76 rebase_path(about_credits_file, root_build_dir), |
| 68 "--file-template", | 77 "--file-template", |
| 69 rebase_path("installer/credits.tmpl", root_build_dir), | 78 rebase_path("installer/credits.tmpl", root_build_dir), |
| 70 "--entry-template", | 79 "--entry-template", |
| 71 rebase_path("installer/credits_entry.tmpl", root_build_dir), | 80 rebase_path("installer/credits_entry.tmpl", root_build_dir), |
| 72 ] | 81 ] |
| 73 } | 82 } |
| 74 | 83 |
| 75 if (is_mac) { | 84 # This must be a static library instead of a source set because |
| 76 # TODO(GYP) Mac build of remoting host, https://crbug.com/611859 | 85 # remoting_unittests requires that remoting_me2me_host.cc not be pulled in, |
| 77 # If you fix this, also enable in //remoting/remoting_enable.gni | 86 # which in turn depends on remoting_me2me_host_static which isn't part of that |
| 78 # on mac. | 87 # build. |
| 79 group("host") { | 88 # |
| 80 } | 89 # TODO fix this, successful builds should not depend on static libraries |
| 81 group("test_support") { | 90 # stripping code. |
| 82 } | 91 static_library("host") { |
| 83 group("unit_tests") { | 92 sources = rebase_path(remoting_host_srcs_gypi_values.remoting_host_sources, |
| 84 } | 93 ".", |
| 85 } else { | 94 "//remoting") |
| 86 # This must be a static library instead of a source set because | 95 |
| 87 # remoting_unittests requires that remoting_me2me_host.cc not be pulled in, | 96 libs = [] |
| 88 # which in turn depends on remoting_me2me_host_static which isn't part of that | 97 |
| 89 # build. | 98 configs += [ |
| 90 # | 99 "//build/config/compiler:wexit_time_destructors", |
| 91 # TODO fix this, successful builds should not depend on static libraries | 100 "//remoting:version", |
| 92 # stripping code. | 101 ] |
| 93 static_library("host") { | 102 |
| 94 sources = rebase_path(remoting_host_srcs_gypi_values.remoting_host_sources, | 103 defines = [ "WEBRTC_CHROMIUM_BUILD" ] |
| 95 ".", | 104 |
| 96 "//remoting") | 105 deps = [ |
| 97 | 106 "//base:i18n", |
| 98 libs = [] | 107 "//components/policy:policy_component_common", |
| 99 | 108 "//crypto", |
| 109 "//google_apis", |
| 110 "//ipc", |
| 111 "//remoting/base", |
| 112 "//remoting/protocol", |
| 113 "//remoting/resources", |
| 114 "//ui/base", |
| 115 "//ui/events:dom_keycode_converter", |
| 116 "//ui/events/platform", |
| 117 ] |
| 118 |
| 119 if (enable_configuration_policy) { |
| 120 deps += [ "//components/policy:policy" ] |
| 121 } |
| 122 |
| 123 if (is_linux && !is_chromeos) { |
| 124 libs += [ "pam" ] |
| 125 } |
| 126 |
| 127 if (use_x11) { |
| 100 configs += [ | 128 configs += [ |
| 101 "//build/config/compiler:wexit_time_destructors", | 129 "//build/config/linux:x11", |
| 102 "//remoting:version", | 130 "//build/config/linux:xrandr", |
| 103 ] | 131 ] |
| 104 | 132 if (is_desktop_linux) { |
| 105 defines = [ "WEBRTC_CHROMIUM_BUILD" ] | 133 deps += [ "//build/config/linux/gtk2" ] |
| 106 | 134 } |
| 107 deps = [ | 135 } else { |
| 108 "//base:i18n", | 136 sources -= [ |
| 109 "//components/policy:policy_component_common", | 137 "clipboard_x11.cc", |
| 110 "//crypto", | 138 "desktop_resizer_x11.cc", |
| 111 "//google_apis", | 139 "input_injector_x11.cc", |
| 112 "//ipc", | 140 "local_input_monitor_x11.cc", |
| 113 "//remoting/base", | 141 ] |
| 114 "//remoting/protocol", | 142 if (is_linux) { |
| 115 "//remoting/resources", | 143 # These will already be filtered out on non-Linux. |
| 116 "//ui/base", | 144 sources -= [ |
| 117 "//ui/events:dom_keycode_converter", | 145 "linux/unicode_to_keysym.cc", |
| 118 "//ui/events/platform", | 146 "linux/x11_util.cc", |
| 119 ] | 147 "linux/x_server_clipboard.cc", |
| 120 | 148 "linux/x_server_clipboard.h", |
| 121 if (enable_configuration_policy) { | 149 ] |
| 122 deps += [ "//components/policy:policy" ] | 150 } |
| 123 } | 151 } |
| 124 | 152 |
| 125 if (is_linux && !is_chromeos) { | 153 if (!use_ozone) { |
| 126 libs += [ "pam" ] | 154 sources -= [ "desktop_resizer_ozone.cc" ] |
| 127 } | 155 } |
| 128 | 156 |
| 129 if (use_x11) { | 157 if (is_chromeos) { |
| 130 configs += [ | 158 # TODO(GYP): crbug.com/481627. These should only be included |
| 131 "//build/config/linux:x11", | 159 # when enable_me2me_host is true. |
| 132 "//build/config/linux:xrandr", | 160 sources -= [ |
| 133 ] | 161 "me2me_desktop_environment.cc", |
| 134 if (is_desktop_linux) { | 162 "me2me_desktop_environment.h", |
| 135 deps += [ "//build/config/linux/gtk2" ] | 163 ] |
| 136 } | 164 deps += [ |
| 165 "//cc", |
| 166 "//gpu/command_buffer/common", |
| 167 "//ppapi/host", |
| 168 "//skia", |
| 169 "//ui/aura", |
| 170 "//ui/compositor", |
| 171 "//ui/events", |
| 172 "//ui/views", |
| 173 ] |
| 174 |
| 175 if (use_ash) { |
| 176 deps += [ "//ash" ] |
| 177 } |
| 178 |
| 179 if (use_ozone) { |
| 180 deps += [ "//ui/ozone" ] |
| 181 sources -= [ "desktop_resizer_ozone.cc" ] |
| 137 } else { | 182 } else { |
| 138 sources -= [ | 183 sources -= [ |
| 139 "clipboard_x11.cc", | 184 "clipboard_x11.cc", |
| 140 "desktop_resizer_x11.cc", | 185 "desktop_resizer_x11.cc", |
| 141 "input_injector_x11.cc", | 186 "input_injector_chromeos.cc", |
| 187 "input_injector_chromeos.h", |
| 188 "linux/x_server_clipboard.cc", |
| 189 "linux/x_server_clipboard.h", |
| 142 "local_input_monitor_x11.cc", | 190 "local_input_monitor_x11.cc", |
| 143 ] | 191 ] |
| 144 if (is_linux) { | 192 } |
| 145 # These will already be filtered out on non-Linux. | 193 |
| 146 sources -= [ | 194 sources -= [ |
| 147 "linux/unicode_to_keysym.cc", | 195 "continue_window_linux.cc", |
| 148 "linux/x11_util.cc", | 196 "curtain_mode_linux.cc", |
| 149 "linux/x_server_clipboard.cc", | 197 "disconnect_window_linux.cc", |
| 150 "linux/x_server_clipboard.h", | 198 ] |
| 151 ] | 199 } |
| 152 } | 200 |
| 153 } | 201 if (is_mac) { |
| 154 | 202 libs += [ "Accelerate.framework" ] |
| 155 if (!use_ozone) { | 203 |
| 156 sources -= [ "desktop_resizer_ozone.cc" ] | 204 # TODO(nicholss): When we can delete GYP builds, |
| 157 } | 205 # this flag and usage can be removed. |
| 158 | 206 defines += [ "GN_BUILD=1" ] |
| 159 if (is_chromeos) { | 207 deps += [ |
| 160 # TODO(GYP): crbug.com/481627. These should only be included | 208 ":remoting_version", |
| 161 # when enable_me2me_host is true. | 209 "//third_party/google_toolbox_for_mac", |
| 162 sources -= [ | 210 ] |
| 163 "me2me_desktop_environment.cc", | 211 } |
| 164 "me2me_desktop_environment.h", | 212 |
| 165 ] | 213 if (is_win) { |
| 166 deps += [ | 214 deps += [ |
| 167 "//cc", | 215 ":messages", |
| 168 "//gpu/command_buffer/common", | 216 ":remoting_lib_idl", |
| 169 "//ppapi/host", | 217 ] |
| 170 "//skia", | 218 } |
| 171 "//ui/aura", | 219 |
| 172 "//ui/compositor", | 220 if (enable_webrtc) { |
| 173 "//ui/events", | 221 deps += [ "//third_party/webrtc/modules/desktop_capture" ] |
| 174 "//ui/views", | 222 } |
| 175 ] | 223 |
| 176 | 224 if (is_android) { |
| 177 if (use_ash) { | 225 sources -= [ |
| 178 deps += [ "//ash" ] | 226 "single_window_desktop_environment.cc", |
| 179 } | 227 "single_window_desktop_environment.h", |
| 180 | 228 ] |
| 181 if (use_ozone) { | 229 } |
| 182 deps += [ "//ui/ozone" ] | 230 } |
| 183 sources -= [ "desktop_resizer_ozone.cc" ] | 231 |
| 184 } else { | 232 source_set("test_support") { |
| 185 sources -= [ | 233 testonly = true |
| 186 "clipboard_x11.cc", | 234 |
| 187 "desktop_resizer_x11.cc", | 235 sources = [ |
| 188 "input_injector_chromeos.cc", | 236 "fake_desktop_environment.cc", |
| 189 "input_injector_chromeos.h", | 237 "fake_desktop_environment.h", |
| 190 "linux/x_server_clipboard.cc", | 238 "fake_host_extension.cc", |
| 191 "linux/x_server_clipboard.h", | 239 "fake_host_extension.h", |
| 192 "local_input_monitor_x11.cc", | 240 "fake_host_status_monitor.h", |
| 193 ] | 241 "fake_host_status_monitor.h", |
| 194 } | 242 "fake_mouse_cursor_monitor.cc", |
| 195 | 243 "fake_mouse_cursor_monitor.h", |
| 196 sources -= [ | 244 "fake_oauth_token_getter.cc", |
| 197 "continue_window_linux.cc", | 245 "fake_oauth_token_getter.h", |
| 198 "curtain_mode_linux.cc", | 246 "host_mock_objects.cc", |
| 199 "disconnect_window_linux.cc", | 247 "host_mock_objects.h", |
| 200 ] | 248 "security_key/fake_ipc_gnubby_auth_handler.cc", |
| 201 } | 249 "security_key/fake_ipc_gnubby_auth_handler.h", |
| 202 | 250 "security_key/fake_remote_security_key_ipc_client.cc", |
| 203 if (is_mac) { | 251 "security_key/fake_remote_security_key_ipc_client.h", |
| 204 # TODO(GYP) Mac host_bundle_name and prefpane_bundle_name. | 252 "security_key/fake_remote_security_key_ipc_server.cc", |
| 205 # Note if you are looking at this: It really sucks to have to synchronousl
y | 253 "security_key/fake_remote_security_key_ipc_server.h", |
| 206 # call into python twice to get these values. They should instead be | 254 "security_key/fake_remote_security_key_message_reader.cc", |
| 207 # written into a generated header via the process_version template, and we | 255 "security_key/fake_remote_security_key_message_reader.h", |
| 208 # change the source files to include that header rather than rely on these | 256 "security_key/fake_remote_security_key_message_writer.cc", |
| 209 # defines being set in the build. | 257 "security_key/fake_remote_security_key_message_writer.h", |
| 210 #defines += [ | 258 "setup/mock_oauth_client.cc", |
| 211 # "HOST_BUNDLE_NAME=\"$host_bundle_name\"", | 259 "setup/mock_oauth_client.h", |
| 212 # "PREFPANE_BUNDLE_NAME=\"$prefpane_bundle_name\"", | 260 ] |
| 213 #] | 261 |
| 214 | 262 configs += [ "//remoting:version" ] |
| 215 libs += [ | 263 |
| 216 "Accelerate.framework", | 264 deps = [ |
| 217 "libpam.a", | 265 "//remoting/proto", |
| 218 ] | 266 "//testing/gmock", |
| 219 | 267 "//testing/gtest", |
| 220 deps += [ "//third_party/google_toolbox_for_mac" ] | 268 ] |
| 221 } | 269 public_deps = [ |
| 222 | 270 ":host", |
| 223 if (is_win) { | 271 "//third_party/protobuf:protobuf_lite", |
| 224 deps += [ | 272 ] |
| 225 ":messages", | 273 |
| 226 ":remoting_lib_idl", | 274 if (enable_webrtc) { |
| 227 ] | 275 public_deps += [ |
| 228 } | 276 "//third_party/libjingle:libjingle_webrtc", |
| 229 | 277 "//third_party/webrtc/modules/desktop_capture", |
| 230 if (enable_webrtc) { | 278 ] |
| 231 deps += [ "//third_party/webrtc/modules/desktop_capture" ] | 279 } |
| 232 } | 280 } |
| 233 | 281 |
| 234 if (is_android) { | 282 # The host portions of the remoting unit tests. |
| 235 sources -= [ | 283 source_set("unit_tests") { |
| 236 "single_window_desktop_environment.cc", | 284 testonly = true |
| 237 "single_window_desktop_environment.h", | 285 |
| 238 ] | 286 sources = [ |
| 239 } | 287 "audio_pump_unittest.cc", |
| 240 } | 288 "audio_silence_detector_unittest.cc", |
| 241 | 289 "backoff_timer_unittest.cc", |
| 242 source_set("test_support") { | 290 "chromeos/aura_desktop_capturer_unittest.cc", |
| 243 testonly = true | 291 "chromeos/clipboard_aura_unittest.cc", |
| 292 "chromoting_host_context_unittest.cc", |
| 293 "chromoting_host_unittest.cc", |
| 294 "client_session_unittest.cc", |
| 295 "config_file_watcher_unittest.cc", |
| 296 "daemon_process_unittest.cc", |
| 297 "desktop_process_unittest.cc", |
| 298 "gcd_rest_client_unittest.cc", |
| 299 "gcd_state_updater_unittest.cc", |
| 300 "heartbeat_sender_unittest.cc", |
| 301 "host_change_notification_listener_unittest.cc", |
| 302 "host_config_unittest.cc", |
| 303 "host_extension_session_manager_unittest.cc", |
| 304 "host_status_logger_unittest.cc", |
| 305 "ipc_desktop_environment_unittest.cc", |
| 306 "it2me/it2me_confirmation_dialog_proxy_unittest.cc", |
| 307 "it2me/it2me_native_messaging_host_unittest.cc", |
| 308 "linux/audio_pipe_reader_unittest.cc", |
| 309 "linux/certificate_watcher_unittest.cc", |
| 310 "linux/unicode_to_keysym_unittest.cc", |
| 311 "linux/x_server_clipboard_unittest.cc", |
| 312 "local_input_monitor_unittest.cc", |
| 313 "mouse_cursor_monitor_proxy_unittest.cc", |
| 314 "mouse_shape_pump_unittest.cc", |
| 315 "native_messaging/native_messaging_reader_unittest.cc", |
| 316 "native_messaging/native_messaging_writer_unittest.cc", |
| 317 "pairing_registry_delegate_linux_unittest.cc", |
| 318 "pairing_registry_delegate_win_unittest.cc", |
| 319 "pin_hash_unittest.cc", |
| 320 "policy_watcher_unittest.cc", |
| 321 "register_support_host_request_unittest.cc", |
| 322 "remote_input_filter_unittest.cc", |
| 323 "resizing_host_observer_unittest.cc", |
| 324 "resources_unittest.cc", |
| 325 "screen_resolution_unittest.cc", |
| 326 "security_key/gnubby_auth_handler_linux_unittest.cc", |
| 327 "security_key/gnubby_auth_handler_win_unittest.cc", |
| 328 "security_key/gnubby_extension_session_unittest.cc", |
| 329 "security_key/remote_security_key_ipc_client_unittest.cc", |
| 330 "security_key/remote_security_key_ipc_server_unittest.cc", |
| 331 "security_key/remote_security_key_message_handler_unittest.cc", |
| 332 "security_key/remote_security_key_message_reader_impl_unittest.cc", |
| 333 "security_key/remote_security_key_message_writer_impl_unittest.cc", |
| 334 "server_log_entry_host_unittest.cc", |
| 335 "setup/me2me_native_messaging_host_unittest.cc", |
| 336 "setup/oauth_helper_unittest.cc", |
| 337 "setup/pin_validator_unittest.cc", |
| 338 "third_party_auth_config_unittest.cc", |
| 339 "token_validator_factory_impl_unittest.cc", |
| 340 "touch_injector_win_unittest.cc", |
| 341 "win/rdp_client_unittest.cc", |
| 342 "win/worker_process_launcher_unittest.cc", |
| 343 ] |
| 344 |
| 345 if (!use_x11 && is_linux) { |
| 346 sources -= [ "linux/unicode_to_keysym_unittest.cc" ] |
| 347 } |
| 348 if (use_ozone || is_chromeos) { |
| 349 sources -= [ "local_input_monitor_unittest.cc" ] |
| 350 } |
| 351 if (is_chromeos) { |
| 352 sources -= [ "linux/x_server_clipboard_unittest.cc" ] |
| 353 } |
| 354 if (is_android) { |
| 355 sources -= [ "it2me/it2me_native_messaging_host_unittest.cc" ] |
| 356 } |
| 357 |
| 358 configs += [ "//remoting:version" ] |
| 359 |
| 360 deps = [ |
| 361 ":host", |
| 362 ":test_support", |
| 363 "//remoting/host/it2me:common", |
| 364 "//remoting/host/native_messaging", |
| 365 "//remoting/host/setup", |
| 366 "//remoting/proto", |
| 367 "//skia", |
| 368 "//testing/gmock", |
| 369 "//testing/gtest", |
| 370 ] |
| 371 |
| 372 if (enable_configuration_policy) { |
| 373 deps += [ "//components/policy:policy_component_test_support" ] |
| 374 } |
| 375 } |
| 376 |
| 377 if (is_win) { |
| 378 import("//build/toolchain/win/midl.gni") |
| 379 import("//build/win/message_compiler.gni") |
| 380 |
| 381 # TODO(brettw) these should not be generated via exec_script. This should be |
| 382 # part of the build process rather than the metabuild. Instead, a script |
| 383 # should generate a header containing the #defines for this as well as the |
| 384 # IDL file with the values. |
| 385 clsids = exec_script("win/get_clsids.py", |
| 386 [ |
| 387 remoting_srcs_gypi_values.daemon_controller_guid, |
| 388 remoting_srcs_gypi_values.rdp_desktop_session_guid, |
| 389 chrome_version_full, |
| 390 ], |
| 391 "value") |
| 392 daemon_controller_clsid = clsids[0] |
| 393 rdp_desktop_session_clsid = clsids[1] |
| 394 |
| 395 action("generate_idl") { |
| 396 script = "//build/util/version.py" |
| 397 |
| 398 inputs = [ |
| 399 "win/chromoting_lib_idl.templ", |
| 400 ] |
| 401 outputs = [ |
| 402 "$target_gen_dir/chromoting_lib.idl", |
| 403 ] |
| 404 |
| 405 args = [ |
| 406 "-e", |
| 407 "DAEMON_CONTROLLER_CLSID='$daemon_controller_clsid'", |
| 408 "-e", |
| 409 "RDP_DESKTOP_SESSION_CLSID='$rdp_desktop_session_clsid'", |
| 410 rebase_path(inputs[0], root_build_dir), |
| 411 rebase_path(outputs[0], root_build_dir), |
| 412 ] |
| 413 } |
| 414 |
| 415 midl("remoting_lib_idl") { |
| 416 sources = get_target_outputs(":generate_idl") |
| 417 deps = [ |
| 418 ":generate_idl", |
| 419 ] |
| 420 } |
| 421 |
| 422 config("MIDL_config") { |
| 423 if (is_clang) { |
| 424 cflags = [ |
| 425 # MIDL generated code has a habit of omitting optional braces. |
| 426 "-Wno-missing-braces", |
| 427 |
| 428 # Source files generated by the MIDL compiler trigger warnings with |
| 429 # -Wincompatible-pointer-types enabled. |
| 430 "-Wno-incompatible-pointer-types", |
| 431 |
| 432 # Generated code contains unused variables. |
| 433 "-Wno-unused-variable", |
| 434 |
| 435 # PROXYFILE_LIST_START is an extern with initializer. |
| 436 "-Wno-extern-initializer", |
| 437 ] |
| 438 } |
| 439 } |
| 440 |
| 441 # GYP version: remoting/remoting_host_win.gypi:remoting_lib_ps |
| 442 static_library("remoting_lib_ps") { |
| 443 configs += [ ":MIDL_config" ] |
| 444 |
| 445 defines = [ |
| 446 "ENTRY_PREFIX=Ps", |
| 447 "REGISTER_PROXY_DLL", |
| 448 ] |
| 449 |
| 450 deps = [ |
| 451 ":remoting_lib_idl", |
| 452 ] |
| 244 | 453 |
| 245 sources = [ | 454 sources = [ |
| 246 "fake_desktop_environment.cc", | 455 "$root_gen_dir/remoting/host/chromoting_lib.dlldata.c", |
| 247 "fake_desktop_environment.h", | 456 "$root_gen_dir/remoting/host/chromoting_lib_p.c", |
| 248 "fake_host_extension.cc", | 457 ] |
| 249 "fake_host_extension.h", | 458 } |
| 250 "fake_host_status_monitor.h", | 459 |
| 251 "fake_host_status_monitor.h", | 460 # Makes the .mc file from the .mc.jinja file. |
| 252 "fake_mouse_cursor_monitor.cc", | 461 remoting_localize("messages_localizing") { |
| 253 "fake_mouse_cursor_monitor.h", | 462 sources = [ |
| 254 "fake_oauth_token_getter.cc", | 463 "win/host_messages.mc.jinja2", |
| 255 "fake_oauth_token_getter.h", | 464 ] |
| 256 "host_mock_objects.cc", | 465 locales = remoting_locales |
| 257 "host_mock_objects.h", | 466 locale_dir = webapp_locale_dir |
| 258 "security_key/fake_ipc_gnubby_auth_handler.cc", | 467 encoding = "utf-16" |
| 259 "security_key/fake_ipc_gnubby_auth_handler.h", | 468 |
| 260 "security_key/fake_remote_security_key_ipc_client.cc", | 469 # This target is funny. It only produces one file and the output doesn't |
| 261 "security_key/fake_remote_security_key_ipc_client.h", | 470 # match the input. We want to generate remoting_host_messages.mc from |
| 262 "security_key/fake_remote_security_key_ipc_server.cc", | 471 # host_messages.mg.jinja2. GN complains if it doesn't see a pattern in the |
| 263 "security_key/fake_remote_security_key_ipc_server.h", | 472 # output, so the following pattern produces the name we want with a template |
| 264 "security_key/fake_remote_security_key_message_reader.cc", | 473 # based on the input. |
| 265 "security_key/fake_remote_security_key_message_reader.h", | 474 # |
| 266 "security_key/fake_remote_security_key_message_writer.cc", | 475 # TODO: This is for GYP compat. We should just make the names match instead. |
| 267 "security_key/fake_remote_security_key_message_writer.h", | 476 output = "$target_gen_dir/remoting_{{source_name_part}}" |
| 268 "setup/mock_oauth_client.cc", | 477 } |
| 269 "setup/mock_oauth_client.h", | 478 |
| 270 ] | 479 # Makes the .h/.rc files from the .mc file. |
| 271 | 480 message_compiler("messages") { |
| 272 configs += [ "//remoting:version" ] | 481 compile_generated_code = false |
| 273 | 482 sources = get_target_outputs(":messages_localizing") |
| 274 deps = [ | 483 deps = [ |
| 275 "//remoting/proto", | 484 ":messages_localizing", |
| 276 "//testing/gmock", | 485 ] |
| 277 "//testing/gtest", | 486 } |
| 278 ] | 487 |
| 279 public_deps = [ | 488 # GYP version: remoting/remoting_host_win.gypi:remoting_console |
| 280 ":host", | 489 executable("remoting_console") { |
| 281 "//third_party/protobuf:protobuf_lite", | 490 configs += [ "//build/config/compiler:wexit_time_destructors" ] |
| 282 ] | 491 |
| 283 | 492 defines = host_predefines + [ "BINARY=BINARY_HOST_ME2ME" ] |
| 284 if (enable_webrtc) { | 493 |
| 285 public_deps += [ | 494 deps = [ |
| 286 "//third_party/libjingle:libjingle_webrtc", | 495 ":dpi_aware_exe_manifest", |
| 287 "//third_party/webrtc/modules/desktop_capture", | 496 ":remoting_core", |
| 288 ] | 497 ":remoting_windows_resources", |
| 289 } | 498 ] |
| 290 } | |
| 291 | |
| 292 # The host portions of the remoting unit tests. | |
| 293 source_set("unit_tests") { | |
| 294 testonly = true | |
| 295 | 499 |
| 296 sources = [ | 500 sources = [ |
| 297 "audio_pump_unittest.cc", | 501 "$root_gen_dir/remoting/version.rc", |
| 298 "audio_silence_detector_unittest.cc", | 502 "win/entry_point.cc", |
| 299 "backoff_timer_unittest.cc", | 503 ] |
| 300 "chromeos/aura_desktop_capturer_unittest.cc", | 504 |
| 301 "chromeos/clipboard_aura_unittest.cc", | 505 ldflags = [ |
| 302 "chromoting_host_context_unittest.cc", | 506 "/ENTRY:HostEntryPoint", |
| 303 "chromoting_host_unittest.cc", | 507 # "/NODEFAULTLIB", |
| 304 "client_session_unittest.cc", | 508 ] |
| 305 "config_file_watcher_unittest.cc", | 509 } |
| 306 "daemon_process_unittest.cc", | 510 |
| 307 "desktop_process_unittest.cc", | 511 # GYP version: //remoting/remoting_host_win.gypi:remoting_core |
| 308 "gcd_rest_client_unittest.cc", | 512 shared_library("remoting_core") { |
| 309 "gcd_state_updater_unittest.cc", | 513 configs += [ "//build/config/compiler:wexit_time_destructors" ] |
| 310 "heartbeat_sender_unittest.cc", | 514 |
| 311 "host_change_notification_listener_unittest.cc", | 515 defines = host_predefines + [ |
| 312 "host_config_unittest.cc", | 516 "_ATL_APARTMENT_THREADED", |
| 313 "host_extension_session_manager_unittest.cc", | 517 "_ATL_CSTRING_EXPLICIT_CONSTRUCTORS", |
| 314 "host_status_logger_unittest.cc", | 518 "_ATL_NO_AUTOMATIC_NAMESPACE", |
| 315 "ipc_desktop_environment_unittest.cc", | 519 "_ATL_NO_EXCEPTIONS", |
| 316 "it2me/it2me_confirmation_dialog_proxy_unittest.cc", | 520 "BINARY=BINARY_CORE", |
| 317 "it2me/it2me_native_messaging_host_unittest.cc", | 521 "DAEMON_CONTROLLER_CLSID=\"$daemon_controller_clsid\"", |
| 318 "linux/audio_pipe_reader_unittest.cc", | 522 "RDP_DESKTOP_SESSION_CLSID=\"$rdp_desktop_session_clsid\"", |
| 319 "linux/certificate_watcher_unittest.cc", | 523 "HOST_IMPLEMENTATION", |
| 320 "linux/unicode_to_keysym_unittest.cc", | 524 "ISOLATION_AWARE_ENABLED=1", |
| 321 "linux/x_server_clipboard_unittest.cc", | 525 "STRICT", |
| 322 "local_input_monitor_unittest.cc", | 526 "VERSION=$chrome_version_full", |
| 323 "mouse_cursor_monitor_proxy_unittest.cc", | 527 ] |
| 324 "mouse_shape_pump_unittest.cc", | 528 |
| 325 "native_messaging/native_messaging_reader_unittest.cc", | 529 if (remoting_multi_process != 0 && remoting_rdp_session != 0) { |
| 326 "native_messaging/native_messaging_writer_unittest.cc", | 530 defines += [ "REMOTING_RDP_SESSION" ] |
| 327 "pairing_registry_delegate_linux_unittest.cc", | 531 } |
| 328 "pairing_registry_delegate_win_unittest.cc", | 532 |
| 329 "pin_hash_unittest.cc", | 533 if (remoting_multi_process != 0) { |
| 330 "policy_watcher_unittest.cc", | 534 defines += [ "REMOTING_MULTI_PROCESS" ] |
| 331 "register_support_host_request_unittest.cc", | 535 } |
| 332 "remote_input_filter_unittest.cc", | |
| 333 "resizing_host_observer_unittest.cc", | |
| 334 "resources_unittest.cc", | |
| 335 "screen_resolution_unittest.cc", | |
| 336 "security_key/gnubby_auth_handler_linux_unittest.cc", | |
| 337 "security_key/gnubby_auth_handler_win_unittest.cc", | |
| 338 "security_key/gnubby_extension_session_unittest.cc", | |
| 339 "security_key/remote_security_key_ipc_client_unittest.cc", | |
| 340 "security_key/remote_security_key_ipc_server_unittest.cc", | |
| 341 "security_key/remote_security_key_message_handler_unittest.cc", | |
| 342 "security_key/remote_security_key_message_reader_impl_unittest.cc", | |
| 343 "security_key/remote_security_key_message_writer_impl_unittest.cc", | |
| 344 "server_log_entry_host_unittest.cc", | |
| 345 "setup/me2me_native_messaging_host_unittest.cc", | |
| 346 "setup/oauth_helper_unittest.cc", | |
| 347 "setup/pin_validator_unittest.cc", | |
| 348 "third_party_auth_config_unittest.cc", | |
| 349 "token_validator_factory_impl_unittest.cc", | |
| 350 "touch_injector_win_unittest.cc", | |
| 351 "win/rdp_client_unittest.cc", | |
| 352 "win/worker_process_launcher_unittest.cc", | |
| 353 ] | |
| 354 | |
| 355 if (!use_x11 && is_linux) { | |
| 356 sources -= [ "linux/unicode_to_keysym_unittest.cc" ] | |
| 357 } | |
| 358 if (use_ozone || is_chromeos) { | |
| 359 sources -= [ "local_input_monitor_unittest.cc" ] | |
| 360 } | |
| 361 if (is_chromeos) { | |
| 362 sources -= [ "linux/x_server_clipboard_unittest.cc" ] | |
| 363 } | |
| 364 if (is_android) { | |
| 365 sources -= [ "it2me/it2me_native_messaging_host_unittest.cc" ] | |
| 366 } | |
| 367 | |
| 368 configs += [ "//remoting:version" ] | |
| 369 | 536 |
| 370 deps = [ | 537 deps = [ |
| 371 ":host", | 538 ":host", |
| 372 ":test_support", | 539 ":messages", |
| 540 ":remoting_lib_idl", |
| 541 ":remoting_lib_ps", |
| 542 ":remoting_me2me_host_static", |
| 543 ":remoting_windows_resources", |
| 544 "//base", |
| 545 "//base:base_static", |
| 546 "//base/allocator", |
| 547 "//base/third_party/dynamic_annotations", |
| 548 "//build/win:default_exe_manifest", |
| 549 "//ipc", |
| 550 "//net", |
| 551 "//remoting/base", |
| 552 "//remoting/base:breakpad", |
| 553 "//remoting/codec", |
| 373 "//remoting/host/it2me:common", | 554 "//remoting/host/it2me:common", |
| 374 "//remoting/host/native_messaging", | 555 "//remoting/host/native_messaging", |
| 375 "//remoting/host/setup", | 556 "//remoting/host/setup", |
| 557 "//remoting/protocol", |
| 558 "//sandbox/win:sandbox", # Should always use Windows version |
| 559 "//third_party/webrtc/modules/desktop_capture", |
| 560 ] |
| 561 |
| 562 sources = [ |
| 563 "$root_gen_dir/remoting/core.rc", |
| 564 "$root_gen_dir/remoting/host/remoting_host_messages.rc", |
| 565 "$root_gen_dir/remoting/version.rc", |
| 566 "desktop_process_main.cc", |
| 567 "host_main.cc", |
| 568 "host_main.h", |
| 569 "it2me/it2me_native_messaging_host_main.cc", |
| 570 "it2me/it2me_native_messaging_host_main.h", |
| 571 "security_key/remote_security_key_main.cc", |
| 572 "security_key/remote_security_key_main.h", |
| 573 "setup/host_starter.cc", |
| 574 "setup/host_starter.h", |
| 575 "setup/me2me_native_messaging_host_main.cc", |
| 576 "setup/me2me_native_messaging_host_main.h", |
| 577 "setup/start_host_main.cc", |
| 578 "setup/start_host_main.h", |
| 579 "win/chromoting_lib.rc", |
| 580 "win/chromoting_module.cc", |
| 581 "win/chromoting_module.h", |
| 582 "win/core.cc", |
| 583 "win/core_resource.h", |
| 584 "win/host_service.cc", |
| 585 "win/host_service.h", |
| 586 "win/omaha.cc", |
| 587 "win/omaha.h", |
| 588 "win/rdp_desktop_session.cc", |
| 589 "win/rdp_desktop_session.h", |
| 590 "win/unprivileged_process_delegate.cc", |
| 591 "win/unprivileged_process_delegate.h", |
| 592 "win/wts_session_process_delegate.cc", |
| 593 "win/wts_session_process_delegate.h", |
| 594 "worker_process_ipc_delegate.h", |
| 595 ] |
| 596 |
| 597 ldflags = [ |
| 598 "/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE", |
| 599 "/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE", |
| 600 "/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE", |
| 601 "/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE", |
| 602 ] |
| 603 |
| 604 libs = [ |
| 605 "comctl32.lib", |
| 606 "rpcns4.lib", |
| 607 "rpcrt4.lib", |
| 608 "sas.lib", |
| 609 "uuid.lib", |
| 610 "wtsapi32.lib", |
| 611 ] |
| 612 |
| 613 if (is_clang) { |
| 614 cflags = [ "-Wno-header-hygiene" ] |
| 615 } |
| 616 } |
| 617 |
| 618 # GYP version: //remoting/remoting_host_win.gypi:remoting_desktop |
| 619 executable("remoting_desktop") { |
| 620 configs += [ |
| 621 "//build/config/compiler:wexit_time_destructors", |
| 622 "//build/config/win:windowed", |
| 623 ] |
| 624 |
| 625 defines = host_predefines + [ "BINARY=BINARY_DESKTOP" ] |
| 626 |
| 627 deps = [ |
| 628 ":remoting_core", |
| 629 ":remoting_windows_resources", |
| 630 ] |
| 631 |
| 632 if (is_official_build) { |
| 633 deps += [ ":dpi_aware_elevated_exe_manifest" ] |
| 634 } else { |
| 635 deps += [ ":dpi_aware_exe_manifest" ] |
| 636 } |
| 637 |
| 638 sources = [ |
| 639 "$root_gen_dir/remoting/version.rc", |
| 640 "win/entry_point.cc", |
| 641 ] |
| 642 |
| 643 ldflags = [ |
| 644 "/ENTRY:HostEntryPoint", |
| 645 # "/NODEFAULTLIB", |
| 646 ] |
| 647 } |
| 648 |
| 649 # GYP version: //remoting/remoting_host_win.gypi:remote_security_key |
| 650 executable("remote_security_key") { |
| 651 configs += [ "//build/config/compiler:wexit_time_destructors" ] |
| 652 |
| 653 defines = host_predefines + [ "BINARY=BINARY_REMOTE_SECURITY_KEY" ] |
| 654 |
| 655 deps = [ |
| 656 ":remoting_core", |
| 657 ":remoting_windows_resources", |
| 658 "//build/win:default_exe_manifest", |
| 659 ] |
| 660 |
| 661 sources = [ |
| 662 "$root_gen_dir/remoting/version.rc", |
| 663 "security_key/remote_security_key_entry_point.cc", |
| 664 ] |
| 665 } |
| 666 |
| 667 # GYP version: |
| 668 # //remoting/remoting_host_win.gypi:remoting_me2me_native_messaging_host |
| 669 executable("remoting_native_messaging_host") { |
| 670 configs += [ "//build/config/compiler:wexit_time_destructors" ] |
| 671 |
| 672 defines = host_predefines + [ "BINARY=BINARY_NATIVE_MESSAGING_HOST" ] |
| 673 |
| 674 deps = [ |
| 675 ":remoting_core", |
| 676 ":remoting_windows_resources", |
| 677 "//build/win:default_exe_manifest", |
| 678 ] |
| 679 |
| 680 sources = [ |
| 681 "$root_gen_dir/remoting/version.rc", |
| 682 "setup/me2me_native_messaging_host_entry_point.cc", |
| 683 ] |
| 684 } |
| 685 |
| 686 # GYP version: //remoting/remoting_host_win.gypi:remoting_windows_resources |
| 687 remoting_localize("remoting_windows_resources") { |
| 688 deps = [ |
| 689 "//remoting/resources", |
| 690 ] |
| 691 |
| 692 sources = [ |
| 693 "win/core.rc.jinja2", |
| 694 "win/version.rc.jinja2", |
| 695 ] |
| 696 |
| 697 # TODO(zijiehe): Export lastchange_path from |
| 698 # //chrome/version.gni:process_version |
| 699 variables = [ |
| 700 rebase_path(chrome_version_file), |
| 701 rebase_path(remoting_version_file), |
| 702 rebase_path("//build/util/LASTCHANGE"), |
| 703 ] |
| 704 |
| 705 output = "$root_gen_dir/remoting/{{source_name_part}}" |
| 706 |
| 707 locale_dir = webapp_locale_dir |
| 708 |
| 709 encoding = "utf-16" |
| 710 |
| 711 locales = remoting_locales |
| 712 } |
| 713 |
| 714 # TODO(GYP) More Windows remoting targets from remoting_host_win.gypi |
| 715 } |
| 716 |
| 717 if (enable_remoting_host && !is_android) { |
| 718 executable("remoting_start_host") { |
| 719 sources = [ |
| 720 "setup/start_host_entry_point.cc", |
| 721 ] |
| 722 |
| 723 deps = [ |
| 724 "//build/config/sanitizers:deps", |
| 725 ] |
| 726 |
| 727 configs += [ "//build/config/compiler:wexit_time_destructors" ] |
| 728 |
| 729 if (is_win) { |
| 730 defines = host_predefines + [ "BINARY=BINARY_REMOTING_START_HOST" ] |
| 731 |
| 732 deps += [ |
| 733 ":remoting_core", |
| 734 ":remoting_windows_resources", |
| 735 "//build/win:default_exe_manifest", |
| 736 ] |
| 737 } else { |
| 738 sources += [ |
| 739 "setup/host_starter.cc", |
| 740 "setup/host_starter.h", |
| 741 "setup/start_host_main.cc", |
| 742 "setup/start_host_main.h", |
| 743 ] |
| 744 |
| 745 deps += [ "//remoting/host/setup" ] |
| 746 } |
| 747 |
| 748 if (enable_webrtc) { |
| 749 deps += [ "//third_party/libjingle:libjingle_webrtc" ] |
| 750 } |
| 751 } |
| 752 |
| 753 action_foreach("remoting_native_messaging_manifests") { |
| 754 if (is_mac) { |
| 755 me2me_host_path = "/Library/PrivilegedHelperTools/$me2me_host_bundle_name/
Contents/MacOS/$native_messaging_host_bundle_name/Contents/MacOS/native_messagin
g_host" |
| 756 it2me_host_path = "/Library/PrivilegedHelperTools/$me2me_host_bundle_name/
Contents/MacOS/$remote_assistance_host_bundle_name/Contents/MacOS/remote_assista
nce_host" |
| 757 } else if (is_win) { |
| 758 me2me_host_path = "remoting_native_messaging_host.exe" |
| 759 it2me_host_path = "remote_assistance_host.exe" |
| 760 } else { |
| 761 me2me_host_path = |
| 762 "/opt/google/chrome-remote-desktop/native-messaging-host" |
| 763 it2me_host_path = |
| 764 "/opt/google/chrome-remote-desktop/remote-assistance-host" |
| 765 } |
| 766 |
| 767 script = "../tools/build/remoting_localize.py" |
| 768 |
| 769 sources = [ |
| 770 "it2me/com.google.chrome.remote_assistance.json.jinja2", |
| 771 "setup/com.google.chrome.remote_desktop.json.jinja2", |
| 772 ] |
| 773 |
| 774 inputs = [ |
| 775 branding_path, |
| 776 ] |
| 777 |
| 778 outputs = [ |
| 779 "$root_build_dir/remoting/{{source_name_part}}", |
| 780 ] |
| 781 |
| 782 args = [ |
| 783 "--define", |
| 784 "ME2ME_HOST_PATH=$me2me_host_path", |
| 785 "--define", |
| 786 "IT2ME_HOST_PATH=$it2me_host_path", |
| 787 "--variables", |
| 788 rebase_path(branding_path), |
| 789 "--template", |
| 790 "{{source}}", |
| 791 "--locale_output", |
| 792 "remoting/{{source_name_part}}", |
| 793 "en", |
| 794 ] |
| 795 } |
| 796 |
| 797 # TODO(crbug.com/512899) This still needs to be ported to GN. |
| 798 group("remoting_infoplist_strings") { |
| 799 } |
| 800 } |
| 801 |
| 802 if (enable_me2me_host) { |
| 803 source_set("remoting_me2me_host_static") { |
| 804 sources = [ |
| 805 "pam_authorization_factory_posix.cc", |
| 806 "pam_authorization_factory_posix.h", |
| 807 "remoting_me2me_host.cc", |
| 808 ] |
| 809 defines = [] |
| 810 |
| 811 configs += [ "//remoting:version" ] |
| 812 |
| 813 deps = [ |
| 814 "//base", |
| 815 "//base:i18n", |
| 816 "//components/policy:policy_component_common", |
| 817 "//net", |
| 818 "//remoting/base", |
| 819 "//remoting/host", |
| 376 "//remoting/proto", | 820 "//remoting/proto", |
| 377 "//skia", | 821 "//third_party/webrtc/modules/desktop_capture", |
| 378 "//testing/gmock", | |
| 379 "//testing/gtest", | |
| 380 ] | 822 ] |
| 381 | 823 |
| 382 if (enable_configuration_policy) { | 824 if (enable_configuration_policy) { |
| 383 deps += [ "//components/policy:policy_component_test_support" ] | 825 deps += [ "//components/policy" ] |
| 826 } |
| 827 |
| 828 if (enable_webrtc) { |
| 829 deps += [ "//third_party/libjingle:libjingle_webrtc" ] |
| 830 } |
| 831 |
| 832 if (is_desktop_linux) { |
| 833 deps += [ "//build/config/linux/gtk2" ] |
| 834 } |
| 835 if ((is_linux && !is_chromeos) || is_mac) { |
| 836 libs = [ "pam" ] |
| 837 } |
| 838 |
| 839 if (is_mac && is_official_build) { |
| 840 sources += [ "internal/internal_mac-inl.h" ] |
| 841 defines += [ "USE_REMOTING_MACOSX_INTERNAL" ] |
| 842 } |
| 843 |
| 844 if (is_win && remoting_multi_process != 0 && remoting_rdp_session != 0) { |
| 845 defines += [ "REMOTING_RDP_SESSION" ] |
| 846 } |
| 847 |
| 848 if (remoting_multi_process != 0) { |
| 849 defines += [ "REMOTING_MULTI_PROCESS" ] |
| 384 } | 850 } |
| 385 } | 851 } |
| 386 | 852 |
| 387 if (is_win) { | 853 if (is_win) { |
| 388 import("//build/toolchain/win/midl.gni") | 854 # GYP version: //remoting/remoting_host_win.gypi:remoting_me2me_host |
| 389 import("//build/win/message_compiler.gni") | 855 executable("remoting_me2me_host") { |
| 390 | 856 configs += [ |
| 391 # TODO(brettw) these should not be generated via exec_script. This should be | 857 "//build/config/compiler:wexit_time_destructors", |
| 392 # part of the build process rather than the metabuild. Instead, a script | 858 "//build/config/win:windowed", |
| 393 # should generate a header containing the #defines for this as well as the | 859 ] |
| 394 # IDL file with the values. | |
| 395 clsids = exec_script("win/get_clsids.py", | |
| 396 [ | |
| 397 remoting_srcs_gypi_values.daemon_controller_guid, | |
| 398 remoting_srcs_gypi_values.rdp_desktop_session_guid, | |
| 399 chrome_version_full, | |
| 400 ], | |
| 401 "value") | |
| 402 daemon_controller_clsid = clsids[0] | |
| 403 rdp_desktop_session_clsid = clsids[1] | |
| 404 | |
| 405 action("generate_idl") { | |
| 406 script = "//build/util/version.py" | |
| 407 | |
| 408 inputs = [ | |
| 409 "win/chromoting_lib_idl.templ", | |
| 410 ] | |
| 411 outputs = [ | |
| 412 "$target_gen_dir/chromoting_lib.idl", | |
| 413 ] | |
| 414 | |
| 415 args = [ | |
| 416 "-e", | |
| 417 "DAEMON_CONTROLLER_CLSID='$daemon_controller_clsid'", | |
| 418 "-e", | |
| 419 "RDP_DESKTOP_SESSION_CLSID='$rdp_desktop_session_clsid'", | |
| 420 rebase_path(inputs[0], root_build_dir), | |
| 421 rebase_path(outputs[0], root_build_dir), | |
| 422 ] | |
| 423 } | |
| 424 | |
| 425 midl("remoting_lib_idl") { | |
| 426 sources = get_target_outputs(":generate_idl") | |
| 427 deps = [ | |
| 428 ":generate_idl", | |
| 429 ] | |
| 430 } | |
| 431 | |
| 432 config("MIDL_config") { | |
| 433 if (is_clang) { | |
| 434 cflags = [ | |
| 435 # MIDL generated code has a habit of omitting optional braces. | |
| 436 "-Wno-missing-braces", | |
| 437 | |
| 438 # Source files generated by the MIDL compiler trigger warnings with | |
| 439 # -Wincompatible-pointer-types enabled. | |
| 440 "-Wno-incompatible-pointer-types", | |
| 441 | |
| 442 # Generated code contains unused variables. | |
| 443 "-Wno-unused-variable", | |
| 444 | |
| 445 # PROXYFILE_LIST_START is an extern with initializer. | |
| 446 "-Wno-extern-initializer", | |
| 447 ] | |
| 448 } | |
| 449 } | |
| 450 | |
| 451 # GYP version: remoting/remoting_host_win.gypi:remoting_lib_ps | |
| 452 static_library("remoting_lib_ps") { | |
| 453 configs += [ ":MIDL_config" ] | |
| 454 | |
| 455 defines = [ | |
| 456 "ENTRY_PREFIX=Ps", | |
| 457 "REGISTER_PROXY_DLL", | |
| 458 ] | |
| 459 | |
| 460 deps = [ | |
| 461 ":remoting_lib_idl", | |
| 462 ] | |
| 463 | |
| 464 sources = [ | |
| 465 "$root_gen_dir/remoting/host/chromoting_lib.dlldata.c", | |
| 466 "$root_gen_dir/remoting/host/chromoting_lib_p.c", | |
| 467 ] | |
| 468 } | |
| 469 | |
| 470 # Makes the .mc file from the .mc.jinja file. | |
| 471 remoting_localize("messages_localizing") { | |
| 472 sources = [ | |
| 473 "win/host_messages.mc.jinja2", | |
| 474 ] | |
| 475 locales = remoting_locales | |
| 476 locale_dir = webapp_locale_dir | |
| 477 encoding = "utf-16" | |
| 478 | |
| 479 # This target is funny. It only produces one file and the output doesn't | |
| 480 # match the input. We want to generate remoting_host_messages.mc from | |
| 481 # host_messages.mg.jinja2. GN complains if it doesn't see a pattern in the | |
| 482 # output, so the following pattern produces the name we want with a templa
te | |
| 483 # based on the input. | |
| 484 # | |
| 485 # TODO: This is for GYP compat. We should just make the names match instea
d. | |
| 486 output = "$target_gen_dir/remoting_{{source_name_part}}" | |
| 487 } | |
| 488 | |
| 489 # Makes the .h/.rc files from the .mc file. | |
| 490 message_compiler("messages") { | |
| 491 compile_generated_code = false | |
| 492 sources = get_target_outputs(":messages_localizing") | |
| 493 deps = [ | |
| 494 ":messages_localizing", | |
| 495 ] | |
| 496 } | |
| 497 | |
| 498 # GYP version: remoting/remoting_host_win.gypi:remoting_console | |
| 499 executable("remoting_console") { | |
| 500 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
| 501 | 860 |
| 502 defines = host_predefines + [ "BINARY=BINARY_HOST_ME2ME" ] | 861 defines = host_predefines + [ "BINARY=BINARY_HOST_ME2ME" ] |
| 503 | 862 |
| 504 deps = [ | 863 deps = [ |
| 505 ":dpi_aware_exe_manifest", | 864 ":dpi_aware_exe_manifest", |
| 506 ":remoting_core", | 865 ":remoting_core", |
| 507 ":remoting_windows_resources", | 866 ":remoting_windows_resources", |
| 508 ] | 867 ] |
| 509 | 868 |
| 510 sources = [ | 869 sources = [ |
| 511 "$root_gen_dir/remoting/version.rc", | 870 "$root_gen_dir/remoting/version.rc", |
| 512 "win/entry_point.cc", | 871 "win/entry_point.cc", |
| 513 ] | 872 ] |
| 514 | 873 |
| 874 output_name = "remoting_host" |
| 875 |
| 515 ldflags = [ | 876 ldflags = [ |
| 516 "/ENTRY:HostEntryPoint", | 877 "/ENTRY:HostEntryPoint", |
| 517 # "/NODEFAULTLIB", | 878 # "/NODEFAULTLIB", |
| 518 ] | 879 ] |
| 519 } | 880 } |
| 520 | 881 } else { |
| 521 # GYP version: //remoting/remoting_host_win.gypi:remoting_core | 882 executable("remoting_me2me_host") { |
| 522 shared_library("remoting_core") { | 883 configs += [ "//remoting:version" ] |
| 523 configs += [ "//build/config/compiler:wexit_time_destructors" ] | 884 |
| 524 | 885 sources = [ |
| 525 defines = host_predefines + [ | 886 "host_main.cc", |
| 526 "_ATL_APARTMENT_THREADED", | 887 "host_main.h", |
| 527 "_ATL_CSTRING_EXPLICIT_CONSTRUCTORS", | 888 ] |
| 528 "_ATL_NO_AUTOMATIC_NAMESPACE", | 889 |
| 529 "_ATL_NO_EXCEPTIONS", | 890 if (is_mac && is_chrome_branded && is_official_build) { |
| 530 "BINARY=BINARY_CORE", | 891 defines = [ "REMOTING_ENABLE_BREAKPAD" ] |
| 531 "DAEMON_CONTROLLER_CLSID=\"$daemon_controller_clsid\"", | |
| 532 "RDP_DESKTOP_SESSION_CLSID=\"$rdp_desktop_session_clsid\"", | |
| 533 "HOST_IMPLEMENTATION", | |
| 534 "ISOLATION_AWARE_ENABLED=1", | |
| 535 "STRICT", | |
| 536 "VERSION=$chrome_version_full", | |
| 537 ] | |
| 538 | |
| 539 if (remoting_multi_process != 0 && remoting_rdp_session != 0) { | |
| 540 defines += [ "REMOTING_RDP_SESSION" ] | |
| 541 } | 892 } |
| 542 | 893 |
| 543 if (remoting_multi_process != 0) { | 894 deps = [ |
| 544 defines += [ "REMOTING_MULTI_PROCESS" ] | 895 ":credits", |
| 896 ":remoting_me2me_host_static", |
| 897 "//build/config/sanitizers:deps", |
| 898 ] |
| 899 } |
| 900 |
| 901 if (is_linux) { |
| 902 copy("remoting_me2me_host_copy_script") { |
| 903 sources = [ |
| 904 "linux/linux_me2me_host.py", |
| 905 ] |
| 906 outputs = [ |
| 907 "$root_build_dir/remoting/chrome-remote-desktop", |
| 908 ] |
| 545 } | 909 } |
| 910 copy("remoting_me2me_host_copy_host") { |
| 911 sources = [ |
| 912 "linux/remoting_me2me_host_wrapper.sh", |
| 913 ] |
| 914 outputs = [ |
| 915 "$root_build_dir/remoting/chrome-remote-desktop-host", |
| 916 ] |
| 917 deps = [ |
| 918 ":remoting_me2me_host", |
| 919 ] |
| 920 } |
| 921 group("remoting_dev_me2me_host") { |
| 922 deps = [ |
| 923 ":remoting_me2me_host", |
| 924 ":remoting_me2me_host_copy_host", |
| 925 ":remoting_me2me_host_copy_script", |
| 926 ] |
| 927 } |
| 928 } |
| 929 |
| 930 executable("native_messaging_host") { |
| 931 sources = [ |
| 932 "setup/me2me_native_messaging_host_entry_point.cc", |
| 933 "setup/me2me_native_messaging_host_main.cc", |
| 934 "setup/me2me_native_messaging_host_main.h", |
| 935 ] |
| 546 | 936 |
| 547 deps = [ | 937 deps = [ |
| 548 ":host", | 938 ":remoting_infoplist_strings", |
| 549 ":messages", | |
| 550 ":remoting_lib_idl", | |
| 551 ":remoting_lib_ps", | |
| 552 ":remoting_me2me_host_static", | |
| 553 ":remoting_windows_resources", | |
| 554 "//base", | 939 "//base", |
| 555 "//base:base_static", | |
| 556 "//base/allocator", | |
| 557 "//base/third_party/dynamic_annotations", | |
| 558 "//build/win:default_exe_manifest", | |
| 559 "//ipc", | |
| 560 "//net", | |
| 561 "//remoting/base", | |
| 562 "//remoting/base:breakpad", | 940 "//remoting/base:breakpad", |
| 563 "//remoting/codec", | 941 "//remoting/host", |
| 564 "//remoting/host/it2me:common", | |
| 565 "//remoting/host/native_messaging", | 942 "//remoting/host/native_messaging", |
| 566 "//remoting/host/setup", | 943 "//remoting/host/setup", |
| 567 "//remoting/protocol", | 944 ] |
| 568 "//sandbox/win:sandbox", # Should always use Windows version | 945 |
| 569 "//third_party/webrtc/modules/desktop_capture", | 946 configs += [ "//build/config/compiler:wexit_time_destructors" ] |
| 570 ] | 947 |
| 571 | 948 # The |major|, |build| and |patch| versions are inherited from Chrome. |
| 949 # Since Chrome's |minor| version is always '0', we replace it with a |
| 950 # Chromoting-specific patch version. |
| 951 defines = [ "VERSION=" + "$chrome_version_major" + "." + |
| 952 "$remoting_version_patch" + "." + "$chrome_version_build" + |
| 953 "." + "$chrome_version_patch" ] |
| 954 } |
| 955 } |
| 956 |
| 957 if (is_chrome_branded && enable_me2me_host && is_linux && !is_chromeos) { |
| 958 # TODO(GYP): add support for archive_chromoting_tests variable? |
| 959 |
| 960 import("//build/config/zip.gni") |
| 961 |
| 962 build_deb_script = "installer/linux/build_deb.py" |
| 963 deb_filename = |
| 964 "$root_build_dir/" + exec_script(build_deb_script, |
| 965 [ |
| 966 "-p", |
| 967 "-s", |
| 968 rebase_path("//"), |
| 969 ], |
| 970 "string", |
| 971 [ "installer/linux/build-deb.sh" ]) |
| 972 changes_filename = |
| 973 "$root_build_dir/" + get_path_info(deb_filename, "name") + ".changes" |
| 974 |
| 975 packaging_outputs = [ |
| 976 deb_filename, |
| 977 changes_filename, |
| 978 |
| 979 # TODO(GYP): Check that these are generated by build_deb.py. |
| 980 #"$root_build_dir/remoting_me2me_host.debug", |
| 981 #"$root_build_dir/remoting_start_host.debug", |
| 982 #"$root_build_dir/native_messaging_host.debug", |
| 983 #"$root_build_dir/remote_assistance_host.debug", |
| 984 ] |
| 985 |
| 986 zip("remoting_me2me_host_archive") { |
| 987 # Store the installer package(s) into a zip file so there is a |
| 988 # consistent filename to reference for build archiving (i.e. in |
| 989 # FILES.cfg). This also avoids possible conflicts with "wildcard" |
| 990 # package handling in other build/signing scripts. |
| 991 inputs = packaging_outputs |
| 992 output = "$root_build_dir/remoting-me2me-host-linux.zip" |
| 993 deps = [ |
| 994 ":remoting_me2me_host_copy", |
| 995 ] |
| 996 } |
| 997 |
| 998 copy("remoting_me2me_host_copy") { |
| 999 # Copy the debian package file, which has version info in it, |
| 1000 # to a consistewnt filename for use on Chromoting swarming bots. |
| 572 sources = [ | 1001 sources = [ |
| 573 "$root_gen_dir/remoting/core.rc", | 1002 deb_filename, |
| 574 "$root_gen_dir/remoting/host/remoting_host_messages.rc", | 1003 ] |
| 575 "$root_gen_dir/remoting/version.rc", | 1004 outputs = [ |
| 576 "desktop_process_main.cc", | 1005 "$root_build_dir/remoting-me2me-host.deb", |
| 577 "host_main.cc", | 1006 ] |
| 578 "host_main.h", | 1007 public_deps = [ |
| 579 "it2me/it2me_native_messaging_host_main.cc", | 1008 ":remoting_me2me_host_deb_installer", |
| 580 "it2me/it2me_native_messaging_host_main.h", | 1009 ] |
| 581 "security_key/remote_security_key_main.cc", | 1010 } |
| 582 "security_key/remote_security_key_main.h", | 1011 |
| 583 "setup/host_starter.cc", | 1012 action("remoting_me2me_host_deb_installer") { |
| 584 "setup/host_starter.h", | 1013 script = build_deb_script |
| 585 "setup/me2me_native_messaging_host_main.cc", | 1014 inputs = [ |
| 586 "setup/me2me_native_messaging_host_main.h", | 1015 build_deb_script, |
| 587 "setup/start_host_main.cc", | 1016 "installer/linux/Makefile", |
| 588 "setup/start_host_main.h", | 1017 "installer/linux/debian/chrome-remote-desktop.init", |
| 589 "win/chromoting_lib.rc", | 1018 "installer/linux/debian/chrome-remote-desktop.pam", |
| 590 "win/chromoting_module.cc", | 1019 "installer/linux/debian/compat", |
| 591 "win/chromoting_module.h", | 1020 "installer/linux/debian/control", |
| 592 "win/core.cc", | 1021 "installer/linux/debian/copyright", |
| 593 "win/core_resource.h", | 1022 "installer/linux/debian/postinst", |
| 594 "win/host_service.cc", | 1023 "installer/linux/debian/preinst", |
| 595 "win/host_service.h", | 1024 "installer/linux/debian/rules", |
| 596 "win/omaha.cc", | 1025 ] |
| 597 "win/omaha.h", | 1026 outputs = packaging_outputs |
| 598 "win/rdp_desktop_session.cc", | 1027 sources = [ |
| 599 "win/rdp_desktop_session.h", | 1028 "installer/linux/build-deb.sh", |
| 600 "win/unprivileged_process_delegate.cc", | 1029 ] |
| 601 "win/unprivileged_process_delegate.h", | 1030 args = [ |
| 602 "win/wts_session_process_delegate.cc", | 1031 "-s", |
| 603 "win/wts_session_process_delegate.h", | 1032 rebase_path("//"), |
| 604 "worker_process_ipc_delegate.h", | 1033 "-o", |
| 605 ] | 1034 rebase_path("$root_build_dir"), |
| 606 | 1035 ] |
| 607 ldflags = [ | 1036 |
| 608 "/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE", | 1037 deps = [ |
| 609 "/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE", | 1038 ":native_messaging_host", |
| 610 "/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE", | 1039 ":remoting_me2me_host", |
| 611 "/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE", | 1040 ":remoting_native_messaging_manifests", |
| 612 ] | 1041 ":remoting_start_host", |
| 613 | 1042 "//remoting/host/it2me:remote_assistance_host", |
| 614 libs = [ | 1043 "//remoting/resources", |
| 615 "comctl32.lib", | 1044 "//third_party/icu:icudata", |
| 616 "rpcns4.lib", | 1045 ] |
| 617 "rpcrt4.lib", | 1046 } |
| 618 "sas.lib", | 1047 } else if (is_win) { |
| 619 "uuid.lib", | 1048 # GYP version: //remoting/remoting_host_win.gypi:remoting_me2me_host_archive |
| 620 "wtsapi32.lib", | 1049 action("remoting_me2me_host_archive") { |
| 621 ] | 1050 script = "//remoting/host/installer/build-installer-archive.py" |
| 622 | 1051 |
| 623 if (is_clang) { | 1052 deps = [ |
| 624 cflags = [ "-Wno-header-hygiene" ] | 1053 ":credits", |
| 1054 ":remote_security_key", |
| 1055 ":remoting_core", |
| 1056 ":remoting_desktop", |
| 1057 ":remoting_me2me_host", |
| 1058 ":remoting_native_messaging_host", |
| 1059 ":remoting_native_messaging_manifests", |
| 1060 ":remoting_start_host", |
| 1061 "it2me:remote_assistance_host", |
| 1062 "//third_party/icu:icudata", |
| 1063 ] |
| 1064 |
| 1065 _output = "$root_out_dir/remoting-me2me-host-$target_os.zip" |
| 1066 |
| 1067 outputs = [ |
| 1068 _output, |
| 1069 ] |
| 1070 if (is_chrome_branded) { |
| 1071 _branding = "Chrome" |
| 1072 } else { |
| 1073 _branding = "Chromium" |
| 625 } | 1074 } |
| 626 } | 1075 |
| 627 | 1076 if (is_official_build) { |
| 628 # GYP version: //remoting/remoting_host_win.gypi:remoting_desktop | 1077 _official_build = "1" |
| 629 executable("remoting_desktop") { | 1078 } else { |
| 630 configs += [ | 1079 _official_build = "0" |
| 631 "//build/config/compiler:wexit_time_destructors", | 1080 } |
| 632 "//build/config/win:windowed", | 1081 |
| 633 ] | 1082 _generated_files = rebase_path( |
| 634 | 1083 [ |
| 635 defines = host_predefines + [ "BINARY=BINARY_DESKTOP" ] | 1084 "$root_out_dir/remote_assistance_host.exe", |
| 636 | 1085 "$root_out_dir/remote_security_key.exe", |
| 1086 "$root_out_dir/remoting_core.dll", |
| 1087 "$root_out_dir/remoting_desktop.exe", |
| 1088 "$root_out_dir/remoting_host.exe", |
| 1089 "$root_out_dir/remoting_native_messaging_host.exe", |
| 1090 "$root_out_dir/remoting_start_host.exe", |
| 1091 "$root_gen_dir/remoting/CREDITS.txt", |
| 1092 "$root_out_dir/remoting/com.google.chrome.remote_assistance.json
", |
| 1093 "$root_out_dir/remoting/com.google.chrome.remote_desktop.json", |
| 1094 "$root_out_dir/icudtl.dat", |
| 1095 ], |
| 1096 root_build_dir) |
| 1097 _extra_files = [] |
| 1098 |
| 1099 args = [ |
| 1100 rebase_path("$root_gen_dir/installation", root_build_dir), |
| 1101 rebase_path(_output, root_build_dir), |
| 1102 "--source-file-roots", |
| 1103 rebase_path("//remoting/host/installer/win"), |
| 1104 "--source-files", |
| 1105 rebase_path("//remoting/host/installer/win/chromoting.wxs"), |
| 1106 rebase_path("//remoting/host/installer/win/parameters.json"), |
| 1107 |
| 1108 # Input files |
| 1109 "--generated-files", |
| 1110 ] + _generated_files + |
| 1111 [ |
| 1112 rebase_path("//remoting/resources/chromoting.ico"), |
| 1113 |
| 1114 # Position of files in zip file |
| 1115 "--generated-files-dst", |
| 1116 "files/remote_assistance_host.exe", |
| 1117 "files/remote_security_key.exe", |
| 1118 "files/remoting_core.dll", |
| 1119 "files/remoting_desktop.exe", |
| 1120 "files/remoting_host.exe", |
| 1121 "files/remoting_native_messaging_host.exe", |
| 1122 "files/remoting_start_host.exe", |
| 1123 "files/CREDITS.txt", |
| 1124 "files/com.google.chrome.remote_assistance.json", |
| 1125 "files/com.google.chrome.remote_desktop.json", |
| 1126 "files/chromoting.ico", |
| 1127 "files/icudtl.dat", |
| 1128 ] + _extra_files + # Defs |
| 1129 [ |
| 1130 "--defs", |
| 1131 "BRANDING=$_branding", |
| 1132 "DAEMON_CONTROLLER_CLSID={$daemon_controller_clsid}", |
| 1133 "RDP_DESKTOP_SESSION_CLSID={$rdp_desktop_session_clsid}", |
| 1134 "VERSION=$chrome_version_full", |
| 1135 "OFFICIAL_BUILD=$_official_build", |
| 1136 ] |
| 1137 } |
| 1138 } else { |
| 1139 group("remoting_me2me_host_archive") { |
| 1140 } |
| 1141 } |
| 1142 |
| 1143 if (is_win && is_chrome_branded) { |
| 1144 if (target_cpu == "x86") { |
| 1145 # The script uses "ia32" instead of "x86". |
| 1146 msi_script_arch = "ia32" |
| 1147 } else { |
| 1148 msi_script_arch = target_cpu |
| 1149 } |
| 1150 |
| 1151 # GYP version: remoting/remoting_host_win.gyp:remoting_host_installation |
| 1152 action("remoting_host_installation") { |
| 637 deps = [ | 1153 deps = [ |
| 638 ":remoting_core", | 1154 "//remoting/host:remoting_me2me_host_archive", |
| 639 ":remoting_windows_resources", | 1155 ] |
| 640 ] | 1156 script = "../tools/zip2msi.py" |
| 641 | |
| 642 if (is_official_build) { | |
| 643 deps += [ ":dpi_aware_elevated_exe_manifest" ] | |
| 644 } else { | |
| 645 deps += [ ":dpi_aware_exe_manifest" ] | |
| 646 } | |
| 647 | |
| 648 sources = [ | |
| 649 "$root_gen_dir/remoting/version.rc", | |
| 650 "win/entry_point.cc", | |
| 651 ] | |
| 652 | |
| 653 ldflags = [ | |
| 654 "/ENTRY:HostEntryPoint", | |
| 655 # "/NODEFAULTLIB", | |
| 656 ] | |
| 657 } | |
| 658 | |
| 659 # GYP version: //remoting/remoting_host_win.gypi:remote_security_key | |
| 660 executable("remote_security_key") { | |
| 661 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
| 662 | |
| 663 defines = host_predefines + [ "BINARY=BINARY_REMOTE_SECURITY_KEY" ] | |
| 664 | |
| 665 deps = [ | |
| 666 ":remoting_core", | |
| 667 ":remoting_windows_resources", | |
| 668 "//build/win:default_exe_manifest", | |
| 669 ] | |
| 670 | |
| 671 sources = [ | |
| 672 "$root_gen_dir/remoting/version.rc", | |
| 673 "security_key/remote_security_key_entry_point.cc", | |
| 674 ] | |
| 675 } | |
| 676 | |
| 677 # GYP version: | |
| 678 # //remoting/remoting_host_win.gypi:remoting_me2me_native_messaging_host | |
| 679 executable("remoting_native_messaging_host") { | |
| 680 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
| 681 | |
| 682 defines = host_predefines + [ "BINARY=BINARY_NATIVE_MESSAGING_HOST" ] | |
| 683 | |
| 684 deps = [ | |
| 685 ":remoting_core", | |
| 686 ":remoting_windows_resources", | |
| 687 "//build/win:default_exe_manifest", | |
| 688 ] | |
| 689 | |
| 690 sources = [ | |
| 691 "$root_gen_dir/remoting/version.rc", | |
| 692 "setup/me2me_native_messaging_host_entry_point.cc", | |
| 693 ] | |
| 694 } | |
| 695 | |
| 696 # GYP version: //remoting/remoting_host_win.gypi:remoting_windows_resources | |
| 697 remoting_localize("remoting_windows_resources") { | |
| 698 deps = [ | |
| 699 "//remoting/resources", | |
| 700 ] | |
| 701 | |
| 702 sources = [ | |
| 703 "win/core.rc.jinja2", | |
| 704 "win/version.rc.jinja2", | |
| 705 ] | |
| 706 | |
| 707 # TODO(zijiehe): Export lastchange_path from | |
| 708 # //chrome/version.gni:process_version | |
| 709 variables = [ | |
| 710 rebase_path(chrome_version_file), | |
| 711 rebase_path(remoting_version_file), | |
| 712 rebase_path("//build/util/LASTCHANGE"), | |
| 713 ] | |
| 714 | |
| 715 output = "$root_gen_dir/remoting/{{source_name_part}}" | |
| 716 | |
| 717 locale_dir = webapp_locale_dir | |
| 718 | |
| 719 encoding = "utf-16" | |
| 720 | |
| 721 locales = remoting_locales | |
| 722 } | |
| 723 | |
| 724 # TODO(GYP) More Windows remoting targets from remoting_host_win.gypi | |
| 725 } | |
| 726 | |
| 727 if (enable_remoting_host && !is_android) { | |
| 728 executable("remoting_start_host") { | |
| 729 sources = [ | |
| 730 "setup/start_host_entry_point.cc", | |
| 731 ] | |
| 732 | |
| 733 deps = [ | |
| 734 "//build/config/sanitizers:deps", | |
| 735 ] | |
| 736 | |
| 737 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
| 738 | |
| 739 if (is_win) { | |
| 740 defines = host_predefines + [ "BINARY=BINARY_REMOTING_START_HOST" ] | |
| 741 | |
| 742 deps += [ | |
| 743 ":remoting_core", | |
| 744 ":remoting_windows_resources", | |
| 745 "//build/win:default_exe_manifest", | |
| 746 ] | |
| 747 } else { | |
| 748 sources += [ | |
| 749 "setup/host_starter.cc", | |
| 750 "setup/host_starter.h", | |
| 751 "setup/start_host_main.cc", | |
| 752 "setup/start_host_main.h", | |
| 753 ] | |
| 754 | |
| 755 deps += [ "//remoting/host/setup" ] | |
| 756 } | |
| 757 | |
| 758 if (enable_webrtc) { | |
| 759 deps += [ "//third_party/libjingle:libjingle_webrtc" ] | |
| 760 } | |
| 761 } | |
| 762 | |
| 763 action_foreach("remoting_native_messaging_manifests") { | |
| 764 if (is_mac) { | |
| 765 assert(false, "not implemented on mac yet") | |
| 766 } else if (is_win) { | |
| 767 me2me_host_path = "remoting_native_messaging_host.exe" | |
| 768 it2me_host_path = "remote_assistance_host.exe" | |
| 769 } else { | |
| 770 me2me_host_path = | |
| 771 "/opt/google/chrome-remote-desktop/native-messaging-host" | |
| 772 it2me_host_path = | |
| 773 "/opt/google/chrome-remote-desktop/remote-assistance-host" | |
| 774 } | |
| 775 | |
| 776 script = "../tools/build/remoting_localize.py" | |
| 777 | |
| 778 sources = [ | |
| 779 "it2me/com.google.chrome.remote_assistance.json.jinja2", | |
| 780 "setup/com.google.chrome.remote_desktop.json.jinja2", | |
| 781 ] | |
| 782 | |
| 783 inputs = [ | |
| 784 branding_path, | |
| 785 ] | |
| 786 | |
| 787 outputs = [ | 1157 outputs = [ |
| 788 "$root_build_dir/remoting/{{source_name_part}}", | 1158 "$root_out_dir/chromoting.msi", |
| 789 ] | 1159 ] |
| 790 | |
| 791 args = [ | 1160 args = [ |
| 792 "--define", | 1161 "--wix_path", |
| 793 "ME2ME_HOST_PATH=$me2me_host_path", | 1162 rebase_path("//third_party/wix"), |
| 794 "--define", | 1163 "--intermediate_dir", |
| 795 "IT2ME_HOST_PATH=$it2me_host_path", | 1164 rebase_path("$root_gen_dir/installation", root_build_dir), |
| 796 "--variables", | 1165 "--target_arch", |
| 797 rebase_path(branding_path), | 1166 msi_script_arch, |
| 798 "--template", | 1167 rebase_path("$root_out_dir/remoting-me2me-host-$current_os.zip", |
| 799 "{{source}}", | 1168 root_build_dir), |
| 800 "--locale_output", | 1169 rebase_path(outputs[0], root_build_dir), |
| 801 "remoting/{{source_name_part}}", | 1170 ] |
| 802 "en", | |
| 803 ] | |
| 804 } | |
| 805 | |
| 806 # TODO(crbug.com/512899) This still needs to be ported to GN. | |
| 807 group("remoting_infoplist_strings") { | |
| 808 } | |
| 809 } | |
| 810 | |
| 811 if (enable_me2me_host) { | |
| 812 source_set("remoting_me2me_host_static") { | |
| 813 sources = [ | |
| 814 "pam_authorization_factory_posix.cc", | |
| 815 "pam_authorization_factory_posix.h", | |
| 816 "remoting_me2me_host.cc", | |
| 817 ] | |
| 818 defines = [] | |
| 819 | |
| 820 configs += [ "//remoting:version" ] | |
| 821 | |
| 822 deps = [ | |
| 823 "//base", | |
| 824 "//base:i18n", | |
| 825 "//components/policy:policy_component_common", | |
| 826 "//net", | |
| 827 "//remoting/base", | |
| 828 "//remoting/host", | |
| 829 "//remoting/proto", | |
| 830 "//third_party/webrtc/modules/desktop_capture", | |
| 831 ] | |
| 832 | |
| 833 if (enable_configuration_policy) { | |
| 834 deps += [ "//components/policy" ] | |
| 835 } | |
| 836 | |
| 837 if (enable_webrtc) { | |
| 838 deps += [ "//third_party/libjingle:libjingle_webrtc" ] | |
| 839 } | |
| 840 | |
| 841 if (is_desktop_linux) { | |
| 842 deps += [ "//build/config/linux/gtk2" ] | |
| 843 } | |
| 844 if ((is_linux && !is_chromeos) || is_mac) { | |
| 845 libs = [ "pam" ] | |
| 846 } | |
| 847 | |
| 848 if (is_mac && is_official_build) { | |
| 849 sources += [ "internal/internal_mac-inl.h" ] | |
| 850 defines += [ "USE_REMOTING_MACOSX_INTERNAL" ] | |
| 851 } | |
| 852 | |
| 853 if (is_win && remoting_multi_process != 0 && remoting_rdp_session != 0) { | |
| 854 defines += [ "REMOTING_RDP_SESSION" ] | |
| 855 } | |
| 856 | |
| 857 if (remoting_multi_process != 0) { | |
| 858 defines += [ "REMOTING_MULTI_PROCESS" ] | |
| 859 } | |
| 860 } | |
| 861 | |
| 862 if (is_win) { | |
| 863 # GYP version: //remoting/remoting_host_win.gypi:remoting_me2me_host | |
| 864 executable("remoting_me2me_host") { | |
| 865 configs += [ | |
| 866 "//build/config/compiler:wexit_time_destructors", | |
| 867 "//build/config/win:windowed", | |
| 868 ] | |
| 869 | |
| 870 defines = host_predefines + [ "BINARY=BINARY_HOST_ME2ME" ] | |
| 871 | |
| 872 deps = [ | |
| 873 ":dpi_aware_exe_manifest", | |
| 874 ":remoting_core", | |
| 875 ":remoting_windows_resources", | |
| 876 ] | |
| 877 | |
| 878 sources = [ | |
| 879 "$root_gen_dir/remoting/version.rc", | |
| 880 "win/entry_point.cc", | |
| 881 ] | |
| 882 | |
| 883 output_name = "remoting_host" | |
| 884 | |
| 885 ldflags = [ | |
| 886 "/ENTRY:HostEntryPoint", | |
| 887 # "/NODEFAULTLIB", | |
| 888 ] | |
| 889 } | |
| 890 } else { | |
| 891 executable("remoting_me2me_host") { | |
| 892 configs += [ "//remoting:version" ] | |
| 893 | |
| 894 sources = [ | |
| 895 "host_main.cc", | |
| 896 "host_main.h", | |
| 897 ] | |
| 898 | |
| 899 if (is_mac && is_chrome_branded && is_official_build) { | |
| 900 defines = [ "REMOTING_ENABLE_BREAKPAD" ] | |
| 901 } | |
| 902 | |
| 903 deps = [ | |
| 904 ":credits", | |
| 905 ":remoting_me2me_host_static", | |
| 906 "//build/config/sanitizers:deps", | |
| 907 ] | |
| 908 } | |
| 909 | |
| 910 if (is_linux) { | |
| 911 copy("remoting_me2me_host_copy_script") { | |
| 912 sources = [ | |
| 913 "linux/linux_me2me_host.py", | |
| 914 ] | |
| 915 outputs = [ | |
| 916 "$root_build_dir/remoting/chrome-remote-desktop", | |
| 917 ] | |
| 918 } | |
| 919 copy("remoting_me2me_host_copy_host") { | |
| 920 sources = [ | |
| 921 "linux/remoting_me2me_host_wrapper.sh", | |
| 922 ] | |
| 923 outputs = [ | |
| 924 "$root_build_dir/remoting/chrome-remote-desktop-host", | |
| 925 ] | |
| 926 deps = [ | |
| 927 ":remoting_me2me_host", | |
| 928 ] | |
| 929 } | |
| 930 group("remoting_dev_me2me_host") { | |
| 931 deps = [ | |
| 932 ":remoting_me2me_host", | |
| 933 ":remoting_me2me_host_copy_host", | |
| 934 ":remoting_me2me_host_copy_script", | |
| 935 ] | |
| 936 } | |
| 937 } | |
| 938 | |
| 939 executable("native_messaging_host") { | |
| 940 sources = [ | |
| 941 "setup/me2me_native_messaging_host_entry_point.cc", | |
| 942 "setup/me2me_native_messaging_host_main.cc", | |
| 943 "setup/me2me_native_messaging_host_main.h", | |
| 944 ] | |
| 945 | |
| 946 deps = [ | |
| 947 ":remoting_infoplist_strings", | |
| 948 "//base", | |
| 949 "//remoting/base:breakpad", | |
| 950 "//remoting/host", | |
| 951 "//remoting/host/native_messaging", | |
| 952 "//remoting/host/setup", | |
| 953 ] | |
| 954 | |
| 955 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
| 956 | |
| 957 # The |major|, |build| and |patch| versions are inherited from Chrome. | |
| 958 # Since Chrome's |minor| version is always '0', we replace it with a | |
| 959 # Chromoting-specific patch version. | |
| 960 defines = [ "VERSION=" + "$chrome_version_major" + "." + | |
| 961 "$remoting_version_patch" + "." + "$chrome_version_build" + | |
| 962 "." + "$chrome_version_patch" ] | |
| 963 | |
| 964 if (is_mac) { | |
| 965 assert(false, "not implemented on mac yet") | |
| 966 } | |
| 967 } | |
| 968 } | |
| 969 | |
| 970 if (is_chrome_branded && enable_me2me_host && is_linux && !is_chromeos) { | |
| 971 # TODO(GYP): add support for archive_chromoting_tests variable? | |
| 972 | |
| 973 import("//build/config/zip.gni") | |
| 974 | |
| 975 build_deb_script = "installer/linux/build_deb.py" | |
| 976 deb_filename = | |
| 977 "$root_build_dir/" + exec_script(build_deb_script, | |
| 978 [ | |
| 979 "-p", | |
| 980 "-s", | |
| 981 rebase_path("//"), | |
| 982 ], | |
| 983 "string", | |
| 984 [ "installer/linux/build-deb.sh" ]) | |
| 985 changes_filename = | |
| 986 "$root_build_dir/" + get_path_info(deb_filename, "name") + ".changes" | |
| 987 | |
| 988 packaging_outputs = [ | |
| 989 deb_filename, | |
| 990 changes_filename, | |
| 991 | |
| 992 # TODO(GYP): Check that these are generated by build_deb.py. | |
| 993 #"$root_build_dir/remoting_me2me_host.debug", | |
| 994 #"$root_build_dir/remoting_start_host.debug", | |
| 995 #"$root_build_dir/native_messaging_host.debug", | |
| 996 #"$root_build_dir/remote_assistance_host.debug", | |
| 997 ] | |
| 998 | |
| 999 zip("remoting_me2me_host_archive") { | |
| 1000 # Store the installer package(s) into a zip file so there is a | |
| 1001 # consistent filename to reference for build archiving (i.e. in | |
| 1002 # FILES.cfg). This also avoids possible conflicts with "wildcard" | |
| 1003 # package handling in other build/signing scripts. | |
| 1004 inputs = packaging_outputs | |
| 1005 output = "$root_build_dir/remoting-me2me-host-linux.zip" | |
| 1006 deps = [ | |
| 1007 ":remoting_me2me_host_copy", | |
| 1008 ] | |
| 1009 } | |
| 1010 | |
| 1011 copy("remoting_me2me_host_copy") { | |
| 1012 # Copy the debian package file, which has version info in it, | |
| 1013 # to a consistewnt filename for use on Chromoting swarming bots. | |
| 1014 sources = [ | |
| 1015 deb_filename, | |
| 1016 ] | |
| 1017 outputs = [ | |
| 1018 "$root_build_dir/remoting-me2me-host.deb", | |
| 1019 ] | |
| 1020 public_deps = [ | |
| 1021 ":remoting_me2me_host_deb_installer", | |
| 1022 ] | |
| 1023 } | |
| 1024 | |
| 1025 action("remoting_me2me_host_deb_installer") { | |
| 1026 script = build_deb_script | |
| 1027 inputs = [ | |
| 1028 build_deb_script, | |
| 1029 "installer/linux/Makefile", | |
| 1030 "installer/linux/debian/chrome-remote-desktop.init", | |
| 1031 "installer/linux/debian/chrome-remote-desktop.pam", | |
| 1032 "installer/linux/debian/compat", | |
| 1033 "installer/linux/debian/control", | |
| 1034 "installer/linux/debian/copyright", | |
| 1035 "installer/linux/debian/postinst", | |
| 1036 "installer/linux/debian/preinst", | |
| 1037 "installer/linux/debian/rules", | |
| 1038 ] | |
| 1039 outputs = packaging_outputs | |
| 1040 sources = [ | |
| 1041 "installer/linux/build-deb.sh", | |
| 1042 ] | |
| 1043 args = [ | |
| 1044 "-s", | |
| 1045 rebase_path("//"), | |
| 1046 "-o", | |
| 1047 rebase_path("$root_build_dir"), | |
| 1048 ] | |
| 1049 | |
| 1050 deps = [ | |
| 1051 ":native_messaging_host", | |
| 1052 ":remoting_me2me_host", | |
| 1053 ":remoting_native_messaging_manifests", | |
| 1054 ":remoting_start_host", | |
| 1055 "//remoting/host/it2me:remote_assistance_host", | |
| 1056 "//remoting/resources", | |
| 1057 "//third_party/icu:icudata", | |
| 1058 ] | |
| 1059 } | |
| 1060 } else if (is_win) { | |
| 1061 # GYP version: //remoting/remoting_host_win.gypi:remoting_me2me_host_archi
ve | |
| 1062 action("remoting_me2me_host_archive") { | |
| 1063 script = "//remoting/host/installer/build-installer-archive.py" | |
| 1064 | |
| 1065 deps = [ | |
| 1066 ":credits", | |
| 1067 ":remote_security_key", | |
| 1068 ":remoting_core", | |
| 1069 ":remoting_desktop", | |
| 1070 ":remoting_me2me_host", | |
| 1071 ":remoting_native_messaging_host", | |
| 1072 ":remoting_native_messaging_manifests", | |
| 1073 ":remoting_start_host", | |
| 1074 "it2me:remote_assistance_host", | |
| 1075 "//third_party/icu:icudata", | |
| 1076 ] | |
| 1077 | |
| 1078 _output = "$root_out_dir/remoting-me2me-host-$target_os.zip" | |
| 1079 | |
| 1080 outputs = [ | |
| 1081 _output, | |
| 1082 ] | |
| 1083 if (is_chrome_branded) { | |
| 1084 _branding = "Chrome" | |
| 1085 } else { | |
| 1086 _branding = "Chromium" | |
| 1087 } | |
| 1088 | |
| 1089 if (is_official_build) { | |
| 1090 _official_build = "1" | |
| 1091 } else { | |
| 1092 _official_build = "0" | |
| 1093 } | |
| 1094 | |
| 1095 _generated_files = rebase_path( | |
| 1096 [ | |
| 1097 "$root_out_dir/remote_assistance_host.exe", | |
| 1098 "$root_out_dir/remote_security_key.exe", | |
| 1099 "$root_out_dir/remoting_core.dll", | |
| 1100 "$root_out_dir/remoting_desktop.exe", | |
| 1101 "$root_out_dir/remoting_host.exe", | |
| 1102 "$root_out_dir/remoting_native_messaging_host.exe", | |
| 1103 "$root_out_dir/remoting_start_host.exe", | |
| 1104 "$root_gen_dir/remoting/CREDITS.txt", | |
| 1105 "$root_out_dir/remoting/com.google.chrome.remote_assistance.js
on", | |
| 1106 "$root_out_dir/remoting/com.google.chrome.remote_desktop.json"
, | |
| 1107 "$root_out_dir/icudtl.dat", | |
| 1108 ], | |
| 1109 root_build_dir) | |
| 1110 _extra_files = [] | |
| 1111 | |
| 1112 args = [ | |
| 1113 rebase_path("$root_gen_dir/installation", root_build_dir), | |
| 1114 rebase_path(_output, root_build_dir), | |
| 1115 "--source-file-roots", | |
| 1116 rebase_path("//remoting/host/installer/win"), | |
| 1117 "--source-files", | |
| 1118 rebase_path("//remoting/host/installer/win/chromoting.wxs"), | |
| 1119 rebase_path("//remoting/host/installer/win/parameters.json"), | |
| 1120 | |
| 1121 # Input files | |
| 1122 "--generated-files", | |
| 1123 ] + _generated_files + | |
| 1124 [ | |
| 1125 rebase_path("//remoting/resources/chromoting.ico"), | |
| 1126 | |
| 1127 # Position of files in zip file | |
| 1128 "--generated-files-dst", | |
| 1129 "files/remote_assistance_host.exe", | |
| 1130 "files/remote_security_key.exe", | |
| 1131 "files/remoting_core.dll", | |
| 1132 "files/remoting_desktop.exe", | |
| 1133 "files/remoting_host.exe", | |
| 1134 "files/remoting_native_messaging_host.exe", | |
| 1135 "files/remoting_start_host.exe", | |
| 1136 "files/CREDITS.txt", | |
| 1137 "files/com.google.chrome.remote_assistance.json", | |
| 1138 "files/com.google.chrome.remote_desktop.json", | |
| 1139 "files/chromoting.ico", | |
| 1140 "files/icudtl.dat", | |
| 1141 ] + _extra_files + # Defs | |
| 1142 [ | |
| 1143 "--defs", | |
| 1144 "BRANDING=$_branding", | |
| 1145 "DAEMON_CONTROLLER_CLSID={$daemon_controller_clsid}", | |
| 1146 "RDP_DESKTOP_SESSION_CLSID={$rdp_desktop_session_clsid}", | |
| 1147 "VERSION=$chrome_version_full", | |
| 1148 "OFFICIAL_BUILD=$_official_build", | |
| 1149 ] | |
| 1150 } | |
| 1151 } else { | |
| 1152 group("remoting_me2me_host_archive") { | |
| 1153 } | |
| 1154 } | |
| 1155 | |
| 1156 if (is_win && is_chrome_branded) { | |
| 1157 if (target_cpu == "x86") { | |
| 1158 # The script uses "ia32" instead of "x86". | |
| 1159 msi_script_arch = "ia32" | |
| 1160 } else { | |
| 1161 msi_script_arch = target_cpu | |
| 1162 } | |
| 1163 | |
| 1164 # GYP version: remoting/remoting_host_win.gyp:remoting_host_installation | |
| 1165 action("remoting_host_installation") { | |
| 1166 deps = [ | |
| 1167 "//remoting/host:remoting_me2me_host_archive", | |
| 1168 ] | |
| 1169 script = "../tools/zip2msi.py" | |
| 1170 outputs = [ | |
| 1171 "$root_out_dir/chromoting.msi", | |
| 1172 ] | |
| 1173 args = [ | |
| 1174 "--wix_path", | |
| 1175 rebase_path("//third_party/wix"), | |
| 1176 "--intermediate_dir", | |
| 1177 rebase_path("$root_gen_dir/installation", root_build_dir), | |
| 1178 "--target_arch", | |
| 1179 msi_script_arch, | |
| 1180 rebase_path("$root_out_dir/remoting-me2me-host-$current_os.zip", | |
| 1181 root_build_dir), | |
| 1182 rebase_path(outputs[0], root_build_dir), | |
| 1183 ] | |
| 1184 } | |
| 1185 } | 1171 } |
| 1186 } | 1172 } |
| 1187 } | 1173 } |
| OLD | NEW |