Note I don't know if this is your scenario or not, but if you are installing 
architecture neutral components like .Net assemblies, and are installing them 
into the same location regardless of your package architecture (such as the 
GAC), then you should make a single Win64="no" component and include it in both 
MSIs. 64 bit MSIs can have 32 bit components just fine, and it ensures 
component rules are followed for both. Of course you can't mark the compnent 64 
bit in that case because then it couldn't exist in a 32 bit MSI.

Again, that doesn't apply if you are installing your assemblies side-by-side 
with the app under the architecture-dependent Program Files folder or some 
other location that differs between packages.
--
Bryan

________________________________________
From: MikeR [michael.ru...@gmail.com]
Sent: Friday, January 22, 2010 6:49 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] WiX syntax for GUIDs for 32-bit/64-bit components

Currently I have some WiX projects that build both an x86 and x64 MSI.  Many
of our components contain .NET assemblies that target Any CPU so the fact
that the components differ at all is just to properly support Windows
Installer method of managing x86/x64 components based on the target OS.

Now, according what I've found all components installed in a such a fashion,
should have a separate GUID for the x86 vs the x64 component, everything
else is the same so I ended up with a component syntax like this for such
components.

      <?if $(var.Platform)="x64" ?>
      <?define ComponentName.Guid="PUT-GUID-HERE" ?>
      <?else ?>
      <?define ComponentName.Guid="PUT-GUID-HERE" ?>
      <?endif ?>
      <Component Id="C_Component" Guid="$(var.ComponentName.Guid)"
Win64="$(var.Win64)">
        <File Id="File.dll"
              Name="File.dll"
              Source="$(var.Source)File.dll"
              KeyPath="yes" />
      </Component>

The Platform variable is handled by Votive through the default VS platform
value and the Win64 variables is one I handle in a common include that
checks the value of Platform and sets it to yes/no accordingly.  So, two
things...

First, is there a better way to handle the syntax for this currently in WiX
that I'm just missing?  I'm using almost as much space with preprocessor
logic just to get the GUID set for both platforms as I am for the component
itself.  I realize I could have one if/else block with all my component
GUIDs but I wanted to keep all the information for each component together.

Secondly, it would be really nice if there was just an additional attribute
on the Component node for an x64 GUID and the compiler could use the proper
GUID based on the Win64 attribute value.  I'm not sure what the best
implementation would be but it seems like there should be a better way of
handling this scenario in the syntax that doesn't require use of
preprocessor logic.  Since there is currently interest on the WiX dev team
to make the syntax more flexible and concise I thought I'd make this
suggestion.

Thanks,
Mike
--
View this message in context: 
http://n2.nabble.com/WiX-syntax-for-GUIDs-for-32-bit-64-bit-components-tp4440404p4440404.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to