Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProgressText with WiX 4 #1462

Closed
rkyjak opened this issue Feb 23, 2024 · 5 comments
Closed

ProgressText with WiX 4 #1462

rkyjak opened this issue Feb 23, 2024 · 5 comments

Comments

@rkyjak
Copy link

rkyjak commented Feb 23, 2024

Hi,
I am using wix 4 and 0i tried to set a ProgressText property in my custom Action but ended up with a error:
The ProgressText element contains illegal inner text
After looking into it for a bit I noticed that it seems that in between WiX 3 and WiX 4 there has been a change that message of progress text was moved to a attribute.
WiX 3: https://wixtoolset.org/docs/v3/xsd/wix/progresstext/
WiX 4: https://wixtoolset.org/docs/schema/wxs/progresstext/

I tried to do it via XML injection in a WiX4 way and was able to build and run the MSI but unfortunatelly the text is not displayed.
Any ideas how to set the progress text using WiX 4 ?

@Torchok19081986
Copy link

Hiho, you can try following. I do it each time if i struggle in Wix#. Try direct Wix toolset with Heatwave Extension.
Install Heatwave Extension , now create Project in Visual Studio 2022 with Wix Toolset V3. VS created your new Project, click richt mouse for contextmenu on project and do something like "upgrade to Wixv4". After this your project is updated to new Wix V4 schema and now you can create msi. Most important Heatwave convert Wix MSI Project v3 to v4 with all needed Info. Look in output .wxs. Maybe you can find it . I found awlays differences in Wix schema v3 and v4 do it this way.

Best regards, Torchok.

@Torchok19081986
Copy link

Torchok19081986 commented Feb 23, 2024

Update to my Comment from before . I do some research and found some info.

i added new Project for Wix Toolset V4 as Package. Install via Nuget Package which wix toolset v4 shows https://www.firegiant.com/docs/heatwave/extensions/
after this i added

xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui"

on top of package. After this add

<ui:WixUI
  Id="WixUI_InstallDir"
  InstallDirectory="INSTALLFOLDER"/>
 <UIRef Id="WixUI_ErrorProgressText" />  

Description as well. Now build project and result in MSI Package with Installprogress with MSI Standard english Localized Custom Action Values. Little bit too quick.

@oleg-shilo
Copy link
Owner

Thank you for the tip @Torchok19081986.
This is a great way of discovering what has changed from WiX3 to WiX4. This is the way I did the WixSharp.wix3 porting to WiX4. While the WiX team implemented the w3->w4 conversion algorithm they often failed to reflect it comprehensively in the documentation.

Note, <UIRef Id="WixUI_ErrorProgressText" /> is generated for only for the project.UI = WUI.WixUI_InstallDir. Now I have changed it to be generated always and it can also be controlled by the new setting project.LocalizeErrorAndProgressText.

image

You can also inject this statement via XML injection:

project.WixSourceGenerated += doc 
    => doc.FindFirst("Package").AddElement("UIRef", "Id=WixUI_ErrorProgressText");

oleg-shilo added a commit that referenced this issue Feb 25, 2024
- Issue #1406: Multi-language improvement
- Issue #1462: ProgressText with WiX 4
- Issue #1463: Unable to find dotnet when building with dotnet cli
- Issue #1460: Add -sw1026 to default Wix4 argument options?
- PR #1461 from klokkenman1/wix-v4-master
  Add sw1026 to WixOptions
- Proposal #1456: Using PublishAot instead of SfxCA for custom actions
- Support for CA compiled with .NETCore (AOT)
- Added support for .NET Core projects (pre-release)
  See https://github.com/oleg-shilo/wixsharp/blob/wix-v4-master/Source/src/NET-Core
@Torchok19081986
Copy link

i have only last question here code

project.LocalizeErrorAndProgressText

also can be use for Bootstrapper V4, right or there is some changes ?

@oleg-shilo
Copy link
Owner

Yep, it is very much in use:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants