FS-10010 [WIX] Fix windows WIX installer by including a proper vc runtime

This commit is contained in:
Andrey Volk 2017-02-04 15:44:29 +03:00 committed by Mike Jerris
parent 4cefe9e7e7
commit eb2862af5c
3 changed files with 44 additions and 12 deletions

View File

@ -1,13 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Platform specific variables -->
<?if $(var.Platform) = x64 ?>
<?define Win64 = "yes" ?>
<?define ProductName = "FreeSWITCH (64 bit)" ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?define Win64 = "yes" ?>
<?if $(var.Configuration) = Debug ?>
<?define ProductName_Configuration = ", Debug" ?>
<?else ?>
<?define ProductName_Configuration = "" ?>
<?endif ?>
<?define ProductName = "FreeSWITCH (64 bit$(var.ProductName_Configuration))" ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?else ?>
<?define Win64 = "no" ?>
<?define ProductName = "FreeSWITCH" ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?define Win64 = "no" ?>
<?if $(var.Configuration) = Debug ?>
<?define ProductName_Configuration = " (Debug)" ?>
<?else ?>
<?define ProductName_Configuration = "" ?>
<?endif ?>
<?define ProductName = "FreeSWITCH$(var.ProductName_Configuration)" ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?endif ?>
<?if $(var.Configuration) = Debug ?>
<?define CRT_Configuration = "Debug" ?>
<?else ?>
<?define CRT_Configuration = "" ?>
<?endif ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
@ -16,6 +32,22 @@
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<CustomAction Id='CheckForUCRT' Error="Installation failed because 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" />
<Property Id="UCRTINSTALLED" Secure="yes">
<DirectorySearch Id="searchSystem2" Path="[SystemFolder]" Depth="0">
<FileSearch Id="UCRT_FileSearch"
Name="ucrtbase.dll"
MinVersion="6.2.10585.0"/>
</DirectorySearch>
</Property>
<InstallExecuteSequence>
<Custom Action='CheckForUCRT' Before='LaunchConditions'>
<![CDATA[Not REMOVE="ALL" AND UCRTINSTALLED = ""]]>
</Custom>
</InstallExecuteSequence>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.PlatformProgramFilesFolder)">
<Directory Id="INSTALLLOCATION" Name="FreeSWITCH">
@ -31,13 +63,13 @@
<!-- </Component> -->
<?if $(var.Platform) != x64 ?>
<Merge Id="CrtFiles_x86"
SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC110_CRT_x86.msm"
SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC140_$(var.CRT_Configuration)CRT_x86.msm"
DiskId="1"
Language="1033"/>
<?endif ?>
<?if $(var.Platform) = x64 ?>
<Merge Id="CrtFiles_x64"
SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC110_CRT_x64.msm"
SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC140_$(var.CRT_Configuration)CRT_x64.msm"
DiskId="1"
Language="1033"/>
<?endif ?>

View File

@ -19,7 +19,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\x86\release\</OutputPath>
<IntermediateOutputPath>obj\X86\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug;FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\Win32\release\sounds;FreeSWITCHBaseDir=$(SolutionDir)Win32\$(Configuration);</DefineConstants>
<DefineConstants>FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\Win32\release\sounds;FreeSWITCHBaseDir=$(SolutionDir)Win32\$(Configuration);</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<OutputPath>bin\x64\Debug\</OutputPath>
@ -31,7 +31,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>bin\x64\Release\</OutputPath>
<IntermediateOutputPath>obj\X64\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug;FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\x64\release\sounds;FreeSWITCHBaseDir=$(SolutionDir)$(Platform)\$(Configuration);</DefineConstants>
<DefineConstants>FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\x64\release\sounds;FreeSWITCHBaseDir=$(SolutionDir)$(Platform)\$(Configuration);</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include="Fragments\FreeSWITCHConfFiles.wxs" />

View File

@ -19,7 +19,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\x86\release\</OutputPath>
<IntermediateOutputPath>obj\X86\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug;FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\Win32\release\sounds;</DefineConstants>
<DefineConstants>FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\Win32\release\sounds;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<OutputPath>bin\x64\Debug\</OutputPath>
@ -31,7 +31,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>bin\x64\Release\</OutputPath>
<IntermediateOutputPath>obj\X64\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug;FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\x64\release\sounds;</DefineConstants>
<DefineConstants>FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\x64\release\sounds;</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include="Fragments\FreeSWITCHConfFiles.wxs" />