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

Unified 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, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/host/it2me/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/BUILD.gn
diff --git a/remoting/host/BUILD.gn b/remoting/host/BUILD.gn
index 52b096397089bbabc80dad0facb1796ebe7057d6..df6ce1feff1d8d363048597ef5692e3998d03ef7 100644
--- a/remoting/host/BUILD.gn
+++ b/remoting/host/BUILD.gn
@@ -24,6 +24,8 @@ process_version("remoting_version") {
if (is_win) {
import("//remoting/host/predefines_win.gni")
+} else if (is_mac) {
+ import("//build/config/mac/rules.gni")
}
# Reference this manifest to indicate that a process is per-monitor DPI aware.
@@ -791,14 +793,44 @@ if (enable_remoting_host && !is_android) {
rebase_path(branding_path),
"--template",
"{{source}}",
- "--locale_output",
+ "--output",
"remoting/{{source_name_part}}",
"en",
]
}
- # TODO(crbug.com/512899) This still needs to be ported to GN.
- group("remoting_infoplist_strings") {
+ action_foreach("remoting_infoplist_strings") {
+ sources = [
+ "installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2",
+ "it2me/remote_assistance_host-InfoPlist.strings.jinja2",
+ "mac/me2me_preference_pane-InfoPlist.strings.jinja2",
+ "remoting_me2me_host-InfoPlist.strings.jinja2",
+ "setup/native_messaging_host-InfoPlist.strings.jinja2",
+ ]
+
+ script = "//remoting/tools/build/remoting_localize.py"
+ args = [
+ "--locale_dir",
+ rebase_path(webapp_locale_dir, root_build_dir),
+ "--variables",
+ rebase_path(branding_path),
+ "--template",
+ "{{source}}",
+ "--locale_output",
+ rebase_path(
+ "$root_gen_dir/remoting/host/{{source_name_part}}/@{json_suffix}.lproj/InfoPlist.strings",
+ root_build_dir),
+ ] + remoting_locales_with_underscores
+
+ outputs = []
+ foreach(locale, remoting_locales_with_underscores) {
+ outputs += [ "$root_gen_dir/remoting/host/{{source_name_part}}/$locale.lproj/InfoPlist.strings" ]
+ }
+
+ deps = [
+ "//remoting/resources",
+ "//remoting/resources:strings",
+ ]
}
}
@@ -882,8 +914,19 @@ if (enable_me2me_host) {
]
}
} else {
- executable("remoting_me2me_host") {
- configs += [ "//remoting:version" ]
+ if (is_mac) {
+ app_target_type = "mac_app_bundle"
+ } else {
+ app_target_type = "executable"
+ }
+
+ target(app_target_type, "remoting_me2me_host") {
+ if (is_mac) {
+ extra_configs = [ "//remoting:version" ]
+ info_plist = "remoting_me2me_host-Info.plist"
+ } else {
+ configs += [ "//remoting:version" ]
+ }
sources = [
"host_main.cc",
@@ -898,6 +941,7 @@ if (enable_me2me_host) {
":credits",
":remoting_me2me_host_static",
"//build/config/sanitizers:deps",
+ "//remoting/resources",
]
}
@@ -930,7 +974,14 @@ if (enable_me2me_host) {
}
}
- executable("native_messaging_host") {
+ target(app_target_type, "native_messaging_host") {
+ if (is_mac) {
+ info_plist = "setup/native_messaging_host-Info.plist"
+ extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
+ } else {
+ configs += [ "//build/config/compiler:wexit_time_destructors" ]
+ }
+
sources = [
"setup/me2me_native_messaging_host_entry_point.cc",
"setup/me2me_native_messaging_host_main.cc",
@@ -946,8 +997,6 @@ if (enable_me2me_host) {
"//remoting/host/setup",
]
- configs += [ "//build/config/compiler:wexit_time_destructors" ]
-
# The |major|, |build| and |patch| versions are inherited from Chrome.
# Since Chrome's |minor| version is always '0', we replace it with a
# Chromoting-specific patch version.
@@ -1140,17 +1189,228 @@ if (enable_me2me_host) {
}
} else if (is_mac) {
import("//build/config/zip.gni")
- zip("remoting_me2me_host_archive") {
- # TODO(crbug.com/622415) - This list of inputs is totally wrong
- # and we need the real installer ported over from
- # remoting/remoting_host_mac.gypi but for now this creates at
- # least a placeholder .zip file.
- inputs = [
- # "$root_build_dir/remoting_me2me_host",
+
+ action("remoting_me2me_host_archive") {
+ # TODO(GYP) TODO(crbug.com/622415) This needs work and testing.
+
+ # TODO(GYP) At the very least, we need to add in the localized strings.
+
+ _installer_mac_files = [
+ "installer/mac/do_signing.sh",
+ "installer/mac/do_signing.props",
+ "installer/mac/ChromotingHost.pkgproj",
+ "installer/mac/ChromotingHostService.pkgproj",
+ "installer/mac/ChromotingHostUninstaller.pkgproj",
+ "installer/mac/LaunchAgents/org.chromium.chromoting.plist",
+ "installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh",
+ "installer/mac/Scripts/keystone_install.sh",
+ "installer/mac/Scripts/remoting_postflight.sh",
+ "installer/mac/Scripts/remoting_preflight.sh",
+ "installer/mac/Keystone/GoogleSoftwareUpdate.pkg",
+ "//chrome/installer/mac/pkg-dmg",
+ ]
+
+ inputs = _installer_mac_files
+
+ zip_path = "$root_build_dir/remoting-me2me-host-mac.zip"
+
+ outputs = [
+ "$root_build_dir/remoting-me2me-host-mac.zip",
]
- output = "$root_build_dir/remoting-me2me-host-mac.zip"
+
+ script = "installer/build-installer-archive.py"
+
+ # TODO(GYP) TODO(crbug.com/622415): Fill these in.
+ host_name_nospace = host_name
+ host_service_name_nospace = host_service_name
+ host_uninstaller_name_nospace = host_uninstaller_name
+
+ args = [
+ rebase_path(target_gen_dir, root_build_dir),
+ rebase_path(zip_path, root_build_dir),
+ "--source-file-roots",
+ rebase_path("installer/mac/", root_build_dir),
+ rebase_path("//chrome/installer/mac", root_build_dir),
+ "--source-files",
+ ] + rebase_path(_installer_mac_files, root_build_dir) + [
+ "--generated-files",
+ "remoting_host_prefpane.prefPane",
+ "remoting_me2me_host.app",
+ "native_messaging_host.app",
+ "remote_assistance_host.app",
+ "remoting_host_uninstaller.app",
+ "remoting/com.google.chrome.remote_desktop.json",
+ "remoting/com.google.chrome.remote_assistance.json",
+ "--generated-files-dst",
+ "PreferencePanes/$prefpane_bundle_name",
+ "PrivilegedHelperTools/$host_bundle_name",
+ "PrivilegedHelperTools/$host_bundle_name/Contents/MacOS/$native_messaging_host_bundle_name",
+ "PrivilegedHelperTools/$host_bundle_name/Contents/MacOS/$remote_assistance_host_bundle_name",
+ "Applications/$host_uninstaller_name.app",
+ "Config/com.google.chrome.remote_desktop.json",
+ "Config/com.google.chrome.remote_assistance.json",
+ "--defs",
+ "VERSION=$chrome_version_full",
+ "VERSION_SHORT=$chrome_version_major.$chrome_version_minor.$chrome_version_build",
+ "VERSION_MAJOR=$chrome_version_major",
+ "VERSION_MINOR=$chrome_version_minor",
+ "HOST_NAME=$host_name",
+ "HOST_BUNDLE_NAME=$me2me_host_bundle_name",
+ "HOST_SERVICE_NAME=$host_service_name",
+ "HOST_UNINSTALLER_NAME=$host_uninstaller_name",
+ "HOST_PKG=$host_name",
+ "HOST_SERVICE_PKG=$host_service_name_nospace",
+ "HOST_UNINSTALLER_PKG=$host_uninstaller_name_nospace",
+ "BUNDLE_ID_HOST=$bundle_prefix.$host_name_nospace",
+ "BUNDLE_ID_HOST_SERVICE=$bundle_prefix.$host_service_name_nospace",
+ "BUNDLE_ID_HOST_UNINSTALLER=$bundle_prefix.$host_uninstaller_name_nospace",
+ "DMG_VOLUME_NAME=$host_name $chrome_version_full",
+ "DMG_FILE_NAME=$host_name_nospace-$chrome_version_full",
+ "NATIVE_MESSAGING_HOST_BUNDLE_NAME=$native_messaging_host_bundle_name",
+ "REMOTE_ASSISTANCE_HOST_BUNDLE_NAME=$remote_assistance_host_bundle_name",
+ "PREFPANE_BUNDLE_NAME=$prefpane_bundle_name",
+ ]
+
deps = [
- # ":remoting_me2me_host",
+ ":native_messaging_host",
+ ":remoting_host_prefpane.prefPane",
+ ":remoting_host_uninstaller",
+ ":remoting_me2me_host",
+ ":remoting_native_messaging_manifests",
+ "//remoting/host/it2me:remote_assistance_host",
+ ]
+ }
+
+ _uninstaller_plist =
+ "installer/mac/uninstaller/remoting_uninstaller-Info.plist"
+
+ mac_app_bundle("remoting_host_uninstaller") {
+ info_plist = _uninstaller_plist
+
+ defines = [
+ "HOST_BUNDLE_NAME=\"" + host_bundle_name + "\"",
+ "PREFPANE_BUNDLE_NAME=\"" + prefpane_bundle_name + "\"",
+ ]
+
+ sources = [
+ "constants_mac.cc",
+ "constants_mac.h",
+ "installer/mac/uninstaller/remoting_uninstaller.h",
+ "installer/mac/uninstaller/remoting_uninstaller.mm",
+ "installer/mac/uninstaller/remoting_uninstaller_app.h",
+ "installer/mac/uninstaller/remoting_uninstaller_app.mm",
+ ]
+
+ libs = [
+ "Cocoa.framework",
+ "CoreFoundation.framework",
+ "Security.framework",
+ ]
+
+ deps = [
+ ":remoting_host_uninstaller_xibs",
+ ":remoting_infoplist_strings",
+ "//base",
+ ]
+ }
+
+ mac_xib_bundle_data("remoting_host_uninstaller_xibs") {
+ sources = [
+ #"installer/mac/uninstaller/remoting_uninstaller.icns",
+ "installer/mac/uninstaller/remoting_uninstaller.xib",
+ #_uninstaller_plist
+ ]
+ }
+
+ create_bundle("remoting_host_prefpane.prefPane") {
+ bundle_root_dir = "$root_build_dir/$target_name/Contents"
+ bundle_resources_dir = bundle_root_dir + "/Resources"
+ bundle_executable_dir = bundle_root_dir + "/MacOS"
+
+ deps = [
+ ":remoting_host_prefpane",
+ ":remoting_host_prefpane_bundle_data",
+ ":remoting_host_prefpane_plist",
+ ":remoting_host_prefpane_xibs",
+ ":remoting_infoplist_strings",
+ ]
+
+ foreach(locale, remoting_locales_with_underscores) {
+ deps += [ ":remoting_host_prefpane_strings_${locale}_bundle_data" ]
+ }
+ }
+
+ bundle_data("remoting_host_prefpane_bundle_data") {
+ deps = [
+ ":remoting_host_prefpane",
+ ]
+ sources = [
+ "$root_build_dir/gen/remoting/host/remoting_host_prefpane",
+ ]
+ outputs = [
+ "{{bundle_executable_dir}}/remoting_host_prefname",
+ ]
+ }
+
+ loadable_module("remoting_host_prefpane") {
+ output_dir = "$root_out_dir/gen/remoting/host"
+ output_extension = ""
+
+ sources = [
+ "mac/me2me_preference_pane.h",
+ "mac/me2me_preference_pane.mm",
+ "mac/me2me_preference_pane_confirm_pin.h",
+ "mac/me2me_preference_pane_confirm_pin.mm",
+ "mac/me2me_preference_pane_disable.h",
+ "mac/me2me_preference_pane_disable.mm",
+ ]
+
+ libs = [
+ "Cocoa.framework",
+ "CoreFoundation.framework",
+ "PreferencePanes.framework",
+ "Security.framework",
+ ]
+
+ deps = [
+ ":host",
+ ":remoting_host_prefpane_xibs",
+ ":remoting_infoplist_strings",
+ "//remoting/base",
+ "//third_party/jsoncpp",
+ ]
+ }
+
+ bundle_data("remoting_host_prefpane_plist") {
+ sources = [
+ "mac/me2me_preference_pane-Info.plist",
+ ]
+ outputs = [
+ "{{bundle_root_dir}}/Info.plist",
+ ]
+ }
+
+ foreach(locale, remoting_locales_with_underscores) {
+ bundle_data("remoting_host_prefpane_strings_${locale}_bundle_data") {
+ sources = [
+ "$root_gen_dir/remoting/host/me2me_preference_pane-InfoPlist.strings/$locale.lproj/InfoPlist.strings",
+ ]
+ outputs = [
+ "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}",
+ ]
+ deps = [
+ ":remoting_infoplist_strings",
+ ]
+ }
+ }
+
+ mac_xib_bundle_data("remoting_host_prefpane_xibs") {
+ sources = [
+ "mac/me2me_preference_pane.xib",
+ #"mac/me2me_preference_pane_confirm_pin.xib",
+ #"mac/me2me_preference_pane_disable.xib",
+ #"mac/me2me_preference_pane-Info.plist",
+ #"//remoting/resources/chromoting128.png",
]
}
} else {
« 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