blob: 680169b258397ce615c22dedc4bb356bddd32533 [file] [log] [blame]
Avi Drissmand6cdf9b2022-09-15 19:52:531# Copyright 2014 The Chromium Authors
Brett Wilson1c693992014-08-25 19:10:012# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
brettw2b2364b2015-05-01 22:36:235import("//build/config/chrome_build.gni")
Andrew Grieve19a00ca2022-07-29 19:01:486import("//chrome/version.gni")
rsesekc311f112016-07-23 03:35:527
8remoting_version_file = "//remoting/VERSION"
brettw2b2364b2015-05-01 22:36:239
Brett Wilson1c693992014-08-25 19:10:0110_version_py_abspath = "//build/util/version.py"
kelvinp98a750692014-11-12 21:31:4311if (is_chrome_branded) {
12 _remoting_branding_abspath = "//remoting/branding_Chrome"
13} else {
14 _remoting_branding_abspath = "//remoting/branding_Chromium"
15}
Brett Wilson1c693992014-08-25 19:10:0116
17# Set these files as being input dependencies to the scripts, so the build will
18# be re-run if the files change.
garykacc1fd3a32015-05-16 00:21:0519remoting_version_files = [
rsesekc311f112016-07-23 03:35:5220 remoting_version_file,
kelvinp98a750692014-11-12 21:31:4321 _remoting_branding_abspath,
22]
Brett Wilson1c693992014-08-25 19:10:0123
rsesekc311f112016-07-23 03:35:5224_remoting_version_path = rebase_path(remoting_version_file, root_build_dir)
scottmg34fb7e52014-12-03 23:27:2425_remoting_branding_path =
26 rebase_path(_remoting_branding_abspath, root_build_dir)
Brett Wilson1c693992014-08-25 19:10:0127
Jamie Walchd2e38272019-08-28 02:28:1128_template =
rsesekc311f112016-07-23 03:35:5229 "mac_native_messaging_bundle = \"@MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME@\" "
30_template += "mac_remote_assistance_bundle = \"@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@\" "
rsesekc311f112016-07-23 03:35:5231_template += "host_bundle_name = \"@MAC_HOST_BUNDLE_NAME@\" "
Jamie Walchd2e38272019-08-28 02:28:1132_template += "host_legacy_bundle_name = \"@MAC_HOST_LEGACY_BUNDLE_NAME@\" "
rsesekc311f112016-07-23 03:35:5233_template += "host_name= \"@MAC_HOST_PACKAGE_NAME@\" "
34_template += "host_service_name = \"@DAEMON_FILE_NAME@\" "
35_template += "bundle_prefix = \"@MAC_UNINSTALLER_BUNDLE_PREFIX@\" "
36_template += "host_uninstaller_name = \"@MAC_UNINSTALLER_NAME@\" "
37_template += "version_patch = \"@REMOTING_PATCH@\" "
38
39if (is_mac) {
40 _template += "host_bundle_id = \"@MAC_HOST_BUNDLE_ID@\" "
41 _template += "native_messaging_host_bundle_id = \"@MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID@\""
rsesekc311f112016-07-23 03:35:5242 _template += "remote_assistance_host_bundle_id = \"@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID@\" "
43 _template += "uninstaller_bundle_id = \"@MAC_UNINSTALLER_BUNDLE_ID@\""
44}
kelvinp98a750692014-11-12 21:31:4345
nicholss28f74dd2017-01-27 16:14:1046if (is_ios) {
47 _template += "ios_bundle_id = \"@IOS_BUNDLE_ID@\""
48 _template += "ios_display_name = \"@IOS_DISPLAY_NAME@\""
49 _template += "ios_exec_name = \"@IOS_EXEC_NAME@\""
50 _template += "ios_product_name = \"@IOS_PRODUCT_NAME@\""
51}
52
nicholsse6fb2622016-06-15 18:11:0653_result = exec_script(_version_py_abspath,
54 [
55 "-f",
56 _remoting_branding_path,
rsesekc311f112016-07-23 03:35:5257 "-f",
58 _remoting_version_path,
nicholsse6fb2622016-06-15 18:11:0659 "-t",
rsesekc311f112016-07-23 03:35:5260 _template,
nicholsse6fb2622016-06-15 18:11:0661 ],
62 "scope",
63 remoting_version_files)
64
dpranke90f80f72016-06-30 00:24:3465host_name = _result.host_name
66host_service_name = _result.host_service_name
67bundle_prefix = _result.bundle_prefix
68host_uninstaller_name = _result.host_uninstaller_name
Jamie Walchd2e38272019-08-28 02:28:1169me2me_host_bundle_name = _result.host_bundle_name
70me2me_host_legacy_bundle_name = _result.host_legacy_bundle_name
nicholsse6fb2622016-06-15 18:11:0671native_messaging_host_bundle_name = _result.mac_native_messaging_bundle
72remote_assistance_host_bundle_name = _result.mac_remote_assistance_bundle
rsesekc311f112016-07-23 03:35:5273remoting_version_patch = _result.version_patch
74remoting_version_short =
75 "$chrome_version_major.$remoting_version_patch.$chrome_version_build"
76remoting_version_full = "$remoting_version_short.$chrome_version_patch"
77
78if (is_mac) {
79 host_bundle_id = _result.host_bundle_id
80 native_messaging_host_bundle_id = _result.native_messaging_host_bundle_id
rsesekc311f112016-07-23 03:35:5281 remote_assistance_host_bundle_id = _result.remote_assistance_host_bundle_id
82 uninstaller_bundle_id = _result.uninstaller_bundle_id
nicholss9e01f1252016-10-18 00:45:0183
84 host_name_nospace = exec_script("//remoting/tools/remove_spaces.py",
85 [ "$host_name" ],
86 "trim string")
87 host_service_name_nospace = exec_script("//remoting/tools/remove_spaces.py",
88 [ "$host_service_name" ],
89 "trim string")
90 host_uninstaller_name_nospace =
91 exec_script("//remoting/tools/remove_spaces.py",
92 [ "$host_uninstaller_name" ],
93 "trim string")
rsesekc311f112016-07-23 03:35:5294}
nicholss28f74dd2017-01-27 16:14:1095
96if (is_ios) {
97 remoting_ios_bundle_id = _result.ios_bundle_id
98 remoting_ios_display_name = _result.ios_display_name
99 remoting_ios_executable_name = _result.ios_exec_name
100 remoting_ios_product_name = _result.ios_product_name
101}