Could you try a custom preprocessor extension?

----- Original Message ----- 
From: "John Nannenga" <john.nanne...@microsoft.com>
To: "General discussion for Windows Installer XML toolset." 
<wix-users@lists.sourceforge.net>
Sent: Friday, February 12, 2010 4:10 AM
Subject: [WiX-users] Preprocessor <?ifdef &environment variables...


>I think this is kind of odd:
>
>  <?define $(env.TMP)=adsf?>
>  <?ifdef $(env.TMP)?>
>    <?define foo=Yes?>
>  <?else?>
>    <?define foo=No?>
>  <?endif?>
>
> Which compiles just fine.
>
> What I want to be able to do is have the preprocessor condition logic 
> based on whether or not an environment variable is set.
>
> Forexample:
>
> <?ifndef PublicKeyToken ?>
>  <?ifdef $(env.ENABLE_PRS_DELAYSIGN)?>
>    <?define PublicKeyToken=ShippingKeyToken?>
>  <?else?>
>    <?define PublicKeyToken=TestKeyToken?>
>  <?endif?>
> <?endif?>
>
>
> But I cannot use <?if $(env.ENABLE_PRS_DELAYSIGN)=1?> because in the case 
> when the environment variable is not set, WiX throws an "Undefined 
> preprocessor variable '$(env.ENABLE_PRS_DELAYSIGN)'." Error.
>
> Thoughts as to how to go about this?
>
>
>
> (FWIW, I cannot seem to use binder variables here as it appears that 
> binder variables are only avail for assemblies that are being GAC'd, here 
> the assemblies are not being GAC'd).
>
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> 



------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to