summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSameeh Jubran <sameeh@daynix.com>2017-02-27 14:19:50 +0200
committerDmitry Fleytman <dmitry@daynix.com>2017-04-03 15:06:48 +0300
commitae2d76c152356ec4b7e5ae1db1125a0a9e0479bf (patch)
tree7a00e27ad7013795276a1dfa6a635835c0245199
parent0cf33ff14c1c38c7d349d29501ad61388586be9a (diff)
Build: Add Windows 10 to MSI
According to msdn [1]: "When you install an .msi installation package on Windows 10 or Windows Server 2016, the VersionNT value is 603." which is the same value for Windows 8.1. In order to differentiate between Windows 8.1 and Windows 10 the trick in [2] was used. [1] https://support.microsoft.com/en-us/help/3202260/versionnt-value-for-windows-10-and-windows-server-2016 [2] http://stackoverflow.com/questions/31932646/versionnt-msi-property-on-windows-10 Signed-off-by: Sameeh Jubran <sameeh@daynix.com> Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
-rw-r--r--Tools/Installer/UsbDkInstaller.wxs18
1 files changed, 17 insertions, 1 deletions
diff --git a/Tools/Installer/UsbDkInstaller.wxs b/Tools/Installer/UsbDkInstaller.wxs
index 5a7459e..975972e 100644
--- a/Tools/Installer/UsbDkInstaller.wxs
+++ b/Tools/Installer/UsbDkInstaller.wxs
@@ -53,6 +53,12 @@
IncludeMinimum="no" IncludeMaximum="yes" />
</Upgrade>
+ <Property Id="WIN10FOUND" Secure="yes">
+ <DirectorySearch Id="searchSystem" Path="[SystemFolder]" Depth="0">
+ <FileSearch Id="searchFile" Name="advapi32.dll" MinVersion="6.3.10000.0"/>
+ </DirectorySearch>
+ </Property>
+
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.UsbDkProgramFilesFolder)" Name="UsbDk Runtime Library">
<Directory Id="UsbDk_Directory" Name="UsbDk Runtime Library">
@@ -86,13 +92,22 @@
</Component>
<Component Id="UsbDk_81" Guid="{3C24F894-3604-41D0-9FC2-D6A3B3676A20}" Win64="$(var.UsbDkWin64)">
- <Condition>VersionNT &gt;= 603</Condition>
+ <Condition>VersionNT = 603 AND NOT WIN10FOUND</Condition>
<?define SourceSubPath= "Win8.1$(var.Config)" ?>
<?define OsName= "81" ?>
<?include UsbDkFiles.wxi ?>
<?undef SourceSubPath ?>
<?undef OsName ?>
</Component>
+
+ <Component Id="UsbDk_10" Guid="{34AB6305-4379-4E32-A070-8B0612521AC8}" Win64="$(var.UsbDkWin64)">
+ <Condition>VersionNT &gt;= 603 AND WIN10FOUND</Condition>
+ <?define SourceSubPath= "Win10$(var.Config)" ?>
+ <?define OsName= "10" ?>
+ <?include UsbDkFiles.wxi ?>
+ <?undef SourceSubPath ?>
+ <?undef OsName ?>
+ </Component>
</Directory>
</Directory>
</Directory>
@@ -129,6 +144,7 @@
<ComponentRef Id="UsbDk_7" />
<ComponentRef Id="UsbDk_8" />
<ComponentRef Id="UsbDk_81" />
+ <ComponentRef Id="UsbDk_10" />
</Feature>
</Product>
</Wix>