[wix-users] Use variables in bundle theme

Blaine Wheeler blainekw at gmail.com
Mon Jun 25 06:48:47 PDT 2018


The bundle doesn't know the msi version unless you have it stored as a
property the bundle can read in the bundle's wxs as you create the bundle.

On Mon, Jun 25, 2018 at 3:43 AM Helge Kruse via wix-users <
wix-users at lists.wixtoolset.org> wrote:

> I have an installer package (MSI) that is packed in a bundle. The
> bundle adds the required run-time libraries.
>
> I want to show the current version in the bundle's welcome dialog. For
> that purpose I customized the theme file:
>
> <?xml version="1.0" encoding="utf-8"?>
> <?include Defines.wxi?>
> <Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
>   ...
>   <Page Name="Install">
>     <Text Name="X" X="50" Y="100" FontId="3" Height="80"
> Width="300">This is mySoft #(var.CurrentVersion)</Text>
>    ...
>   </Page>
> </Theme>
>
> The file Defines.wxi contains just the definition of the current version:
>
> <?xml version="1.0" encoding="utf-8"?>
> <Include>
>   <?define CurrentVersion="1.03.01"?>
> </Include>
>
> The Bundle.wxs references the theme file using
> WixStandardBootstraspperApplication:
>
> <Bundle Name="mySoft" Version="$(var.CurrentVersion)"
> Manufacturer="me" UpgradeCode="GUID">
>  <BootstrapperApplicationRef
> Id="WixStandardBootstrapperApplication.RtfLicense" >
>     <bal:WixStandardBootstrapperApplication LicenseFile="lic.rtf"
> ThemeFile="Theme.xml" />
>   </BootstrapperApplicationRef>
> </Bundle>
>
> Unfortunately the CurrentVersion is not expanded when the bundle is
> build. How can this be done?
>
> Regards
> Helge
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>


More information about the wix-users mailing list