There is another way to do this, and although it is a bit dirty, it is less dirty than the two workarounds that the OP mentioned. And the loan for which the loan is calculated, this answer is almost 100% based on this message http://weblogs.sqlteam.com/mladenp/archive/2010/04/15/WiX-3-Tutorial-Custom-EULA-License- and-MSI-localization.aspx Mladen Pridech.
The following is a description of WiX 3.5.
You create a slightly modified copy of the LicenseAgreementDlg dialog and include it in your project.
<?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Fragment> <UI> <Dialog Id="LicenseAgreementKludge" Width="370" Height="270" Title="!(loc.LicenseAgreementDlg_Title)"> <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.LicenseAgreementDlgBannerBitmap)" /> <Control Id="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="25" Y="23" Width="340" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.LicenseAgreementDlgDescription)" /> <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.LicenseAgreementDlgTitle)" /> <Control Id="LicenseAcceptedCheckBox" Type="CheckBox" X="20" Y="207" Width="330" Height="18" CheckBoxValue="1" Property="LicenseAcceptedKludge" Text="!(loc.LicenseAgreementDlgLicenseAcceptedCheckBox)" /> <Control Id="Print" Type="PushButton" X="112" Y="243" Width="56" Height="17" Text="!(loc.WixUIPrint)"> <Publish Event="DoAction" Value="WixUIPrintEula">1</Publish> </Control> <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" /> <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)"> <Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1</Publish> <Condition Action="disable"><![CDATA[LicenseAcceptedKludge <> "1"]]></Condition> <Condition Action="enable">LicenseAcceptedKludge = "1"</Condition> </Control> <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)"> <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish> </Control> <Control Id="LicenseText" Type="ScrollableText" X="20" Y="60" Width="330" Height="140" Sunken="yes" TabSkip="no"> <Text SourceFile="$(var.ProjectDir)\!(loc.LicenseRtf)" /> </Control> </Dialog> </UI> </Fragment> </Wix>
In the WiX main source file, you added the following code to βfixβ the new dialog in the dialog sequence instead of the original:
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementKludge">1</Publish> <Publish Dialog="LicenseAgreementKludge" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish> <Publish Dialog="LicenseAgreementKludge" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAcceptedKludge = "1"</Publish> <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementKludge">1</Publish>
Note that this is based on using the collection of the WixUI_InstallDir dialog box - for other collections such as WixUI_Mondo, you may have to change the above by looking at the source.
Finally, in each of your localization files, you put one line as follows:
<String Id="LicenseRtf">en-us\MerliniaSMSGatewayLicense.en-us.rtf</String> <String Id="LicenseRtf">da-dk\MerliniaSMSGatewayLicense.da-dk.rtf</String>
And, of course, you put the localized license file as indicated. I put license files (and localization files) in subfolders, but this is not necessary.
As I said, this is a little dirty, but it works.
Renniepet
source share