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

Side by Side Diff: remoting/host/BUILD.gn

Issue 2093393002: Work in progress to port remoting_me2me_host_archive (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make localized prefpane infoplist strings work Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | remoting/host/it2me/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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("//chrome/version.gni")
10 import("//remoting/remoting_enable.gni") 10 import("//remoting/remoting_enable.gni")
11 import("//remoting/remoting_locales.gni") 11 import("//remoting/remoting_locales.gni")
12 import("//remoting/remoting_options.gni") 12 import("//remoting/remoting_options.gni")
13 import("//remoting/remoting_srcs.gni") 13 import("//remoting/remoting_srcs.gni")
14 import("//remoting/remoting_version.gni") 14 import("//remoting/remoting_version.gni")
15 import("//remoting/tools/build/remoting_localize.gni") 15 import("//remoting/tools/build/remoting_localize.gni")
16 16
17 process_version("remoting_version") { 17 process_version("remoting_version") {
18 template_file = "//remoting/host/version.h.in" 18 template_file = "//remoting/host/version.h.in"
19 sources = [ 19 sources = [
20 branding_path, 20 branding_path,
21 ] 21 ]
22 output = "$target_gen_dir/version.h" 22 output = "$target_gen_dir/version.h"
23 } 23 }
24 24
25 if (is_win) { 25 if (is_win) {
26 import("//remoting/host/predefines_win.gni") 26 import("//remoting/host/predefines_win.gni")
27 } else if (is_mac) {
28 import("//build/config/mac/rules.gni")
27 } 29 }
28 30
29 # Reference this manifest to indicate that a process is per-monitor DPI aware. 31 # Reference this manifest to indicate that a process is per-monitor DPI aware.
30 dpi_aware_manifest = "//remoting/host/win/dpi_aware.manifest" 32 dpi_aware_manifest = "//remoting/host/win/dpi_aware.manifest"
31 33
32 # Depending on this target gives a default executable manifest with the addition 34 # Depending on this target gives a default executable manifest with the addition
33 # of the DPI aware tag. 35 # of the DPI aware tag.
34 windows_manifest("dpi_aware_exe_manifest") { 36 windows_manifest("dpi_aware_exe_manifest") {
35 sources = [ 37 sources = [
36 as_invoker_manifest, 38 as_invoker_manifest,
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 786
785 args = [ 787 args = [
786 "--define", 788 "--define",
787 "ME2ME_HOST_PATH=$me2me_host_path", 789 "ME2ME_HOST_PATH=$me2me_host_path",
788 "--define", 790 "--define",
789 "IT2ME_HOST_PATH=$it2me_host_path", 791 "IT2ME_HOST_PATH=$it2me_host_path",
790 "--variables", 792 "--variables",
791 rebase_path(branding_path), 793 rebase_path(branding_path),
792 "--template", 794 "--template",
793 "{{source}}", 795 "{{source}}",
794 "--locale_output", 796 "--output",
795 "remoting/{{source_name_part}}", 797 "remoting/{{source_name_part}}",
796 "en", 798 "en",
797 ] 799 ]
798 } 800 }
799 801
800 # TODO(crbug.com/512899) This still needs to be ported to GN. 802 action_foreach("remoting_infoplist_strings") {
801 group("remoting_infoplist_strings") { 803 sources = [
804 "installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2",
805 "it2me/remote_assistance_host-InfoPlist.strings.jinja2",
806 "mac/me2me_preference_pane-InfoPlist.strings.jinja2",
807 "remoting_me2me_host-InfoPlist.strings.jinja2",
808 "setup/native_messaging_host-InfoPlist.strings.jinja2",
809 ]
810
811 script = "//remoting/tools/build/remoting_localize.py"
812 args = [
813 "--locale_dir",
814 rebase_path(webapp_locale_dir, root_build_dir),
815 "--variables",
816 rebase_path(branding_path),
817 "--template",
818 "{{source}}",
819 "--locale_output",
820 rebase_path(
821 "$root_gen_dir/remoting/host/{{source_name_part}}/@{json_suffix }.lproj/InfoPlist.strings",
822 root_build_dir),
823 ] + remoting_locales_with_underscores
824
825 outputs = []
826 foreach(locale, remoting_locales_with_underscores) {
827 outputs += [ "$root_gen_dir/remoting/host/{{source_name_part}}/$locale.lpr oj/InfoPlist.strings" ]
828 }
829
830 deps = [
831 "//remoting/resources",
832 "//remoting/resources:strings",
833 ]
802 } 834 }
803 } 835 }
804 836
805 if (enable_me2me_host) { 837 if (enable_me2me_host) {
806 source_set("remoting_me2me_host_static") { 838 source_set("remoting_me2me_host_static") {
807 sources = [ 839 sources = [
808 "pam_authorization_factory_posix.cc", 840 "pam_authorization_factory_posix.cc",
809 "pam_authorization_factory_posix.h", 841 "pam_authorization_factory_posix.h",
810 "remoting_me2me_host.cc", 842 "remoting_me2me_host.cc",
811 ] 843 ]
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 ] 907 ]
876 908
877 output_name = "remoting_host" 909 output_name = "remoting_host"
878 910
879 ldflags = [ 911 ldflags = [
880 "/ENTRY:HostEntryPoint", 912 "/ENTRY:HostEntryPoint",
881 # "/NODEFAULTLIB", 913 # "/NODEFAULTLIB",
882 ] 914 ]
883 } 915 }
884 } else { 916 } else {
885 executable("remoting_me2me_host") { 917 if (is_mac) {
886 configs += [ "//remoting:version" ] 918 app_target_type = "mac_app_bundle"
919 } else {
920 app_target_type = "executable"
921 }
922
923 target(app_target_type, "remoting_me2me_host") {
924 if (is_mac) {
925 extra_configs = [ "//remoting:version" ]
926 info_plist = "remoting_me2me_host-Info.plist"
927 } else {
928 configs += [ "//remoting:version" ]
929 }
887 930
888 sources = [ 931 sources = [
889 "host_main.cc", 932 "host_main.cc",
890 "host_main.h", 933 "host_main.h",
891 ] 934 ]
892 935
893 if (is_mac && is_chrome_branded && is_official_build) { 936 if (is_mac && is_chrome_branded && is_official_build) {
894 defines = [ "REMOTING_ENABLE_BREAKPAD" ] 937 defines = [ "REMOTING_ENABLE_BREAKPAD" ]
895 } 938 }
896 939
897 deps = [ 940 deps = [
898 ":credits", 941 ":credits",
899 ":remoting_me2me_host_static", 942 ":remoting_me2me_host_static",
900 "//build/config/sanitizers:deps", 943 "//build/config/sanitizers:deps",
944 "//remoting/resources",
901 ] 945 ]
902 } 946 }
903 947
904 if (is_linux) { 948 if (is_linux) {
905 copy("remoting_me2me_host_copy_script") { 949 copy("remoting_me2me_host_copy_script") {
906 sources = [ 950 sources = [
907 "linux/linux_me2me_host.py", 951 "linux/linux_me2me_host.py",
908 ] 952 ]
909 outputs = [ 953 outputs = [
910 "$root_build_dir/remoting/chrome-remote-desktop", 954 "$root_build_dir/remoting/chrome-remote-desktop",
(...skipping 12 matching lines...) Expand all
923 } 967 }
924 group("remoting_dev_me2me_host") { 968 group("remoting_dev_me2me_host") {
925 deps = [ 969 deps = [
926 ":remoting_me2me_host", 970 ":remoting_me2me_host",
927 ":remoting_me2me_host_copy_host", 971 ":remoting_me2me_host_copy_host",
928 ":remoting_me2me_host_copy_script", 972 ":remoting_me2me_host_copy_script",
929 ] 973 ]
930 } 974 }
931 } 975 }
932 976
933 executable("native_messaging_host") { 977 target(app_target_type, "native_messaging_host") {
978 if (is_mac) {
979 info_plist = "setup/native_messaging_host-Info.plist"
980 extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
981 } else {
982 configs += [ "//build/config/compiler:wexit_time_destructors" ]
983 }
984
934 sources = [ 985 sources = [
935 "setup/me2me_native_messaging_host_entry_point.cc", 986 "setup/me2me_native_messaging_host_entry_point.cc",
936 "setup/me2me_native_messaging_host_main.cc", 987 "setup/me2me_native_messaging_host_main.cc",
937 "setup/me2me_native_messaging_host_main.h", 988 "setup/me2me_native_messaging_host_main.h",
938 ] 989 ]
939 990
940 deps = [ 991 deps = [
941 ":remoting_infoplist_strings", 992 ":remoting_infoplist_strings",
942 "//base", 993 "//base",
943 "//remoting/base:breakpad", 994 "//remoting/base:breakpad",
944 "//remoting/host", 995 "//remoting/host",
945 "//remoting/host/native_messaging", 996 "//remoting/host/native_messaging",
946 "//remoting/host/setup", 997 "//remoting/host/setup",
947 ] 998 ]
948 999
949 configs += [ "//build/config/compiler:wexit_time_destructors" ]
950
951 # The |major|, |build| and |patch| versions are inherited from Chrome. 1000 # The |major|, |build| and |patch| versions are inherited from Chrome.
952 # Since Chrome's |minor| version is always '0', we replace it with a 1001 # Since Chrome's |minor| version is always '0', we replace it with a
953 # Chromoting-specific patch version. 1002 # Chromoting-specific patch version.
954 defines = [ "VERSION=" + "$chrome_version_major" + "." + 1003 defines = [ "VERSION=" + "$chrome_version_major" + "." +
955 "$remoting_version_patch" + "." + "$chrome_version_build" + 1004 "$remoting_version_patch" + "." + "$chrome_version_build" +
956 "." + "$chrome_version_patch" ] 1005 "." + "$chrome_version_patch" ]
957 } 1006 }
958 } 1007 }
959 1008
960 if (is_chrome_branded && enable_me2me_host && is_linux && !is_chromeos) { 1009 if (is_chrome_branded && enable_me2me_host && is_linux && !is_chromeos) {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 "--defs", 1182 "--defs",
1134 "BRANDING=$_branding", 1183 "BRANDING=$_branding",
1135 "DAEMON_CONTROLLER_CLSID={$daemon_controller_clsid}", 1184 "DAEMON_CONTROLLER_CLSID={$daemon_controller_clsid}",
1136 "RDP_DESKTOP_SESSION_CLSID={$rdp_desktop_session_clsid}", 1185 "RDP_DESKTOP_SESSION_CLSID={$rdp_desktop_session_clsid}",
1137 "VERSION=$chrome_version_full", 1186 "VERSION=$chrome_version_full",
1138 "OFFICIAL_BUILD=$_official_build", 1187 "OFFICIAL_BUILD=$_official_build",
1139 ] 1188 ]
1140 } 1189 }
1141 } else if (is_mac) { 1190 } else if (is_mac) {
1142 import("//build/config/zip.gni") 1191 import("//build/config/zip.gni")
1143 zip("remoting_me2me_host_archive") { 1192
1144 # TODO(crbug.com/622415) - This list of inputs is totally wrong 1193 action("remoting_me2me_host_archive") {
1145 # and we need the real installer ported over from 1194 # TODO(GYP) TODO(crbug.com/622415) This needs work and testing.
1146 # remoting/remoting_host_mac.gypi but for now this creates at 1195
1147 # least a placeholder .zip file. 1196 # TODO(GYP) At the very least, we need to add in the localized strings.
1148 inputs = [ 1197
1149 # "$root_build_dir/remoting_me2me_host", 1198 _installer_mac_files = [
1150 ] 1199 "installer/mac/do_signing.sh",
1151 output = "$root_build_dir/remoting-me2me-host-mac.zip" 1200 "installer/mac/do_signing.props",
1152 deps = [ 1201 "installer/mac/ChromotingHost.pkgproj",
1153 # ":remoting_me2me_host", 1202 "installer/mac/ChromotingHostService.pkgproj",
1203 "installer/mac/ChromotingHostUninstaller.pkgproj",
1204 "installer/mac/LaunchAgents/org.chromium.chromoting.plist",
1205 "installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh",
1206 "installer/mac/Scripts/keystone_install.sh",
1207 "installer/mac/Scripts/remoting_postflight.sh",
1208 "installer/mac/Scripts/remoting_preflight.sh",
1209 "installer/mac/Keystone/GoogleSoftwareUpdate.pkg",
1210 "//chrome/installer/mac/pkg-dmg",
1211 ]
1212
1213 inputs = _installer_mac_files
1214
1215 zip_path = "$root_build_dir/remoting-me2me-host-mac.zip"
1216
1217 outputs = [
1218 "$root_build_dir/remoting-me2me-host-mac.zip",
1219 ]
1220
1221 script = "installer/build-installer-archive.py"
1222
1223 # TODO(GYP) TODO(crbug.com/622415): Fill these in.
1224 host_name_nospace = host_name
1225 host_service_name_nospace = host_service_name
1226 host_uninstaller_name_nospace = host_uninstaller_name
1227
1228 args = [
1229 rebase_path(target_gen_dir, root_build_dir),
1230 rebase_path(zip_path, root_build_dir),
1231 "--source-file-roots",
1232 rebase_path("installer/mac/", root_build_dir),
1233 rebase_path("//chrome/installer/mac", root_build_dir),
1234 "--source-files",
1235 ] + rebase_path(_installer_mac_files, root_build_dir) + [
1236 "--generated-files",
1237 "remoting_host_prefpane.prefPane",
1238 "remoting_me2me_host.app",
1239 "native_messaging_host.app",
1240 "remote_assistance_host.app",
1241 "remoting_host_uninstaller.app",
1242 "remoting/com.google.chrome.remote_desktop.json",
1243 "remoting/com.google.chrome.remote_assistance.json",
1244 "--generated-files-dst",
1245 "PreferencePanes/$prefpane_bundle_name",
1246 "PrivilegedHelperTools/$host_bundle_name",
1247 "PrivilegedHelperTools/$host_bundle_name/Contents/MacOS/$native_m essaging_host_bundle_name",
1248 "PrivilegedHelperTools/$host_bundle_name/Contents/MacOS/$remote_a ssistance_host_bundle_name",
1249 "Applications/$host_uninstaller_name.app",
1250 "Config/com.google.chrome.remote_desktop.json",
1251 "Config/com.google.chrome.remote_assistance.json",
1252 "--defs",
1253 "VERSION=$chrome_version_full",
1254 "VERSION_SHORT=$chrome_version_major.$chrome_version_minor.$chrom e_version_build",
1255 "VERSION_MAJOR=$chrome_version_major",
1256 "VERSION_MINOR=$chrome_version_minor",
1257 "HOST_NAME=$host_name",
1258 "HOST_BUNDLE_NAME=$me2me_host_bundle_name",
1259 "HOST_SERVICE_NAME=$host_service_name",
1260 "HOST_UNINSTALLER_NAME=$host_uninstaller_name",
1261 "HOST_PKG=$host_name",
1262 "HOST_SERVICE_PKG=$host_service_name_nospace",
1263 "HOST_UNINSTALLER_PKG=$host_uninstaller_name_nospace",
1264 "BUNDLE_ID_HOST=$bundle_prefix.$host_name_nospace",
1265 "BUNDLE_ID_HOST_SERVICE=$bundle_prefix.$host_service_name_nospace ",
1266 "BUNDLE_ID_HOST_UNINSTALLER=$bundle_prefix.$host_uninstaller_name _nospace",
1267 "DMG_VOLUME_NAME=$host_name $chrome_version_full",
1268 "DMG_FILE_NAME=$host_name_nospace-$chrome_version_full",
1269 "NATIVE_MESSAGING_HOST_BUNDLE_NAME=$native_messaging_host_bundle_ name",
1270 "REMOTE_ASSISTANCE_HOST_BUNDLE_NAME=$remote_assistance_host_bundl e_name",
1271 "PREFPANE_BUNDLE_NAME=$prefpane_bundle_name",
1272 ]
1273
1274 deps = [
1275 ":native_messaging_host",
1276 ":remoting_host_prefpane.prefPane",
1277 ":remoting_host_uninstaller",
1278 ":remoting_me2me_host",
1279 ":remoting_native_messaging_manifests",
1280 "//remoting/host/it2me:remote_assistance_host",
1281 ]
1282 }
1283
1284 _uninstaller_plist =
1285 "installer/mac/uninstaller/remoting_uninstaller-Info.plist"
1286
1287 mac_app_bundle("remoting_host_uninstaller") {
1288 info_plist = _uninstaller_plist
1289
1290 defines = [
1291 "HOST_BUNDLE_NAME=\"" + host_bundle_name + "\"",
1292 "PREFPANE_BUNDLE_NAME=\"" + prefpane_bundle_name + "\"",
1293 ]
1294
1295 sources = [
1296 "constants_mac.cc",
1297 "constants_mac.h",
1298 "installer/mac/uninstaller/remoting_uninstaller.h",
1299 "installer/mac/uninstaller/remoting_uninstaller.mm",
1300 "installer/mac/uninstaller/remoting_uninstaller_app.h",
1301 "installer/mac/uninstaller/remoting_uninstaller_app.mm",
1302 ]
1303
1304 libs = [
1305 "Cocoa.framework",
1306 "CoreFoundation.framework",
1307 "Security.framework",
1308 ]
1309
1310 deps = [
1311 ":remoting_host_uninstaller_xibs",
1312 ":remoting_infoplist_strings",
1313 "//base",
1314 ]
1315 }
1316
1317 mac_xib_bundle_data("remoting_host_uninstaller_xibs") {
1318 sources = [
1319 #"installer/mac/uninstaller/remoting_uninstaller.icns",
1320 "installer/mac/uninstaller/remoting_uninstaller.xib",
1321 #_uninstaller_plist
1322 ]
1323 }
1324
1325 create_bundle("remoting_host_prefpane.prefPane") {
1326 bundle_root_dir = "$root_build_dir/$target_name/Contents"
1327 bundle_resources_dir = bundle_root_dir + "/Resources"
1328 bundle_executable_dir = bundle_root_dir + "/MacOS"
1329
1330 deps = [
1331 ":remoting_host_prefpane",
1332 ":remoting_host_prefpane_bundle_data",
1333 ":remoting_host_prefpane_plist",
1334 ":remoting_host_prefpane_xibs",
1335 ":remoting_infoplist_strings",
1336 ]
1337
1338 foreach(locale, remoting_locales_with_underscores) {
1339 deps += [ ":remoting_host_prefpane_strings_${locale}_bundle_data" ]
1340 }
1341 }
1342
1343 bundle_data("remoting_host_prefpane_bundle_data") {
1344 deps = [
1345 ":remoting_host_prefpane",
1346 ]
1347 sources = [
1348 "$root_build_dir/gen/remoting/host/remoting_host_prefpane",
1349 ]
1350 outputs = [
1351 "{{bundle_executable_dir}}/remoting_host_prefname",
1352 ]
1353 }
1354
1355 loadable_module("remoting_host_prefpane") {
1356 output_dir = "$root_out_dir/gen/remoting/host"
1357 output_extension = ""
1358
1359 sources = [
1360 "mac/me2me_preference_pane.h",
1361 "mac/me2me_preference_pane.mm",
1362 "mac/me2me_preference_pane_confirm_pin.h",
1363 "mac/me2me_preference_pane_confirm_pin.mm",
1364 "mac/me2me_preference_pane_disable.h",
1365 "mac/me2me_preference_pane_disable.mm",
1366 ]
1367
1368 libs = [
1369 "Cocoa.framework",
1370 "CoreFoundation.framework",
1371 "PreferencePanes.framework",
1372 "Security.framework",
1373 ]
1374
1375 deps = [
1376 ":host",
1377 ":remoting_host_prefpane_xibs",
1378 ":remoting_infoplist_strings",
1379 "//remoting/base",
1380 "//third_party/jsoncpp",
1381 ]
1382 }
1383
1384 bundle_data("remoting_host_prefpane_plist") {
1385 sources = [
1386 "mac/me2me_preference_pane-Info.plist",
1387 ]
1388 outputs = [
1389 "{{bundle_root_dir}}/Info.plist",
1390 ]
1391 }
1392
1393 foreach(locale, remoting_locales_with_underscores) {
1394 bundle_data("remoting_host_prefpane_strings_${locale}_bundle_data") {
1395 sources = [
1396 "$root_gen_dir/remoting/host/me2me_preference_pane-InfoPlist.strings/$ locale.lproj/InfoPlist.strings",
1397 ]
1398 outputs = [
1399 "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}",
1400 ]
1401 deps = [
1402 ":remoting_infoplist_strings",
1403 ]
1404 }
1405 }
1406
1407 mac_xib_bundle_data("remoting_host_prefpane_xibs") {
1408 sources = [
1409 "mac/me2me_preference_pane.xib",
1410 #"mac/me2me_preference_pane_confirm_pin.xib",
1411 #"mac/me2me_preference_pane_disable.xib",
1412 #"mac/me2me_preference_pane-Info.plist",
1413 #"//remoting/resources/chromoting128.png",
1154 ] 1414 ]
1155 } 1415 }
1156 } else { 1416 } else {
1157 group("remoting_me2me_host_archive") { 1417 group("remoting_me2me_host_archive") {
1158 } 1418 }
1159 } 1419 }
1160 1420
1161 if (is_win && is_chrome_branded) { 1421 if (is_win && is_chrome_branded) {
1162 # We do not release a 64 bits binary. So to avoid any potential 1422 # We do not release a 64 bits binary. So to avoid any potential
1163 # misunderstanding, we only build 32 bits MSI file. 1423 # misunderstanding, we only build 32 bits MSI file.
(...skipping 21 matching lines...) Expand all
1185 root_build_dir), 1445 root_build_dir),
1186 rebase_path(outputs[0], root_build_dir), 1446 rebase_path(outputs[0], root_build_dir),
1187 ] 1447 ]
1188 } 1448 }
1189 } else { 1449 } else {
1190 group("remoting_host_installation") { 1450 group("remoting_host_installation") {
1191 } 1451 }
1192 } 1452 }
1193 } 1453 }
1194 } 1454 }
OLDNEW
« no previous file with comments | « no previous file | remoting/host/it2me/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698