I should also mention that I don't use <?if?> around the <Package/> element. I 
set the Platform attribute to $(var.Platform):

<Package InstallerVersion="301" Compressed="yes" Platform="$(var.Platform)"/>

So far I only use <?if $(var.Platform) = x86 ?> to choose between 
ProgramFilesFolder and ProgramFiles64Folder. With any luck I won't need to be 
choosy anywhere else (we're depending on the build system to place files in the 
right place).

--
Edwin

> -----Original Message-----
> From: Castro, Edwin (Hillsboro) [mailto:egcas...@checkfree.com]
> Sent: Tuesday, January 27, 2009 8:11 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] platform agnostic file flag?
>
> I accomplished the same thing as follows:
>
> <Directory Id="TARGETDIR" Name="SourceDir">
>   <?if $(var.Platform) = x86 ?>
>     <Directory Id="ProgramFilesFolder">
>       <Directory Id="INSTALLLOCATION" Name="."/>
>     </Directory>
>   <?else?>
>     <Directory Id="ProgramFiles64Folder">
>       <Directory Id="INSTALLLOCATION" Name="."/>
>     </Directory>
>   <?endif?>
> </Directory>
>
> <DirectoryRef Id="INSTALLLOCATION">
>   <Directory Id="$(var.Manufacturer)" Name="$(var.Manufacturer)">
>     <Directory Id="$(var.Product)" Name="$(var.Product)">
>       <!-- etc... -->
>     </Directory>
>   </Directory>
> </DirectoryRef>
>
> I use the Platform msbuild property set in *.wixproj to tell me whether
> I'm building for x86 or not. It would be simple to replace the <?if?>
> conditional to use something more appropriate to your build process.
>
> Best part of all, no CustomAction needed!! ;-D
>
> --
> Edwin

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to