Thanks for the reply.

I implemented both to see how each works, both methods work very well.

Personally I prefer using the define method, because it is part of my
sources without having to play in the project files.

Except for personal preferences are both methods equally acceptable, does
not have an advantage over the other?

Just curious,
Marc

-----Original Message-----
From: Daniel Madill [mailto:dan.mad...@quanser.com] 
Sent: March-28-2013 12:27 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] VS Building using Different platforms

Hello Marc,

I do this all the time, building both a 32-bit MSI and a 64-bit MSI from the
same source simply based on the platform selected. I have a WiX include file
containing the following:

    <?if $(var.Platform) = "x64" ?>
        <?define Win64 = "yes"?>
        <?define PlatformType = "x64"?>
        <?define WindowsFolderName = "win64"?>
        <?define NumBitsFolder = "64-bit"?>
    
        <?define PlatformCommonFilesFolder  = "CommonFiles64Folder"?>
        <?define PlatformProgramFilesFolder = "ProgramFiles64Folder"?>
    <?else?>
        <?define Win64 = "no"?>
        <?define PlatformType = "x86"?>
        <?define WindowsFolderName = "windows"?>
        <?define NumBitsFolder = "32-bit"?>

        <?define PlatformCommonFilesFolder  = "CommonFilesFolder"?>
        <?define PlatformProgramFilesFolder = "ProgramFilesFolder"?>
    <?endif?>

which allows me to specify my Program Files folder as:

    <Directory Id="$(var.PlatformProgramFilesFolder)">

components as:

    <Component Id="my_component_id" Guid="{PUT-GUID-HERE}"
Win64="$(var.Win64)">

and to include installer elements conditionally such as:

    <?if $(var.Platform) != "x64" ?>
        ...
    <?endif?>

I use a single Product.wxs for both configurations and then just make
differences where needed using the above if statement.

Hope this helps.

Daniel Madill
www.quanser.com

-----Original Message-----
From: Marc Beaudry [mailto:mbeau...@matrox.com]
Sent: March-28-13 11:55 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] VS Building using Different platforms

Hello

 

I searched and can't find anything on the subject, my guess is my search is
inaccurate since I am not sure how to explain this.

 

I have an MS VisualStudio 2012 wix project that when I compile my solution
it I output an MSI using the newly built binaries.

 

That being said I would like to create 2 MSIs one 32bit OR one 64bit MSI
depending on the build configuration I selected (32 or 64bit).

 

Can I change the  Platform value in the Package tag depending on the build
configuration selected?

Can I have 2 different Product.wxs files one for 32 and one for 64 and the
build selects the appropriate one depending on the build config.

 

Are there better ways of doing this?

 

Essentially my end goal is to have one project that outputs two MSIs,
32/64bit.

 

Thanks for the advice,

Marc

 

----------------------------------------------------------------------------
--
Own the Future-Intel&reg; Level Up Game Demo Contest 2013 Rise to greatness
in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game on Steam. $5K
grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

----------------------------------------------------------------------------
--
Own the Future-Intel&reg; Level Up Game Demo Contest 2013 Rise to greatness
in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game on Steam. $5K
grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to