Fail installation on Windows if UCRT is not installed

This commit is contained in:
Mike Gelfand 2017-02-25 09:54:39 +03:00
parent 8fce4173dc
commit e4ee96c30d
1 changed files with 11 additions and 0 deletions

View File

@ -6,9 +6,11 @@
<?if $(sys.BUILDARCH) = x64 ?>
<?define ProductName = "Transmission $(var.TrVersionFull) (x64)" ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?define PlatformSystemFolder = "System64Folder" ?>
<?else ?>
<?define ProductName = "Transmission $(var.TrVersionFull)" ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?define PlatformSystemFolder = "SystemFolder" ?>
<?endif ?>
<Product Name="$(var.ProductName)" Id="*" UpgradeCode="1FB3C295-9BD4-4248-8C8B-B85CD11FE7C4" Language="1033" Codepage="1252" Version="$(var.TrVersionMsi)" Manufacturer="Transmission Project">
@ -27,6 +29,15 @@
NOT TRQTWINSTALLDIR
</Condition>
<Property Id="UCRTINSTALLED">
<DirectorySearch Id="UcrtDirSearch" Path="[$(var.PlatformSystemFolder)]" Depth="0">
<FileSearch Id="UcrtFileSearch" Name="ucrtbase.dll" MinVersion="6.2.10585.0" />
</DirectorySearch>
</Property>
<Condition Message="The Universal C Runtime is not installed. Please run Windows Update and install all required Windows updates. You can download the UCRT separately from here: https://support.microsoft.com/en-us/kb/2999226">
UCRTINSTALLED
</Condition>
<Media Id="1" Cabinet="main.cab" EmbedCab="yes" DiskPrompt="CD-ROM #1" />
<Property Id="DiskPrompt" Value="Transmission $(var.TrVersion) Installation [1]" />