diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-23 01:22:39 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-23 01:22:39 +0000 |
commit | 81288f16b135cb5cb9d9f72e36bff3b362ade697 (patch) | |
tree | f7263adf2bc845968c350949d78f62c7bf50c3e1 /remoting | |
parent | 3280ca75cbc4ee8e997f0a568772565ab9514f30 (diff) | |
download | chromium_src-81288f16b135cb5cb9d9f72e36bff3b362ade697.zip chromium_src-81288f16b135cb5cb9d9f72e36bff3b362ade697.tar.gz chromium_src-81288f16b135cb5cb9d9f72e36bff3b362ade697.tar.bz2 |
WiX installation script for me2me host.
Review URL: http://codereview.chromium.org/9732020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128366 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/host/installer/chromoting.wxs | 139 | ||||
-rw-r--r-- | remoting/remoting.gyp | 85 |
2 files changed, 224 insertions, 0 deletions
diff --git a/remoting/host/installer/chromoting.wxs b/remoting/host/installer/chromoting.wxs new file mode 100644 index 0000000..b4a59e6 --- /dev/null +++ b/remoting/host/installer/chromoting.wxs @@ -0,0 +1,139 @@ +<?xml version="1.0"?> +<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> + + <?define ChromotingHost = "Chrome Remote Desktop Host" ?> + <?define EventSourceName = "remoting_me2me_host" ?> + <?define FirewallName = "remoting_me2me_host" ?> + <?define Manufacturer = "Google Inc." ?> + <?define ServiceName = "chromoting" ?> + + <?define OmahaAppid = "{b210701e-ffc4-49e3-932b-370728c72662}" ?> + <?define UpgradeCode = "2b21f767-e157-4fa6-963c-55834c1433a6" ?> + + <?ifndef FileSource ?> + <?error FileSource must be defined ?> + <?endif?> + + <?ifndef SasDllPath ?> + <?error SasDllPath must be defined ?> + <?endif?> + + <?ifndef Version ?> + <?error Version must be defined ?> + <?endif?> + + <Product Id="*" + Language="1033" + Manufacturer="$(var.Manufacturer)" + Name="$(var.ChromotingHost)" + UpgradeCode="$(var.UpgradeCode)" + Version="$(var.Version)"> + + <Package Comments="$(var.ChromotingHost) Package" + Compressed="yes" + Description="$(var.ChromotingHost) Package" + InstallerVersion="200" + Manufacturer="$(var.Manufacturer)"/> + + <MajorUpgrade + DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." + Schedule="afterInstallInitialize" /> + + <Media Id="1" Cabinet="chromoting.cab" EmbedCab="yes"/> + + <Directory Id="TARGETDIR" Name="SourceDir"> + <Directory Id="ProgramFilesFolder" Name="PFiles"> + <Directory Id="chromoting" Name="Chrome Remote Desktop Host"/> + </Directory> + </Directory> + + <DirectoryRef Id="chromoting" FileSource="$(var.FileSource)"> + <Component Id="sas.dll" + Guid="3c33dd97-3750-467f-8ec6-730611d346d4"> + <File Id="sas.dll" + DiskId="1" + Name="sas.dll" + Source="$(var.SasDllPath)" + Vital="yes"/> + </Component> + + <Component Id="remoting_service.exe" + Guid="23103839-bb02-4007-b149-998ddd8d7cba"> + <File Id="remoting_service.exe" + DiskId="1" + KeyPath="yes" + Name="remoting_service.exe" + Vital="yes"/> + + <ServiceInstall Id="install_service" + Type="ownProcess" + Vital="yes" + Name="$(var.ServiceName)" + DisplayName="@[chromoting]remoting_service.exe,-101" + Description="@[chromoting]remoting_service.exe,-102" + Arguments="--host-binary="[chromoting]remoting_me2me_host.exe"" + Start="auto" + Account="LocalSystem" + ErrorControl="ignore" + Interactive="no" /> + + <ServiceControl Id="start_service" + Start="install" + Stop="both" + Remove="uninstall" + Name="$(var.ServiceName)" + Wait="yes" /> + </Component> + + <Component Id="remoting_me2me_host.exe" + Guid="0e1889af-f3f8-45a2-b2d0-c719d53c4474"> + <File Id="remoting_me2me_host.exe" + DiskId="1" + Name="remoting_me2me_host.exe" + Vital="yes"/> + <util:EventSource xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" + Name="$(var.EventSourceName)" + Log="Application" + CategoryCount="1" + CategoryMessageFile="[chromoting]remoting_me2me_host.exe" + EventMessageFile="[chromoting]remoting_me2me_host.exe" + SupportsErrors="yes" + SupportsInformationals="yes"/> + + <fire:FirewallException xmlns:fire="http://schemas.microsoft.com/wix/FirewallExtension" + Id="me2me_firewall_exception" + IgnoreFailure="no" + Name="$(var.FirewallName)" + Profile="all" + Program="[#remoting_me2me_host.exe]" + Scope="any" /> + </Component> + + <Component Id="omaha_registration" + Guid="9a14673d-9518-4cf3-b737-52f09f02a10b"> + <RegistryKey Id="omaha_client_key" + Root="HKLM" + Key="SOFTWARE\Google\Update\Clients\$(var.OmahaAppid)" + Action="createAndRemoveOnUninstall"> + <RegistryValue Type="string" + Name="pv" + Value="$(var.Version)"/> + + <RegistryValue Type="string" + Name="name" + Value="$(var.ChromotingHost)"/> + </RegistryKey> + </Component> + </DirectoryRef> + + <UIRef Id="WixUI_ErrorProgressText" /> + + <Feature Id="chromoting_host" Level="1" Title="$(var.ChromotingHost)"> + <ComponentRef Id="remoting_service.exe"/> + <ComponentRef Id="remoting_me2me_host.exe"/> + <ComponentRef Id="sas.dll"/> + <ComponentRef Id="omaha_registration"/> + </Feature> + + </Product> +</Wix> diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp index 2fee574..897d1f8 100644 --- a/remoting/remoting.gyp +++ b/remoting/remoting.gyp @@ -21,6 +21,12 @@ }, 'version_py_path': '<(version_py_path)', 'version_path': '<(version_path)', + 'version_full': + '<!(python <(version_py_path) -f <(version_path) -t "@MAJOR@.@MINOR@.@BUILD@.@PATCH@")', + + # Windows Installer XML (WiX) path can be set in ~/.gyp/include.gypi to + # indicate that WiX is available. + 'wix_path%': '', 'conditions': [ ['OS=="mac"', { @@ -318,6 +324,85 @@ ], # end of 'targets' }], # 'OS=="win"' + # The host installation is generated only if WiX location is known and only + # as part of a non-component build. WiX does not provide a easy way to + # include all DLLs imported by the installed binaries depend on, so + # supporting the component build becomes a burden. + ['"<(wix_path)" != "" and component != "shared_library"', { + 'targets': [ + { + 'target_name': 'remoting_host_installation', + 'type': 'none', + 'dependencies': [ + 'remoting_service', + 'remoting_me2me_host', + ], + 'sources': [ + 'host/installer/chromoting.wxs', + ], + 'outputs': [ + '<(PRODUCT_DIR)/chromoting.msi', + ], + 'variables': { + 'sas_dll_path': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86/sas.dll' + }, + 'rules': [ + { + 'rule_name': 'candle', + 'extension': 'wxs', + 'inputs': [ ], + 'outputs': [ + '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).wixobj', + ], + 'process_outputs_as_sources': 1, + 'msvs_cygwin_shell': 0, + 'msvs_quote_cmd': 0, + 'action': [ + '"<(wix_path)\\bin\\candle"', + '-ext "<(wix_path)\\bin\\WixFirewallExtension.dll"', + '-ext "<(wix_path)\\bin\\WixUIExtension.dll"', + '-ext "<(wix_path)\\bin\\WixUtilExtension.dll"', + '-dVersion=<(version_full) ' + '"-dFileSource=<(PRODUCT_DIR)." ' + '"-dSasDllPath=<(sas_dll_path)" ' + '-out <@(_outputs)', + '"<(RULE_INPUT_PATH)"', + ], + 'message': 'Generating <@(_outputs)', + }, + { + 'rule_name': 'light', + 'extension': 'wixobj', + 'inputs': [ + '<(PRODUCT_DIR)/remoting_me2me_host.exe', + '<(PRODUCT_DIR)/remoting_service.exe', + '<(sas_dll_path)' + ], + 'outputs': [ + '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).msi', + '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).wixpdb', + ], + 'msvs_cygwin_shell': 0, + 'msvs_quote_cmd': 0, + 'action': [ + '"<(wix_path)\\bin\\light"', + '-ext "<(wix_path)\\bin\\WixFirewallExtension.dll"', + '-ext "<(wix_path)\\bin\\WixUIExtension.dll"', + '-ext "<(wix_path)\\bin\\WixUtilExtension.dll"', + '-cultures:en-us', + '-dVersion=<(version_full) ' + '"-dFileSource=<(PRODUCT_DIR)." ' + '"-dSasDllPath=<(sas_dll_path)" ' + '-out "<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).msi"', + '"<(RULE_INPUT_PATH)"', + ], + 'message': 'Generating <(PRODUCT_DIR)/<(RULE_INPUT_ROOT).msi', + }, + ], + }, # end of target 'remoting_host_installation' + ], # end of 'targets' + }], # '<(wix_path) != ""' + ], # end of 'conditions' 'targets': [ |