Skip to content

Commit

Permalink
fixed: msi 32-bit and 64-bit should not be installed side by side, us…
Browse files Browse the repository at this point in the history
…er should use the right arch.

fixed: msi duplicate installs when using different nightly build revs (probably a hacky fix).
  • Loading branch information
Nick Bolton committed Mar 10, 2014
1 parent 1774a3a commit 158a621
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
7 changes: 7 additions & 0 deletions src/setup/win32/Include.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,20 @@
<?ifndef Version ?>
<?define Version="1.0.0" ?>
<?endif?>

<?define UpgradeGuid32="BE0B9FD8-45E2-4A8E-A0D8-1F774D074A78" ?>
<?define UpgradeGuid64="E8A4FA54-14B9-4FD1-8E00-7BC46555FDA0" ?>

<?if $(var.Platform) = "x64" ?>
<?define ProgramFilesFolder="ProgramFiles64Folder" ?>
<?define PlatformSimpleName="64-bit" ?>
<?define UpgradeGuid="$(var.UpgradeGuid64)" ?>
<?else?>
<?define ProgramFilesFolder="ProgramFilesFolder" ?>
<?define PlatformSimpleName="32-bit" ?>
<?define UpgradeGuid="$(var.UpgradeGuid32)" ?>
<?endif?>

<?define CRT="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC100_CRT_$(var.Platform).msm" ?>

</Include>
20 changes: 16 additions & 4 deletions src/setup/win32/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,27 @@
<?include Include.wxi?>

<Product
Id="*" Name="$(var.Name) ($(var.PlatformSimpleName))" Language="1033"
Version="$(var.Version)" Manufacturer="$(var.Author)"
UpgradeCode="E87C85E3-69FD-4F00-BBB4-69C5FD615D47">
Id="*"
UpgradeCode="$(var.UpgradeGuid)"
Name="$(var.Name) ($(var.PlatformSimpleName))"
Language="1033"
Version="$(var.Version)"
Manufacturer="$(var.Author)">

<Package InstallerVersion="300" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of $(var.Name) is already installed." />
<MediaTemplate EmbedCab="yes" />
<UIRef Id="WixUI_InstallDir" />

<?if $(var.Platform) = "x86" ?>
<Condition Message="You are running a 64-bit version of Windows. Please install the 64-bit version of $(var.Name) instead of the 32-bit version.">NOT Msix64</Condition>
<?endif ?>

<!-- causes ICE61 warning, but stops user from installing many instances from nightly builds. -->
<Upgrade Id="$(var.UpgradeGuid)">
<UpgradeVersion Minimum="0.0.0.0" Property="UPGRADE" />
</Upgrade>

<Feature Id="ProductFeature" Title="$(var.Name)">
<ComponentGroupRef Id="ProductComponents" />
<MergeRef Id="CRT" />
Expand Down Expand Up @@ -64,7 +76,7 @@
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.ProgramFilesFolder)">
<Directory Id="INSTALLFOLDER" Name="$(var.Name)">
<Merge Id="CRT" Language="0" SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC100_CRT_x86.msm" DiskId="1" />
<Merge Id="CRT" Language="0" SourceFile="$(var.CRT)" DiskId="1" />
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder" />
Expand Down

0 comments on commit 158a621

Please sign in to comment.