Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integer variables at WIX

I would like to install a feature according to the brand.
So in my brand.wxi I defined:

    <?define brand.FeatureLevel = 1 ?>

And in my wxs I wrote:

            <Feature Id="FF" Title="FF" Level="$(var.brand.FeatureLevel)">
                <ComponentRef Id="..." />
                <ComponentRef Id="..." />
            </Feature>

This definition works fine (wheather I've placed 0 or 1 as FeatureLevel). My only problem is a warning I get at compilation time:

The 'Level' attribute is invalid - The value '$(var.brand.FeatureLevel)' is invalid according to its datatype 'http://www.w3.org/2001/XMLSchema:integer' - The string '$(var.brand.FeatureLevel)' is not a valid Integer value.

Is there a way to fix this warning? Can I define integer variable? I couldn't find a way...

like image 860
Hila Avatar asked Oct 26 '25 10:10

Hila


1 Answers

You can safely ignore this warning. It just points your attention that this preprocessor variable must evaluate to integer. Otherwise, if you modify brand.FeatureLevel to a letter in the sample above, it will throw an error and simply won't compile.

like image 78
Yan Sklyarenko Avatar answered Oct 28 '25 04:10

Yan Sklyarenko