Have you looked at the DefineConstants of the PropertyGroup element of MSBuild?
Here's a blog that will get you started:
http://www.ageektrapped.com/blog/setting-properties-for-wix-in-msbuild/.
We have done something similar that may or may not be helpful for you. Our WiX
project needs to deploy both 32- and 64-bit versions of .DLLs and .EXEs when
the project is built for 64-bit configuration. We use MSBuild, and we require
our developers to do a 32-bit build before they do a 64-bit build so the 32-bit
binaries are available for the 64-bit build. The 64-bit MSBuild projects have
properties that identify target locations for both architectures. We use a
DefineConstants element in in our .wixproj project file to pass MSBuild
properties into our WiX code:
<PropertyGroup>
<DefineConstants>TargetBin=$(TargetBin);TargetBin32bit=$(TargetBin32bit)</DefineConstants>
</PropertyGroup>
Then in our WiX code:
<DirectoryRef Id="BinFolder">
<Component Id="AppAgentComponent"
Guid="{3163A861-83EB-4A3E-A34A-F983446EDE0A}">
<File Id ="AppAgentDLL" Source="$(var.TargetBin)\MyDll.dll"
KeyPath="yes" Checksum="yes" />
</Component>
</DirectoryRef>
<!-- The 64-bit MSI also has to install the 32-bit app agent dlls because a
32-bit process can't inject a 64-bit DLL. -->
<DirectoryRef Id="WowFolder">
<Component Id="AppAgentWoWComponent"
Guid="{5F7E8C97-6F45-4034-A538-A6668733CC45}">
<File Id ="AppAgentWowDLL" Source="$(var.TargetBin32bit)\MyDll.dll"
KeyPath="yes" Checksum="yes" />
</Component>
</DirectoryRef>
One other thing to watch out for if you are installing 32-bit binaries from a
64-bit WiX project: Writes to the registry may not end up in the Wow6432Node
like you would expect. So when your 32-bit COM server tries to read something
like HKLM\Software\SomeKey, it will actually be reading from
HKLM\Software\Wow6432Node\SomeKey. To get WiX to write the WoW registry, use
Win64="no":
<DirectoryRef Id="AgentInstallFolder" >
<Component Id="InstallVersionWowComponent"
Guid="{ED999FF2-FFF3-49C8-8056-D3437CF7AA8C}" Win64="no" >
<RegistryKey Root="HKLM" Key="Software\SomeKey"
Action="createAndRemoveOnUninstall" >
<RegistryValue Name="Version" Value="$(var.BuildVersion)"
Type="string" KeyPath="yes" />
</RegistryKey>
</Component>
</DirectoryRef>
Good luck.
- Larry
-----Original Message-----
From: Sean Farrow [mailto:[email protected]]
Sent: Friday, March 23, 2012 5:12 PM
To: [email protected]
Subject: [WiX-users] using a 32-bit project in a 64-bit installer
Hi:
I'm writing an installer in visual studio. I have a 32-bit com server that is
written in atl. This com server does not have a 64-build configuration and
therefore doesn't build when I build the 64-bit configurations. If I add the
Project.TargetPath to my installer, what path will this resolve to.
Given that the target path on a 32-bit build is $(SolutionDir)\$(Configuration).
Any help appreciated.
Regards
Sean.
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users