Skip to content
Permalink
Browse files

installer: automatically embed VCRedist 12.0 DLLs when env var Mumble…

…NoMergeModule is set.

This commit updates the old RedistDirVC10 files to point to their new version 12 copies,
now that we build with MSVS2013.

It also implements an easy way to opt-out of using merge modules for the VCRT
redistributable DLLs.

With this change, if the environment variable MumbleNoMergeModule is set,
the installer build will automatically embed the VCRedist DLL files as
regular files into the final .MSI.

To avoid this behavior, one can set MumbleNoEmbedVCRedist=1. So, to build
a Mumble installer with no VCRT merge modules *and* no embedded VCRT DLLs,
one would set *both*

  MumbleNoMergeModules=1
  MumbleNoEmbedVCRedist=1
  • Loading branch information...
mkrautz committed Apr 5, 2014
1 parent 0e44742 commit 8aafb6cea504c30be51d01cbb6a6a2776b8b3a24
Showing with 24 additions and 8 deletions.
  1. +8 −5 installer/Files.wxs
  2. +4 −3 installer/Product.wxs
  3. +12 −0 installer/Settings.wxi
@@ -109,12 +109,15 @@
</Component>
<?endif ?>

<?ifdef RedistDirVC10 ?>
<Component Id="msvcp100.dll">
<File Source="$(var.RedistDirVC10)\msvcp100.dll" KeyPath="yes" />
<?ifdef RedistDirVC12 ?>
<Component Id="msvcp120.dll">
<File Source="$(var.RedistDirVC12)\msvcp120.dll" KeyPath="yes" />
</Component>
<Component Id="msvcr100.dll">
<File Source="$(var.RedistDirVC10)\msvcr100.dll" KeyPath="yes" />
<Component Id="msvcr120.dll">
<File Source="$(var.RedistDirVC12)\msvcr120.dll" KeyPath="yes" />
</Component>
<Component Id="vccorlib120.dll">
<File Source="$(var.RedistDirVC12)\vccorlib120.dll" KeyPath="yes" />
</Component>
<?endif ?>
</DirectoryRef>
@@ -123,9 +123,10 @@
<ComponentRef Id="libmmd.dll"/>
<?endif ?>

<?ifdef RedistDirVC10 ?>
<ComponentRef Id="msvcp100.dll" />
<ComponentRef Id="msvcr100.dll" />
<?ifdef RedistDirVC12 ?>
<ComponentRef Id="msvcp120.dll" />
<ComponentRef Id="msvcr120.dll" />
<ComponentRef Id="vccorlib120.dll" />
<?endif ?>
</ComponentGroup>

@@ -72,6 +72,18 @@
<?define MergeModuleDir = "$(env.MumbleMergeModuleDir)" ?>
<?endif ?>

<!-- If the MumbleNoMergeModule env var is set, prefer embedding the .DLLs directly into the installer. -->
<?ifdef env.MumbleNoMergeModule ?>
<!-- But, if the MumbleNoEmbedVCRedist env var is set, don't embed them anyway. -->
<?ifndef env.MumbleNoEmbedVCRedist ?>
<?ifndef env.MumbleRedistDirVC12 ?>
<?define RedistDirVC12 = "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\x86\Microsoft.VC120.CRT" ?>
<?else ?>
<?define RedistDirVC12 = "$(env.MumbleRedistDirVC12)" ?>
<?endif ?>
<?endif ?>
<?endif ?>

<!-- Environment flags to disable features. Value doesn't matter -->
<?ifdef env.MumbleSSE ?>
<?define SSE = true ?>

0 comments on commit 8aafb6c

Please sign in to comment.
You can’t perform that action at this time.