Include files conditionally with compiler variables

Got a problem you cannot solve? Try here.
Post Reply
maurix
Posts: 5
Joined: Fri Aug 24, 2007 11:24 am

Include files conditionally with compiler variables

Post by maurix »

I'd like to use a compiler variable to add files in the setup conditionally. The MSI code attached is what I did, but in the setup there are both files. It seems that the compiler variable I defined in the Project Options is ignored, though I see WEBDEMO = true when building the setup.
What's my error?

This is the MSI code:

[DEFINE REGION: Perform First Time or Maintenance Installation]
Comment: Install/Re-Install product
[OFFLINE CONTENT]
[compiler if Variable WEBDEMO Equals (Ignore Case) TRUE]
Install Files X:\\DEMO\\MyApp.exe to $TARGETDIR$
[compiler else]
Install Files X:\\FULL\\MyApp.exe to $TARGETDIR$
[compiler end]
....
Maurix
www.radiotaormina.com
pfennig

Post by pfennig »

From this code snippet alone it looks fine. Do you have the same files somewhere installed
with different conditions? Sometimes, if you're not careful, you can have files included more
often than you intended.
maurix
Posts: 5
Joined: Fri Aug 24, 2007 11:24 am

Post by maurix »

Ok thank you very much. The problem was due to files included more than once.

Now it's working properly.
Maurix
www.radiotaormina.com
Post Reply