在 wix Bootstrapper 主题文件中使用 .wxs 文件中的变量
Use variables from .wxs file in wix Bootstrapper theme file
在我的引导程序中 Theme.xml 我想引用 .wxs 文件中的路径变量。
在 Bundle.wxs
中,我使用 $()
语法引用某些变量。
在我的 <BootstrapperApplicationRef>
中,我使用了 ThemeFile。
从那里我想使用相同的变量(例如 var.BundelVersionNumber
)。我怎样才能做到这一点?
Bundlex.wxs
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="MyApplication $(var.BundelVersionNumber) ($(var.Platform))"
我看到我可以使用一些内置的刻录变量,例如[WixBundleName ]
,:
http://wixtoolset.org/documentation/manual/v3/bundle/bundle_built_in_variables.html
您可以在包中声明一个变量并根据预处理器变量定义值。
<Variable Name="Platform" Value="$(var.Platform)"/>
然后您可以在您的 theme.xml(或者最好是您的本地化主题 wxl )中使用它。
[Platform]
在我的引导程序中 Theme.xml 我想引用 .wxs 文件中的路径变量。
在 Bundle.wxs
中,我使用 $()
语法引用某些变量。
在我的 <BootstrapperApplicationRef>
中,我使用了 ThemeFile。
从那里我想使用相同的变量(例如 var.BundelVersionNumber
)。我怎样才能做到这一点?
Bundlex.wxs
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="MyApplication $(var.BundelVersionNumber) ($(var.Platform))"
我看到我可以使用一些内置的刻录变量,例如[WixBundleName ]
,:
http://wixtoolset.org/documentation/manual/v3/bundle/bundle_built_in_variables.html
您可以在包中声明一个变量并根据预处理器变量定义值。
<Variable Name="Platform" Value="$(var.Platform)"/>
然后您可以在您的 theme.xml(或者最好是您的本地化主题 wxl )中使用它。
[Platform]