diff --git a/JamiInstaller/.gitignore b/JamiInstaller/.gitignore index 26814d3f5f0a44c493137a383913d8a28c856fff..73960808818a502009683ae51cd02c6e0cccdae7 100644 --- a/JamiInstaller/.gitignore +++ b/JamiInstaller/.gitignore @@ -1,3 +1,4 @@ /obj /bin -Components.wxs +AppComponents.wxs +CrtComponents.wxs diff --git a/JamiInstaller/JamiInstaller.wixproj b/JamiInstaller/JamiInstaller.wixproj index 2b1f5821965aa16b7dd7a4f398606d3a95d012c7..4c4bb030dc2f1c3a14ade2b2af32d36949823336 100644 --- a/JamiInstaller/JamiInstaller.wixproj +++ b/JamiInstaller/JamiInstaller.wixproj @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project ToolsVersion="4.0" + DefaultTargets="Build" + InitialTargets="EnsureWixToolsetInstalled" + xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">x64</Platform> @@ -16,7 +19,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> <OutputPath>bin\$(Configuration)\</OutputPath> <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> - <DefineConstants>HarvestPath=..\x64\Release</DefineConstants> + <DefineConstants>AppHarvestPath=..\x64\Release;CrtHarvestPath=$(VC_CRT_Dir)</DefineConstants> <SuppressPdbOutput>True</SuppressPdbOutput> <CompilerAdditionalOptions> </CompilerAdditionalOptions> @@ -26,7 +29,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Beta|x64' "> <OutputPath>bin\$(Configuration)\</OutputPath> <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> - <DefineConstants>HarvestPath=..\x64\Beta</DefineConstants> + <DefineConstants>AppHarvestPath=..\x64\Beta;CrtHarvestPath=$(VC_CRT_Dir)</DefineConstants> <SuppressPdbOutput>True</SuppressPdbOutput> <CompilerAdditionalOptions> </CompilerAdditionalOptions> @@ -35,7 +38,8 @@ </PropertyGroup> <ItemGroup> <Compile Include="Product.wxs" /> - <Compile Include="Components.wxs" /> + <Compile Include="AppComponents.wxs" /> + <Compile Include="CrtComponents.wxs" /> </ItemGroup> <ItemGroup> <Content Include="Config.wxi" /> @@ -57,13 +61,36 @@ <ItemGroup> <EmbeddedResource Include="Localization.wxl" /> </ItemGroup> - <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " /> - <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " /> - <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' "> + <Import Project="$(WixTargetsPath)" + Condition=" '$(WixTargetsPath)' != '' " /> + <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" + Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " /> + <Target Name="EnsureWixToolsetInstalled" + Condition=" '$(WixTargetsImported)' != 'true' "> <Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" /> </Target> <Target Name="BeforeBuild"> - <HeatDirectory Directory="..\x64\$(Configuration)" PreprocessorVariable="var.HarvestPath" OutputFile="Components.wxs" ComponentGroupName="HeatGenerated" DirectoryRefId="APPLICATIONFOLDER" AutogenerateGuids="true" ToolPath="$(WixToolPath)" SuppressFragments="true" SuppressRegistry="true" SuppressRootDirectory="true" Transforms="HarvestFilter.xslt" /> + <HeatDirectory Directory="..\x64\$(Configuration)" + PreprocessorVariable="var.AppHarvestPath" + OutputFile="AppComponents.wxs" + ComponentGroupName="AppHeatGenerated" + DirectoryRefId="APPLICATIONFOLDER" + AutogenerateGuids="true" + ToolPath="$(WixToolPath)" + SuppressFragments="true" + SuppressRegistry="true" + SuppressRootDirectory="true" + Transforms="HarvestFilter.xslt" /> + <HeatDirectory Directory="$(VC_CRT_Dir)" + PreprocessorVariable="var.CrtHarvestPath" + OutputFile="CrtComponents.wxs" + ComponentGroupName="CrtHeatGenerated" + DirectoryRefId="APPLICATIONFOLDER" + AutogenerateGuids="true" + ToolPath="$(WixToolPath)" + SuppressFragments="true" + SuppressRegistry="true" + SuppressRootDirectory="true" /> </Target> <Target Name="AfterBuild"> </Target> diff --git a/JamiInstaller/Product.wxs b/JamiInstaller/Product.wxs index 16cfa45ad0b6ffc0f2ba3125da740ea0e6b3a51c..ddca4c24508bc9613256bf60d325c62878d2912f 100644 --- a/JamiInstaller/Product.wxs +++ b/JamiInstaller/Product.wxs @@ -39,28 +39,14 @@ Absent="disallow"> <ComponentGroupRef Id="MainExecutable" Primary="yes" /> - <ComponentGroupRef Id="HeatGenerated" /> + <ComponentGroupRef Id="AppHeatGenerated" /> + <ComponentGroupRef Id="CrtHeatGenerated" /> <ComponentRef Id="ApplicationShortcutDesktop" /> <ComponentRef Id="ApplicationShortcutStartMenu" /> <ComponentRef Id="RegistryEntries" /> <ComponentRef Id="URLProtocolRegistryEntries" /> </Feature> - <!--Visual C++ Redist merge module--> - <DirectoryRef Id="TARGETDIR"> - <Merge Id="VCRedist" - SourceFile="$(env.VCRedistMergeModule)" - DiskId="1" - Language="0" /> - </DirectoryRef> - <Feature Id="VCRedist" - Title="Visual C++ Runtime" - AllowAdvertise="no" - Display="hidden" - Level="1"> - <MergeRef Id="VCRedist"/> - </Feature> - <SetProperty After="FindRelatedProducts" Id="FirstInstall" Value="true">