<?xml version="1.0" encoding="UTF-8"?>\r
<!-- Platform specific variables -->\r
<?if $(var.Platform) = x64 ?>\r
-<?define Win64 = "yes" ?>\r
-<?define ProductName = "FreeSWITCH (64 bit)" ?>\r
-<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>\r
+ <?define Win64 = "yes" ?>\r
+ <?if $(var.Configuration) = Debug ?>\r
+ <?define ProductName_Configuration = ", Debug" ?>\r
+ <?else ?>\r
+ <?define ProductName_Configuration = "" ?>\r
+ <?endif ?>\r
+ <?define ProductName = "FreeSWITCH (64 bit$(var.ProductName_Configuration))" ?>\r
+ <?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>\r
<?else ?>\r
-<?define Win64 = "no" ?>\r
-<?define ProductName = "FreeSWITCH" ?>\r
-<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>\r
+ <?define Win64 = "no" ?>\r
+ <?if $(var.Configuration) = Debug ?>\r
+ <?define ProductName_Configuration = " (Debug)" ?>\r
+ <?else ?>\r
+ <?define ProductName_Configuration = "" ?>\r
+ <?endif ?>\r
+ <?define ProductName = "FreeSWITCH$(var.ProductName_Configuration)" ?>\r
+ <?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>\r
+<?endif ?>\r
+\r
+<?if $(var.Configuration) = Debug ?>\r
+ <?define CRT_Configuration = "Debug" ?>\r
+<?else ?>\r
+ <?define CRT_Configuration = "" ?>\r
<?endif ?>\r
\r
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">\r
\r
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />\r
\r
+ <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" />\r
+\r
+ <Property Id="UCRTINSTALLED" Secure="yes">\r
+ <DirectorySearch Id="searchSystem2" Path="[SystemFolder]" Depth="0">\r
+ <FileSearch Id="UCRT_FileSearch"\r
+ Name="ucrtbase.dll"\r
+ MinVersion="6.2.10585.0"/>\r
+ </DirectorySearch>\r
+ </Property>\r
+\r
+ <InstallExecuteSequence>\r
+ <Custom Action='CheckForUCRT' Before='LaunchConditions'>\r
+ <![CDATA[Not REMOVE="ALL" AND UCRTINSTALLED = ""]]>\r
+ </Custom>\r
+ </InstallExecuteSequence>\r
+\r
<Directory Id="TARGETDIR" Name="SourceDir">\r
<Directory Id="$(var.PlatformProgramFilesFolder)">\r
<Directory Id="INSTALLLOCATION" Name="FreeSWITCH">\r
<!-- </Component> -->\r
<?if $(var.Platform) != x64 ?>\r
<Merge Id="CrtFiles_x86"\r
- SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC110_CRT_x86.msm"\r
+ SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC140_$(var.CRT_Configuration)CRT_x86.msm"\r
DiskId="1"\r
Language="1033"/>\r
<?endif ?>\r
<?if $(var.Platform) = x64 ?>\r
<Merge Id="CrtFiles_x64"\r
- SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC110_CRT_x64.msm"\r
+ SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC140_$(var.CRT_Configuration)CRT_x64.msm"\r
DiskId="1"\r
Language="1033"/>\r
<?endif ?>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">\r
<OutputPath>bin\x86\release\</OutputPath>\r
<IntermediateOutputPath>obj\X86\$(Configuration)\</IntermediateOutputPath>\r
- <DefineConstants>Debug;FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\Win32\release\sounds;FreeSWITCHBaseDir=$(SolutionDir)Win32\$(Configuration);</DefineConstants>\r
+ <DefineConstants>FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\Win32\release\sounds;FreeSWITCHBaseDir=$(SolutionDir)Win32\$(Configuration);</DefineConstants>\r
</PropertyGroup>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">\r
<OutputPath>bin\x64\Debug\</OutputPath>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">\r
<OutputPath>bin\x64\Release\</OutputPath>\r
<IntermediateOutputPath>obj\X64\$(Configuration)\</IntermediateOutputPath>\r
- <DefineConstants>Debug;FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\x64\release\sounds;FreeSWITCHBaseDir=$(SolutionDir)$(Platform)\$(Configuration);</DefineConstants>\r
+ <DefineConstants>FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\x64\release\sounds;FreeSWITCHBaseDir=$(SolutionDir)$(Platform)\$(Configuration);</DefineConstants>\r
</PropertyGroup>\r
<ItemGroup>\r
<Compile Include="Fragments\FreeSWITCHConfFiles.wxs" />\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">\r
<OutputPath>bin\x86\release\</OutputPath>\r
<IntermediateOutputPath>obj\X86\$(Configuration)\</IntermediateOutputPath>\r
- <DefineConstants>Debug;FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\Win32\release\sounds;</DefineConstants>\r
+ <DefineConstants>FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\Win32\release\sounds;</DefineConstants>\r
</PropertyGroup>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">\r
<OutputPath>bin\x64\Debug\</OutputPath>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">\r
<OutputPath>bin\x64\Release\</OutputPath>\r
<IntermediateOutputPath>obj\X64\$(Configuration)\</IntermediateOutputPath>\r
- <DefineConstants>Debug;FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\x64\release\sounds;</DefineConstants>\r
+ <DefineConstants>FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\x64\release\sounds;</DefineConstants>\r
</PropertyGroup>\r
<ItemGroup>\r
<Compile Include="Fragments\FreeSWITCHConfFiles.wxs" />\r