Commit c7f854c2 authored by Erik Jensen's avatar Erik Jensen Committed by Commit Bot

Install Firefox native messaging reg keys on Windows

While Chrome checks both the 32- and 64-bit registries to discover
native messaging hosts, Firefox only checks the native registry. This
poses a challenge, as 32-bit installers generally aren't allowed to
install 64-bit components (such as registry keys). However, it turns out
that it is possible to suppress the resulting error, and this CL does
just that, allowing the required keys to be installed in the native
registry on 64-bit Windows.

Bug: 880542
Change-Id: I2552d24ec7dd2e7cce8febdc42b048a1e5caf568
Reviewed-on: https://chromium-review.googlesource.com/1213956
Commit-Queue: Erik Jensen <rkjnsn@chromium.org>
Reviewed-by: default avatarJoe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589725}
parent 04de15fd
......@@ -62,7 +62,9 @@ action("remoting_me2me_host_archive") {
"$root_out_dir/remoting_start_host.exe",
"$root_gen_dir/remoting/CREDITS.txt",
"$root_out_dir/remoting/com.google.chrome.remote_assistance.json",
"$root_out_dir/remoting/com.google.chrome.remote_assistance-firefox.json",
"$root_out_dir/remoting/com.google.chrome.remote_desktop.json",
"$root_out_dir/remoting/com.google.chrome.remote_desktop-firefox.json",
"$root_out_dir/icudtl.dat",
]
......@@ -70,6 +72,12 @@ action("remoting_me2me_host_archive") {
_generated_files +=
[ rebase_path("//remoting/resources/chromoting.ico", root_build_dir) ]
# Inputs that should not be part of _generated_files.
inputs += [
"chromoting.wxs",
"parameters.json",
]
# _generated_dst_files must contain the same files in the same order as
# _generated_files, otherwise the Windows MSI will not be built correctly.
_generated_dst_files = [
......@@ -83,7 +91,9 @@ action("remoting_me2me_host_archive") {
"files/remoting_start_host.exe",
"files/CREDITS.txt",
"files/com.google.chrome.remote_assistance.json",
"files/com.google.chrome.remote_assistance-firefox.json",
"files/com.google.chrome.remote_desktop.json",
"files/com.google.chrome.remote_desktop-firefox.json",
"files/icudtl.dat",
"files/chromoting.ico",
]
......
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<!-- Note: Including Win64 components in a 32-bit installer usually triggers
a consistency error. We suppress that error in our build to allow the
installer to set 64-bit registry keys on 64-bit Windows. Care must be
taken when adding Win64 components to ensure they are not installed on
32-bit Windows. -->
<?define EventSourceName = "chromoting" ?>
<?define ServiceName = "chromoting" ?>
......@@ -225,6 +230,14 @@
Vital="yes"/>
</Component>
<Component Id="native_messaging_host_firefox_manifest" Guid="*">
<File Id="com.google.chrome.remote_desktop_firefox.json"
DiskId="1"
KeyPath="yes"
Name="com.google.chrome.remote_desktop-firefox.json"
Vital="yes"/>
</Component>
<Component Id="remote_assistance_host_manifest" Guid="*">
<File Id="com.google.chrome.remote_assistance.json"
DiskId="1"
......@@ -233,6 +246,15 @@
Vital="yes"/>
</Component>
<Component Id="remote_assistance_host_firefox_manifest" Guid="*">
<File Id="com.google.chrome.remote_assistance_firefox.json"
DiskId="1"
KeyPath="yes"
Name="com.google.chrome.remote_assistance-firefox.json"
Vital="yes"/>
</Component>
<Component Id="icudtl" Guid="*">
<File Id="icudtl.dat"
DiskId="1"
......@@ -510,6 +532,39 @@
<CreateFolder/>
</Component>
<!-- Firefox requires the key to be installed in the native registry -->
<Component Id="native_messaging_host_firefox_registry_win32"
Guid="*"
Win64="no">
<Condition>NOT Msix64</Condition>
<RegistryKey Root="HKLM"
Key="SOFTWARE\Mozilla\NativeMessagingHosts"
Action="create">
<RegistryKey Key="com.google.chrome.remote_desktop" Action="create">
<RegistryValue
Type="string"
Value="[binaries]com.google.chrome.remote_desktop-firefox.json"/>
</RegistryKey>
</RegistryKey>
<CreateFolder/>
</Component>
<Component Id="native_messaging_host_firefox_registry_win64"
Guid="*"
Win64="yes">
<Condition>Msix64</Condition>
<RegistryKey Root="HKLM"
Key="SOFTWARE\Mozilla\NativeMessagingHosts"
Action="create">
<RegistryKey Key="com.google.chrome.remote_desktop" Action="create">
<RegistryValue
Type="string"
Value="[binaries]com.google.chrome.remote_desktop-firefox.json"/>
</RegistryKey>
</RegistryKey>
<CreateFolder/>
</Component>
<Component Id="remote_assistance_host_registry" Guid="*">
<RegistryKey Root="HKLM"
Key="SOFTWARE\Google\chrome\NativeMessagingHosts"
......@@ -524,6 +579,40 @@
<CreateFolder/>
</Component>
<Component Id="remote_assistance_host_firefox_registry_win32"
Guid="*"
Win64="no">
<Condition>NOT Msix64</Condition>
<RegistryKey Root="HKLM"
Key="SOFTWARE\Mozilla\NativeMessagingHosts"
Action="create">
<RegistryKey Key="com.google.chrome.remote_assistance"
Action="create">
<RegistryValue
Type="string"
Value="[binaries]com.google.chrome.remote_assistance-firefox.json"/>
</RegistryKey>
</RegistryKey>
<CreateFolder/>
</Component>
<Component Id="remote_assistance_host_firefox_registry_win64"
Guid="*"
Win64="yes">
<Condition>Msix64</Condition>
<RegistryKey Root="HKLM"
Key="SOFTWARE\Mozilla\NativeMessagingHosts"
Action="create">
<RegistryKey Key="com.google.chrome.remote_assistance"
Action="create">
<RegistryValue
Type="string"
Value="[binaries]com.google.chrome.remote_assistance-firefox.json"/>
</RegistryKey>
</RegistryKey>
<CreateFolder/>
</Component>
<!-- Delete the usagestats flag to reset the crash dump reporting settings
for existing users. -->
<Component Id="delete_usagestats"
......@@ -623,9 +712,15 @@
<ComponentRef Id="omaha_registration"/>
<?endif?>
<ComponentRef Id="icudtl"/>
<ComponentRef Id="native_messaging_host_firefox_manifest"/>
<ComponentRef Id="native_messaging_host_firefox_registry_win32"/>
<ComponentRef Id="native_messaging_host_firefox_registry_win64"/>
<ComponentRef Id="native_messaging_host_manifest"/>
<ComponentRef Id="native_messaging_host_registry"/>
<ComponentRef Id="remote_assistance_host"/>
<ComponentRef Id="remote_assistance_host_firefox_manifest"/>
<ComponentRef Id="remote_assistance_host_firefox_registry_win32"/>
<ComponentRef Id="remote_assistance_host_firefox_registry_win64"/>
<ComponentRef Id="remote_assistance_host_manifest"/>
<ComponentRef Id="remote_assistance_host_registry"/>
<ComponentRef Id="remote_assistance_host_uiaccess"/>
......
......@@ -25,7 +25,8 @@
"light": {
"switches": [
"-cultures:en-us",
"-sw1076"
"-sw1076",
"-sice:ICE80"
]
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment