This repository has been archived by the owner on Sep 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
/
chrome-token-signing.wxs
109 lines (99 loc) · 5.61 KB
/
chrome-token-signing.wxs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?xml version="1.0" encoding="utf-8"?>
<!--
Chrome Token Signing Native Host
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<!--
"%WIX%\bin\candle.exe" chrome-token-signing.wxs -dVERSION=1.0.0
"%WIX%\bin\light.exe" -out chrome-token-signing.msi chrome-token-signing.wixobj -ext WixUIExtension
-dWixUILicenseRtf=LICENSE.LGPL.rtf
-dWixUIDialogBmp=dlgbmp.bmp
-->
<?ifndef Platform ?>
<?define Platform="x64" ?>
<?endif ?>
<?if $(var.Platform) = x64 ?>
<?define Win64 = "yes" ?>
<?else ?>
<?define Win64 = "no" ?>
<?endif ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Name="Chrome Token Signing" UpgradeCode="3e52954d-eee4-4dd8-a4f2-318521e3dbd9"
Id="*" Language="1033" Version="$(var.VERSION)" Codepage="1251" Manufacturer="RIA">
<Package Platform="$(var.Platform)" Keywords="Installer" InstallerVersion="405" Compressed="yes"/>
<MediaTemplate EmbedCab="yes" CompressionLevel="high"/>
<Icon Id="Icon.ico" SourceFile="host-windows\ID.ico"/>
<Property Id="ARPPRODUCTICON" Value="Icon.ico"/>
<Property Id="FORCEINSTALL" Value="1"/>
<Property Id="CHROMEINSTALL" Value="1"/>
<Property Id="FIREFOXINSTALL" Value="1"/>
<!-- https://github.com/open-eid/windows-installer/blob/master/FirefoxActionWix/README.md -->
<Binary Id="FirefoxAction.CA.dll" SourceFile="host-windows\FirefoxAction.CA.dll" />
<CustomAction Id="ExtensionSettingsInstall" Return="check" Execute="firstSequence"
BinaryKey="FirefoxAction.CA.dll" DllEntry="ExtensionSettingsInstall" />
<CustomAction Id="ExtensionSettingsRemove" Return="check" Execute="firstSequence"
BinaryKey="FirefoxAction.CA.dll" DllEntry="ExtensionSettingsRemove" />
<Property Id="EXTENSIONSETTINGS_URL" Value="https://addons.mozilla.org/firefox/downloads/latest/token-signing2/latest.xpi" />
<Property Id="EXTENSIONSETTINGS_UUID" Value="{443830f0-1fff-4f9a-aa1e-444bafbc7319}" />
<MajorUpgrade AllowSameVersionUpgrades="yes" DowngradeErrorMessage=
"A newer version of [ProductName] is already installed. If you are trying to downgrade, please uninstall the newer version first."/>
<Condition Message="[ProductName] requires Windows 7 or higher.">
<![CDATA[Installed OR (VersionNT >= 601)]]>
</Condition>
<UIRef Id="WixUI_Minimal" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id='ProgramFilesFolder'>
<Directory Id="APPLICATIONFOLDER" Name="Chrome Token Signing">
<Component Id="Application" Guid="85baa771-7c73-49bb-b546-ab6a4520d258" Win64="no">
<File Source="host-windows/Release/chrome-token-signing.exe"/>
</Component>
<Component Id="Chrome" Transitive="yes" >
<Condition><![CDATA[(CHROMEINSTALL = 1)]]></Condition>
<File Source="host-windows/ee.ria.esteid.json"/>
<RegistryValue Root='HKLM' Type='string' Value='[APPLICATIONFOLDER]ee.ria.esteid.json'
Key='SOFTWARE\Google\Chrome\NativeMessagingHosts\ee.ria.esteid'/>
<RegistryValue Root='HKLM' Type='string' Name="update_url"
Key='SOFTWARE\Google\Chrome\Extensions\ckjefchnfjhjfedoccjbhjpbncimppeg'
Value='https://clients2.google.com/service/update2/crx'/>
</Component>
<Component Id="FirefoxApplication" Guid="8c52d631-7da9-46d3-89c6-8248f94fa25c" Transitive="yes" >
<Condition><![CDATA[(FIREFOXINSTALL = 1)]]></Condition>
<File Source="host-windows/ee.ria.esteid.firefox.json"/>
</Component>
<Component Id="ForceInstall" Guid="b02ebb46-a515-4821-82af-29f8c6073544" Win64="no" Transitive="yes">
<Condition><![CDATA[(FORCEINSTALL = 1 AND CHROMEINSTALL = 1)]]></Condition>
<RegistryValue Root='HKLM' Type='string' Name="56789"
Key='SOFTWARE\Policies\Google\Chrome\ExtensionInstallForcelist'
Value='ckjefchnfjhjfedoccjbhjpbncimppeg;https://clients2.google.com/service/update2/crx'/>
</Component>
</Directory>
</Directory>
<Component Id="Firefox" Guid="60c6e502-529b-4d28-9e92-4cdbf1176afb" Win64="$(var.Win64)" Transitive="yes" >
<Condition><![CDATA[(FIREFOXINSTALL = 1)]]></Condition>
<RegistryValue Root='HKLM' Type='string' Value='[APPLICATIONFOLDER]ee.ria.esteid.firefox.json'
Key='SOFTWARE\Mozilla\NativeMessagingHosts\ee.ria.esteid' />
</Component>
</Directory>
<InstallExecuteSequence>
<Custom Action="ExtensionSettingsInstall" Before="WriteRegistryValues">NOT Installed</Custom>
<Custom Action="ExtensionSettingsRemove" Before="InstallFinalize">Installed AND NOT UPGRADINGPRODUCTCODE</Custom>
</InstallExecuteSequence>
<Feature Id="Install" Level="1" Title="Chrome Token Signing" Display="expand" ConfigurableDirectory="APPLICATIONFOLDER">
<ComponentRef Id="Application"/>
<ComponentRef Id="ForceInstall"/>
<ComponentRef Id="Firefox"/>
<ComponentRef Id="FirefoxApplication"/>
<ComponentRef Id="Chrome"/>
</Feature>
</Product>
</Wix>