Chromium Code Reviews| Index: remoting/host/BUILD.gn |
| diff --git a/remoting/host/BUILD.gn b/remoting/host/BUILD.gn |
| index 241e768ef97fe0899a637f1f45c84ff02f0d6fe6..327633b2b44bc2140d7bf3be826092890d998d44 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. |
| @@ -882,8 +884,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") { |
|
Robert Sesek
2016/06/27 20:42:28
This and :native_messaging_host may be missing som
nicholss
2016/06/27 20:47:45
yes, I verified they are, working on adding locali
|
| + if (is_mac) { |
| + extra_configs = [ "//remoting:version" ] |
| + info_plist = "remoting_me2me_host-Info.plist" |
| + } else { |
| + configs += [ "//remoting:version" ] |
| + } |
| sources = [ |
| "host_main.cc", |
| @@ -930,7 +943,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 +966,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 +1158,209 @@ 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", |
| ] |
| - output = "$root_build_dir/remoting-me2me-host-mac.zip" |
| + |
| + inputs = _installer_mac_files |
| + |
| + zip_path = "$root_build_dir/remoting-me2me-host-mac.zip" |
| + |
| + outputs = [ |
| + "$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", |
| + ] |
| + } |
| + |
| + 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", |
| + ] |
| + } |
| + |
| + 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 { |