Reputation: 11
Newbie to WiX here... I have created my WiX installer package, and it installs all features correctly. Then I try adding a UI to it with the following:
<UIRef Id="WixUI_Minimal" />
<UIRef Id="WixUI_ErrorProgressText" />
and I link with "light -ext WixUIExtension -cultures:en-us". It finds this extension because it will give an error if I try it with a non-existent name, but the resulting msi package is only 30kb. I assume this should be slightly larger if the UI extension is correctly linked?
When I run the msi, it just gives the normal progress bar and no additional UI that I am expecting from WixUI_Minimal.
All the references seem to claim that a simple UIRef is all you need to get a UI when the package is linked correctly... Is there a known way for the linking to not happen correctly with no errors being thrown (even when I link with -pedantic)?
Upvotes: 1
Views: 649
Reputation: 35946
The MSI may not be significantly larger when you add the UI. There are not many graphics provided by default. However, if you are not seeing UI during the install, that does mean the UI is not being linked in.
The UIRef
needs to be in a referenced section. The first section the linker starts with is the Product
element. If your UIRef
is a child of Product
then it will definitely get linked in. The linker then walks through all the references in the Product
element (anything that ends in a Ref
is a reference as are many other attributes) looking for needed elements in other Fragment
elements. The linker then pulls in everything in those Fragment
elements. For example:
<Product>
<DirectoryRef Id='TARGETDIR' />
</Product>
<Fragment>
<Directory Id='TARGETDIR' Source='SourceDir' />
<BinaryRef Id='icon' />
<Fragment>
<Fragment>
<Binary Id='icon' Source='path\to\my.ico' />
</Fragment>
<Fragment>
<UIRef Id='WixUI_Minimal' />
</Fragment>
In the above example, the first three sections will be included by the linker. The section with UIRef='WixUI_Minimal'
however is left out because nothing references it. To fix it, the UIRef
could be moved to any of the other Fragment
elements.
To test, try moving your UIRef
to your Product
element. If that doesn't work, provide more details in your question about where your UIRef
is for us to help further.
Upvotes: 1