[wix-users] Use variables in bundle theme
Helge Kruse
Helge.Kruse at gmx.net
Mon Jun 25 11:10:13 PDT 2018
Sorry for writing the question in the wrong way. I gave the snippet from
the theme.wxs that includes a file Defines.wxs directly. The bundle
doesn't need to know the version of the MSI. It should have it's own
version, I just gave both the same version by sharing the include file.
How can I customize a line in the theme.xml independent of the
localization? I would prefere if the version could be set in the include
file. But I want to avoid changing the theme.xml for each version of the
bundle.
Regards,
Helge
Am 25.06.2018 um 15:48 schrieb Blaine Wheeler via wix-users:
> 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/
>>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list