Wow, 3.0.2925.0 is a year old.  There are hundreds of bug fixes and changes 
since then.  Hmm, there have been some fixes to preprocessor recently to 
correctly handle relative paths when include files included include files and 
something to fix <?ifdef?> (but I think that was a regression).  After that, 
I'm really at a loss...

I know that there have been reports of issues in VS2005 but Jason has been 
fixing a lot of them.  He's also not having much luck getting repros of some 
issues people have reported.  Maybe if you can help work out the VS2005 issues 
in the latest WiX v3 builds then we can track down the preprocessor issue 
(assuming it still exists) at the same time?

Also, for everyone's benefit, this is why I always encourage anyone who is 
going to adopt the "in progress WiX toolset" (WiX v3 in this case) to keep up 
to date (at least monthly).  If you get too far behind and hit a bug then you 
can get trapped in a difficult position.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott Palmer
Sent: Wednesday, June 25, 2008 06:21
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Preprocessor ifdef did odd thing

I have a product that can be built two ways.  I have two WiX installer
projects in visual studio, sharing many of the same wxs files.  One project
defines a variable in the project settings to cause some of the .wxs files
to compile differently, like this:
...
    <Component Id="someFiles" Guid="8909196A-8C89-497c-A850-868D7648F063" >
      <File Id="file1" Source="..\..\SharedFiles\File1.exe" KeyPath="yes"
Name="File1.exe">
      </File>
      <?ifdef IsVersionA ?>
      <File Id="File2" Source="..\..\SharedFiles\File2_A.txt"
Name="File2.txt"/>
      <?else?>
      <File Id="File2" Source="..\..\SharedFiles\File2.txt"
Name="File2.txt"/>
      <?endif?>
      <File Id="File3" Source="..\..\SharedFiles\File3.txt"
Name="File3.txt"/>
    </Component>

    <Directory Id="ConfDir" Name="conf">
      <Component Id="configFiles"
Guid="936B3B83-AF5D-47ba-9985-3B4D22E6353B">
        <?ifdef IsVersionA ?>
          <File Id="ConfigFile"
Source="..\..\SharedFiles\conf\server-A.conf" Name="server.conf"/>
        <?else?>
          <File Id="ConfigFile" Source="..\..\SharedFiles\conf\server.conf"
Name="server.conf"/>
        <?endif?>
        <File Id="otherConfig" Source="..\..\SharedFiles\etc\"
Name="server-password.conf"/>
      </Component>
    </Directory>
...

When my project built with "IsVersionA=true" defined in the project settings
"File2.txt" in the msi was a copy of "File2_A.txt" but "server.conf" was a
copy of "..\..\SharedFiles\conf\server.conf"  NOT the expected
"..\..\SharedFiles\conf\server-A.conf"

When investigating I manually rebuilt only this project from the solution
(after shuffling some lines around to make File Id="otherConfig" the key
file of Component Id="configFiles") both files were correct.  Note that
there is another project in the solution that shares this same .wxs file and
does not define the IsVersionA variable.  I thought at the least that if for
some reason the .wxs wasn't being recompiled properly between project builds
when I built the solution (doing a "rebuild") that the results would be
consistent within the single .wxs.  They clearly were not - QA reported the
file inconsistency. I double checked to confirm the problem by using orca to
check the file sizes in the .msi.  Then I double checked the preprocessor
conditions in the .wxs source file. It was somewhat baffeling.

I'm using an older build of WiX 3 (3.0.2925.0) because the recent builds
don't work well with Visual Studio 2005.

Of course we are noticing this now only a day or two away from when we need
to release the production build... argh!

Can anyone shed some light (hey that's almost a pun) on what might be going
on and how I might deal with it in a reliable way.  Getting inconsistent
output from your build tools isn't a good thing.

Thanks,

Scott
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to