]> granicus.if.org Git - transmission/commitdiff
Fail installation on Windows if UCRT is not installed
authorMike Gelfand <mikedld@mikedld.com>
Sat, 25 Feb 2017 06:54:39 +0000 (09:54 +0300)
committerMike Gelfand <mikedld@mikedld.com>
Sat, 25 Feb 2017 07:07:58 +0000 (10:07 +0300)
dist/msi/Transmission.wxs

index b189f7ec6a461e36ac7e42f275dc4c76fffa48c3..d8208145055c2f6793655083ae02e49239b7572d 100644 (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">
       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]" />