[wix-users] conditional compilation IFDEF ?

Alan Sinclair anadem at gmail.com
Wed Dec 11 19:41:12 PST 2019


Is there anything similar to "ifdef" for candle?

I'm using conditional compilation of some .wxs sources with syntax like
this:
<?if $(var.MY_VAR) = yes ?>
        <Condition Message="You need to be an administrator to install this
product.">
            Privileged
        </Condition>
<?else ?>
        stuff
<?endif ?>
candle myfile.wxs -dMY_VAR=no

My makefiles would be nicer if I could simply omit  "-dMY_VAR=no" when its
value isn't "yes"

thanks
Alan


More information about the wix-users mailing list