forked from open-eid/updater
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathidupdater.wxs
131 lines (121 loc) · 5.99 KB
/
idupdater.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?xml version="1.0" encoding="utf-8"?>
<!--
"%WIX%\bin\candle.exe" idupdater.wxs -dMSI_VERSION=3.9.5
-dqt_path=C:\Qt\5.9.10\msvc2017
-dlibs_path="C:\OpenSSL-Win32\bin"
-dupdater_path=id-updater.exe
"%WIX%\bin\light.exe" -out idupdater.msi idupdater.wixobj -v -ext WixUIExtension
-->
<?ifndef Platform ?>
<?define Platform="x86" ?>
<?endif ?>
<?if $(var.Platform) = x64 ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?define OpenSSLSuffix = "-x64" ?>
<?else ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?define OpenSSLSuffix = "" ?>
<?endif ?>
<?if $(env.VisualStudioVersion) = "16.0" ?>
<?define VCVER = "142" ?>
<?define VCPATH = "$(env.VCTOOLSREDISTDIR)" ?>
<?elseif $(env.VisualStudioVersion) = "15.0" ?>
<?define VCVER = "141" ?>
<?define VCPATH = "$(env.VCTOOLSREDISTDIR)" ?>
<?elseif $(env.VisualStudioVersion) = "14.0" ?>
<?define VCVER = "140" ?>
<?define VCPATH = "$(env.VCINSTALLDIR)\redist" ?>
<?endif?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Name="Open-EID Updater" UpgradeCode="d3aa8bd7-e1e6-46d0-97a6-c9b87d2b830b"
Id="*" Language="1033" Version="$(var.MSI_VERSION)" Codepage="1251" Manufacturer="RIA">
<Package Platform="$(var.Platform)" Keywords="Installer" InstallerVersion="405" Compressed="yes" InstallScope="perMachine"/>
<MediaTemplate EmbedCab="yes" CompressionLevel="high"/>
<Icon Id="idupdater.exe" SourceFile="$(var.updater_path)"/>
<Property Id="ARPPRODUCTICON" Value="idupdater.exe"/>
<Property Id="AUTO_UPDATE" Value="1"/>
<MajorUpgrade AllowSameVersionUpgrades="yes" Schedule="afterInstallInitialize" 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_Minimal2" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id='$(var.PlatformProgramFilesFolder)'>
<Directory Id="APPLICATIONFOLDER" Name="Open-EID">
<Component Id="Application" Guid="ce49ec96-dc54-4b51-adae-8d5dd82b15d1">
<File Id="id_updater.exe" Source="$(var.updater_path)" KeyPath='yes'/>
<RegistryValue Root="HKMU" Key="Software\[Manufacturer]\Open-EID"
Name="Installed" Value="[APPLICATIONFOLDER]" Type="string"/>
<?if $(var.Platform) = x64 ?>
<RegistryValue Root="HKMU" Key="Software\Wow6432Node\[Manufacturer]\Open-EID"
Name="Installed" Value="[APPLICATIONFOLDER]" Type="string"/>
<?endif ?>
<?ifdef var.qt_path ?>
<File Source="$(var.VCPATH)\$(var.Platform)\Microsoft.VC$(var.VCVER).CRT\msvcp140.dll"/>
<File Source="$(var.VCPATH)\$(var.Platform)\Microsoft.VC$(var.VCVER).CRT\vcruntime140.dll"/>
<!--?if $(env.VisualStudioVersion) = "16.0" ?>
<File Source="$(var.VCPATH)\$(var.Platform)\Microsoft.VC$(var.VCVER).CRT\vcruntime140_1.dll"/>
<?endif ?-->
<File Source="$(var.libs_path)\libcrypto-1_1$(var.OpenSSLSuffix).dll"/>
<File Source="$(var.libs_path)\libssl-1_1$(var.OpenSSLSuffix).dll"/>
<File Source="$(var.qt_path)\bin\Qt5Core.dll"/>
<File Source="$(var.qt_path)\bin\Qt5Gui.dll"/>
<File Source="$(var.qt_path)\bin\Qt5Network.dll"/>
<File Source="$(var.qt_path)\bin\Qt5PrintSupport.dll"/>
<File Source="$(var.qt_path)\bin\Qt5Svg.dll"/>
<File Source="$(var.qt_path)\bin\Qt5Widgets.dll"/>
<File Source="$(var.qt_path)\bin\Qt5WinExtras.dll"/>
<File Source="$(var.qt_path)\bin\libEGL.dll"/>
<File Source="$(var.qt_path)\bin\libGLESv2.dll"/>
<File Source="$(var.qt_path)\bin\D3DCompiler_47.dll"/>
<File Source="$(var.qt_path)\bin\opengl32sw.dll"/>
<File Source="$(var.qtconf)" />
<?endif?>
</Component>
<?ifdef var.qt_path ?>
<Directory Id="platforms" Name="platforms" FileSource="$(var.qt_path)\plugins\platforms">
<Component Id="qwindows.dll">
<File Name="qwindows.dll"/>
</Component>
</Directory>
<Directory Id="printsupport" Name="printsupport" FileSource="$(var.qt_path)\plugins\printsupport">
<Component Id="windowsprintersupport.dll">
<File Name="windowsprintersupport.dll"/>
</Component>
</Directory>
<Directory Id="styles" Name="styles" FileSource="$(var.qt_path)\plugins\styles">
<Component Id="qwindowsvistastyle.dll">
<File Name="qwindowsvistastyle.dll"/>
</Component>
</Directory>
<Directory Id="imageformats" Name="imageformats" FileSource="$(var.qt_path)\plugins\imageformats">
<Component Id="imageformats.dll" Guid="4ae32624-e869-4e4c-8a1c-624c31133ce3">
<File Name="qgif.dll"/>
<File Name="qjpeg.dll"/>
<File Name="qsvg.dll"/>
</Component>
</Directory>
<?endif?>
</Directory>
</Directory>
</Directory>
<Feature Id="Install" Title="Open-EID" ConfigurableDirectory="APPLICATIONFOLDER">
<ComponentRef Id="Application" />
<?ifdef var.qt_path ?>
<ComponentRef Id="qwindows.dll" />
<ComponentRef Id="qwindowsvistastyle.dll" />
<ComponentRef Id="windowsprintersupport.dll" />
<ComponentRef Id="imageformats.dll" />
<?endif?>
</Feature>
<CustomAction Id="ScheduleUpdater" FileKey="id_updater.exe" Impersonate="no" Execute="deferred"
ExeCommand="-weekly" Return="ignore"/>
<CustomAction Id="UnScheduleUpdater" FileKey="id_updater.exe" Impersonate="no" Execute="deferred"
ExeCommand="-remove" Return="ignore"/>
<InstallExecuteSequence>
<Custom Action="ScheduleUpdater" Before="InstallFinalize">(NOT Installed) AND (AUTO_UPDATE = 1)</Custom>
<Custom Action="UnScheduleUpdater" After="InstallInitialize">REMOVE="ALL"</Custom>
</InstallExecuteSequence>
</Product>
</Wix>