mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-03-28 14:56:19 +01:00
msi-installer: deploy VC CRT files locally with the application
This avoids merge modules which may crush system runtimes files. We've had several issues packaging vc_redist binaries also, so this seems to a better option for now. Gitlab: #1865 Change-Id: I9ac3d3a1945136d7f78cf5be2de5d05cf377e126
This commit is contained in:
parent
eaf409d6d3
commit
a8acc71830
3 changed files with 39 additions and 25 deletions
3
JamiInstaller/.gitignore
vendored
3
JamiInstaller/.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
/obj
|
||||
/bin
|
||||
Components.wxs
|
||||
AppComponents.wxs
|
||||
CrtComponents.wxs
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Add table
Reference in a new issue