Should the Template string in the ActionText for InstallFiles be overridden to match the installer's content
I have an installer which installs about 40 files and two directories. This installer is based on WixUI_InstallDir "template", but I've included some of the UI definition within my WXS project.
<!--UIRef Id="WixUI_InstallDir"/-->
<UI Id="WixUI_InstallDir">
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" Red="255" Green="255" Blue="255" />
<TextStyle Id="WixUI_Font_Title_Normal" FaceName="Tahoma" Size="8" Red="255" Green="255" Blue="255" />
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
<Property Id="WixUI_Mode" Value="InstallDir" />
<DialogRef Id="BrowseDlg" />
<DialogRef Id="DiskCostDlg" />
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FatalError" />
<Dialog Id="FilesInUse" Width="370" Height="270" Title="!(loc.FilesInUse_Title)" Modeless="yes" Hidden="yes" NoMinimize="yes">
<Control Id="Retry" Type="PushButton" X="304" Y="243" Width="56" Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUIRetry)">
<Publish Event="EndDialog" Value="Retry">1</Publish>
</Control>
<Control Id="Ignore" Type="PushButton" X="235" Y="243" Width="56" Height="17" Text="!(loc.WixUIIgnore)">
<Publish Event="EndDialog" Value="Ignore">1</Publish>
</Control>
<Control Id="Exit" Type="PushButton" X="166" Y="243" Width="56" Height="17" Text="!(loc.FilesInUseExit)">
<Publish Event="EndDialog" Value="Exit">1</Publish>
</Control>
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.FilesInUseBannerBitmap)" />
<Control Id="Text" Type="Text" X="20" Y="55" Width="330" Height="30" Text="!(loc.FilesInUseText)" />
<Control Id="开发者_C百科BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="Description" Type="Text" X="20" Y="23" Width="280" Height="20" Transparent="yes" NoPrefix="yes" Text="!(loc.FilesInUseDescription)" />
<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.FilesInUseTitle)" />
<Control Id="List" Type="ListBox" X="20" Y="87" Width="330" Height="130" Property="FileInUseProcess" Sunken="yes" TabSkip="yes" />
</Dialog>
<DialogRef Id="PrepareDlg" />
<DialogRef Id="ProgressDlg" />
<DialogRef Id="ResumeDlg" />
<DialogRef Id="UserExit" />
<Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3">1</Publish>
<Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4"><![CDATA[WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg">1</Publish>
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1">NOT Installed</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed</Publish>
<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
<ProgressText Action="RegisterExtensions">!(loc.RegisterExtension)</ProgressText>
<ProgressText Action="RegisterExtensions64">!(loc.RegisterExtension64)</ProgressText>
<ProgressText Action="UnregisterExtensions">!(loc.RegisterExtension)</ProgressText>
<ProgressText Action="UnregisterExtensions64">!(loc.RegisterExtension64)</ProgressText>
<ProgressText Action="CA.DeleteTempFolder">!(loc.DeleteTempFolder)</ProgressText>
</UI>
<UIRef Id="WixUI_Common" />
<UIRef Id="WixUI_ErrorProgressText"/>
When I try to open the resulting MSI file, and look into the ActionText table I find the following text:
Action Description Template InstallFiles Copying new files File:[1], Directory:[9], Size:[6]
Should I override the Template value with my own defined values?
If so - is it possible to calculate those values instead of hard coding them in? Can I reference the component/file definitions in my WXS file and then calculate a size?
I see from this that the value [1]
, [9]
and [6]
actually isn't the number of files and directories, but representing the file, directory which the file gets copied into and the file size. So I'm obviously not going to replace them, but I'm still not satisfied with the progress bar for the MSI.
I'm not sure if this is what you're asking for, but you can influence the way Template is formed by 'Template'
attribute of the <ProgressText/>
element. See this for more details.
精彩评论