]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10010 [WIX] Fix windows WIX installer by including a proper vc runtime
authorAndrey Volk <andywolk@gmail.com>
Sat, 4 Feb 2017 12:44:29 +0000 (15:44 +0300)
committerAndrey Volk <andywolk@gmail.com>
Sat, 4 Feb 2017 12:44:29 +0000 (15:44 +0300)
w32/Setup/Product.2015.wxs
w32/Setup/Setup.2015.wixproj
w32/Setup/Setup.wixproj

index c19f86c4f47a46cc1ac12a9a977bcf49e110df52..5c126c35b5e7779d227d38af3c698935d7482ac0 100644 (file)
@@ -1,13 +1,29 @@
 <?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
index ffb35e0310b605bd80fd3579bd3f075ce5bd5777..a2f76824fe5de6e53cb9c0800f3e3749a7283687 100644 (file)
@@ -19,7 +19,7 @@
   <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
@@ -31,7 +31,7 @@
   <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
index 59b4ce719b800e3ffe6a7fb288331916404bcc92..642d721145ba1c022cdd3abee53bd98e1d21612b 100644 (file)
@@ -19,7 +19,7 @@
   <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
@@ -31,7 +31,7 @@
   <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