[wix-users] Common installer for x64 and x86

Swatantra Yadav swatantra.yadav at skykick.com
Mon Jul 8 13:20:33 PDT 2019


Thanks Edwin, Adnan and Rob. 

It seems like the best approach would be to build 'Any CPU' msi and that would work on both platforms. However since I need to load a COM library that is platform specific I will probably need separate msi for each platform. I will bundle them using a bootstrapper. 

Can the following condition be used in bootstrapper to determine at runtime (not compile time) what components should be actually installed when bootstrapper is run:

<![CDATA[NOT(VersionNT64)]]>

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Edwin Castro via wix-users
Sent: Thursday, July 4, 2019 12:33 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Edwin Castro <egcastr at gmail.com>
Subject: Re: [wix-users] Common installer for x64 and x86

To be fair, this is an approach to use one single source project to generate multiple MSI (one 32-bit and the other 64-bit). I think the question was can you have a single MSI instead.

If your application is 32-bit and doesn't need to be 64-bit at all, then you can just use a 32-bit MSI to install that application since 64-bit OS will run 32-bit applications. If you need to install a 32-bit application on a 32-bit OS and a 64-bit application on a 64-bit OS then you will need two MSI and should consider one bundle to decide which MSI to install as previously mentioned by others. You can definitely use one source project to create both 32-bit and 64-bit MSI using the approach demonstrated by Adnan. Of course, that's most useful if the application installs essentially the same otherwise you may have enough differences that separate projects may be a better approach.

Note that a 64-bit MSI can install both 32-bit and 64-bit components but a 32-bit MSI can only install 32-bit components. You can install both 64-bit and 32-bit MSI on a 64-bit OS but can only install 32-bit MSI on 32-bit OS.

--
Edwin G. Castro

On Wed, Jul 3, 2019 at 12:31 PM Adnan Shaheen via wix-users < wix-users at lists.wixtoolset.org> wrote:

> Yeah it is possible. We have two products, and use same one installer
> (each) for both x64 and x86. Depends on your needs. You'd have to 
> adjust some stuff, XML files help. Using same variables based on 
> platform works great.
> We use something like
>
> <?if $(var.Platform)=x64?>
> >     <? define myVar="x64 bit arch" ?> <?else?>
> >     <? define myVar="x86 bit arch" ?> <?endif?>
>
>
> Regards:
> Adnan Shaheen.
>
>
> On Wed, 3 Jul 2019 at 12:55, Swatantra Yadav via wix-users < 
> wix-users at lists.wixtoolset.org> wrote:
>
> > Hello All,
> >
> > Is it possible to have a common installer for both OS bitness - x64 
> > or
> x86?
> >
> > I am sure this question has been asked before and I did see a 10 
> > year old response that it is not possible but thought I will check 
> > if it is
> possible
> > now?
> >
> > Thanks,
> > Swatantra
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant
> > https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww
> > .firegiant.com%2F&data=02%7C01%7Cswatantra.yadav%40skykick.com%7
> > Ce6968903405d4d493c8f08d70051d535%7C3f9cd7a0127a4ed4bf062f830d5616b7
> > %7C0%7C0%7C636978223780091709&sdata=FhFtActptv0jU89iE4PtMQIKoGY3
> > rHr2YfzDvt4fLbI%3D&reserved=0
> >
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.f
> iregiant.com%2F&data=02%7C01%7Cswatantra.yadav%40skykick.com%7Ce69
> 68903405d4d493c8f08d70051d535%7C3f9cd7a0127a4ed4bf062f830d5616b7%7C0%7
> C0%7C636978223780101706&sdata=ZQoojaIzLgxKINJQ60zdHfuVTlOD2tjz41nO
> og7co4E%3D&reserved=0
>

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.firegiant.com%2F&data=02%7C01%7Cswatantra.yadav%40skykick.com%7Ce6968903405d4d493c8f08d70051d535%7C3f9cd7a0127a4ed4bf062f830d5616b7%7C0%7C0%7C636978223780101706&sdata=ZQoojaIzLgxKINJQ60zdHfuVTlOD2tjz41nOog7co4E%3D&reserved=0



More information about the wix-users mailing list