This commit is contained in:
Kovid Goyal 2012-11-30 21:08:49 +05:30
parent e1085ca005
commit 629277a2f4
2 changed files with 15 additions and 0 deletions

View File

@ -127,12 +127,26 @@
Message="This application is only supported on {minverhuman}, or higher."> Message="This application is only supported on {minverhuman}, or higher.">
<![CDATA[Installed OR (VersionNT >= {minver})]]> <![CDATA[Installed OR (VersionNT >= {minver})]]>
</Condition> </Condition>
<!-- On 64 bit installers there is a bug in WiX that causes the
WixSetDefaultPerMachineFolder action to incorrectly set
APPLICATIONFOLDER to the x86 value, so we override it. See
http://stackoverflow.com/questions/5479790/wix-how-to-override-c-program-files-x86-on-x64-machine-in-wixui-advanced-s
-->
<CustomAction
Id="OverwriteWixSetDefaultPerMachineFolder"
Property="WixPerMachineFolder"
Value="[APPLICATIONFOLDER]"
Execute="immediate"
/>
<InstallExecuteSequence> <InstallExecuteSequence>
<Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWPRODUCTFOUND</Custom> <Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWPRODUCTFOUND</Custom>
{fix_wix}
<RemoveExistingProducts After="InstallFinalize" /> <RemoveExistingProducts After="InstallFinalize" />
</InstallExecuteSequence> </InstallExecuteSequence>
<InstallUISequence> <InstallUISequence>
<Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWPRODUCTFOUND</Custom> <Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWPRODUCTFOUND</Custom>
{fix_wix}
</InstallUISequence> </InstallUISequence>
<UI> <UI>

View File

@ -43,6 +43,7 @@ class WixMixIn:
x64 = ' 64bit' if is64bit else '', x64 = ' 64bit' if is64bit else '',
minverhuman = MINVERHUMAN, minverhuman = MINVERHUMAN,
minver = '600' if is64bit else '501', minver = '600' if is64bit else '501',
fix_wix = '<Custom Action="OverwriteWixSetDefaultPerMachineFolder" After="WixSetDefaultPerMachineFolder" />' if is64bit else '',
compression = self.opts.msi_compression, compression = self.opts.msi_compression,
app_components = components, app_components = components,
exe_map = self.smap, exe_map = self.smap,