gpt4 book ai didi

WIX - 添加自定义对话框后退/下一步按钮有问题

转载 作者:行者123 更新时间:2023-12-05 04:18:39 25 4
gpt4 key购买 nike

我正在创建自定义 WixUi 配置,这是我目前所做的:

将 WixUI_Minimal.wxs 文件复制到我的项目中并将 Id 更改为:WixUI_CustomMinimal将 WelcomeEulaDlg.wxs 文件复制到我的项目中并将 Id 更改为:CustomWelcomeEulaDlg将 WelcomeDlg.wxs 文件复制到我的项目中并将 Id 更改为:CustomWelcomeDlg将 InstallTypeDlg.wxs 添加到我的项目中

修改了 CustomWelcomeEulaDlg 以将安装按钮更改为下一步按钮。修改 WixUI_CustomMinimal 使 WelcomeEulaDlg 上的 Next/NextNoShield 按钮打开 InstallTypeDlg 对话框

将 InstallTypeDlg 对话框添加到 InstallUiSequence。

所以现在的问题是:我正在尝试在 InstallTypeDlg 上设置后退按钮,这是有效的,但是在按下后退按钮然后按下 CustomWelcomeEulaDlg 上的下一个按钮后,InstallTypeDlg 被跳过并直接进入安装。

这是我的文件:

WixUI_CustomMinimal

<?xml version="1.0" encoding="UTF-8"?>
<!--
<copyright file="WixUI_Minimal.wxs" company="Outercurve Foundation">
Copyright (c) 2004, Outercurve Foundation.
This software is released under Microsoft Reciprocal License (MS-RL).
The license and further copyright text can be found in the file
LICENSE.TXT at the root directory of the distribution.
</copyright>
-->

<!--
First-time install dialog sequence:
- WixUI_WelcomeEulaDlg

Maintenance dialog sequence:
WixUI_MaintenanceWelcomeDlg
- WixUI_MaintenanceTypeDlg
- WixUI_VerifyReadyDlg

Patch dialog sequence:
- WixUI_WelcomeDlg
- WixUI_VerifyReadyDlg
-->

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI Id="WixUI_CustomMinimal">
<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" />

<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
<Property Id="WixUI_Mode" Value="Minimal" />

<DialogRef Id="ErrorDlg" />
<DialogRef Id="FatalError" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="MsiRMFilesInUse" />
<DialogRef Id="PrepareDlg" />
<DialogRef Id="ProgressDlg" />
<DialogRef Id="ResumeDlg" />
<DialogRef Id="UserExit" />
<DialogRef Id="CustomWelcomeDlg" />
<DialogRef Id="CustomWelcomeEulaDlg" />
<DialogRef Id="InstallTypeDlg" />


<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>

<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg">1</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>

<Publish Dialog="CustomWelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomWelcomeDlg" Order="2">Installed AND PATCH</Publish>

<Publish Dialog="CustomWelcomeEulaDlg" Control="Next" Event="NewDialog" Value="InstallTypeDlg">Installed AND PATCH</Publish>
<Publish Dialog="CustomWelcomeEulaDlg" Control="NextNoShield" Event="NewDialog" Value="InstallTypeDlg">Installed AND PATCH</Publish>

<Publish Dialog="InstallTypeDlg" Control="Back" Event="NewDialog" Value="CustomWelcomeEulaDlg" Order="2">Installed AND PATCH</Publish>

<InstallUISequence>
<Show Dialog="CustomWelcomeDlg" Before="CustomWelcomeEulaDlg">Installed AND PATCH</Show>
<Show Dialog="CustomWelcomeEulaDlg" Before="InstallTypeDlg">NOT Installed</Show>
<Show Dialog="InstallTypeDlg" Before="ProgressDlg">NOT Installed</Show>
</InstallUISequence>

<Property Id="ARPNOMODIFY" Value="1" />
</UI>

<UIRef Id="WixUI_Common" />
</Fragment>
</Wix>

CustomWelcomeEulaDlg

<?xml version="1.0" encoding="UTF-8"?>
<!--
<copyright file="WelcomeEulaDlg.wxs" company="Outercurve Foundation">
Copyright (c) 2004, Outercurve Foundation.
This software is released under Microsoft Reciprocal License (MS-RL).
The license and further copyright text can be found in the file
LICENSE.TXT at the root directory of the distribution.
</copyright>
-->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI>
<Dialog Id="CustomWelcomeEulaDlg" Width="370" Height="270" Title="!(loc.WelcomeEulaDlg_Title)">
<Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.WelcomeEulaDlgBitmap)" />
<Control Id="Title" Type="Text" X="130" Y="6" Width="225" Height="30" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeEulaDlgTitle)" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="LicenseAcceptedCheckBox" Type="CheckBox" X="130" Y="207" Width="226" Height="18" CheckBoxValue="1" Property="LicenseAccepted" Text="!(loc.WelcomeEulaDlgLicenseAcceptedCheckBox)" />
<Control Id="Print" Type="PushButton" X="88" Y="243" Width="56" Height="17" Text="!(loc.WixUIPrint)">
<Publish Event="DoAction" Value="WixUIPrintEula">1</Publish>
</Control>
<Control Id="Back" Type="PushButton" X="156" Y="243" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUIBack)" />
<Control Id="Next" Type="PushButton" ElevationShield="yes" X="212" Y="243" Width="80" Height="17" Default="yes" Text="Next" Hidden="yes">
<Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1</Publish>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>

<Condition Action="disable"><![CDATA[LicenseAccepted <> "1"]]></Condition>
<Condition Action="enable">LicenseAccepted = "1"</Condition>
<Condition Action="show">ALLUSERS</Condition>
</Control>
<Control Id="NextNoShield" Type="PushButton" ElevationShield="no" X="212" Y="243" Width="80" Height="17" Default="yes" Text="Next" Hidden="yes">
<Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1</Publish>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>

<Condition Action="disable"><![CDATA[LicenseAccepted <> "1"]]></Condition>
<Condition Action="enable">LicenseAccepted = "1"</Condition>
<Condition Action="show">NOT ALLUSERS</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="130" Y="36" Width="226" Height="162" Sunken="yes" TabSkip="no">
<Text SourceFile="!(wix.WixUILicenseRtf)" />
</Control>
</Dialog>
</UI>

<InstallUISequence>
<Show Dialog="CustomWelcomeEulaDlg" Before="ProgressDlg" Overridable="yes">NOT Installed</Show>
</InstallUISequence>
</Fragment>
</Wix>

安装类型Dlg

<?xml version="1.0" encoding="UTF-8"?>
<!--
<copyright file="WelcomeEulaDlg.wxs" company="Outercurve Foundation">
Copyright (c) 2004, Outercurve Foundation.
This software is released under Microsoft Reciprocal License (MS-RL).
The license and further copyright text can be found in the file
LICENSE.TXT at the root directory of the distribution.
</copyright>
-->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI>
<Property Id="INSTALLTYPE" Value="Null"/>
<Dialog Id="InstallTypeDlg" Width="370" Height="270" Title="!(loc.WelcomeEulaDlg_Title)">

<Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.WelcomeEulaDlgBitmap)" />
<Control Id="Title" Type="Text" X="130" Y="6" Width="225" Height="30" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeEulaDlgTitle)" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="Print" Type="PushButton" X="88" Y="243" Width="56" Height="17" Text="!(loc.WixUIPrint)">
<Publish Event="DoAction" Value="WixUIPrintEula">1</Publish>
</Control>
<Control Id="Back" Type="PushButton" X="156" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
<Control Id="Install" Type="PushButton" ElevationShield="yes" X="212" Y="243" Width="80" Height="17" Default="yes" Text="Install" Hidden="yes">
<Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1</Publish>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
<Publish Event="AddLocal" Value="ServiceFeature"><![CDATA[INSTALLTYPE = "SERVICE"]]></Publish>
<Publish Event="Remove" Value="ServiceFeature"><![CDATA[INSTALLTYPE <> "SERVICE"]]></Publish>
<Condition Action="disable">INSTALLTYPE = "Null"</Condition>
<Condition Action="enable"><![CDATA[INSTALLTYPE <> "Null"]]></Condition>
<Condition Action="show">ALLUSERS</Condition>
</Control>
<Control Id="InstallNoShield" Type="PushButton" ElevationShield="no" X="212" Y="243" Width="80" Height="17" Default="yes" Text="Install" Hidden="yes">
<Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1</Publish>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
<Publish Event="AddLocal" Value="ServiceFeature"><![CDATA[INSTALLTYPE = "SERVICE"]]></Publish>
<Publish Event="Remove" Value="ServiceFeature"><![CDATA[INSTALLTYPE <> "SERVICE"]]></Publish>
<Condition Action="disable">INSTALLTYPE = "Null"</Condition>
<Condition Action="enable"><![CDATA[INSTALLTYPE <> "Null"]]></Condition>
<Condition Action="show">NOT ALLUSERS</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="FeatureGroup" Property="INSTALLTYPE" Type="RadioButtonGroup" Default="no" X="130" Y="36" Width="226" Height="162">
<RadioButtonGroup Property="INSTALLTYPE">
<RadioButton Text="Console" Height="17" Value="CONSOLE" Width="150" X="20" Y="0" />
<RadioButton Text="Windows Service" Height="17" Value="SERVICE" Width="150" X="20" Y="25" />
<RadioButton Value="Null" X="0" Y="0" Width="0" Height="0" Text="Null" />
</RadioButtonGroup>
</Control>
</Dialog>
</UI>

<InstallUISequence>
<Show Dialog="InstallTypeDlg" Before="ProgressDlg" Overridable="yes">NOT Installed</Show>
</InstallUISequence>
</Fragment>
</Wix>

最佳答案

第一个问题在 InstallUISequence 中。你应该使用:

<Show Dialog="CustomWelcomeDlg" Before="CustomWelcomeEulaDlg">
Installed AND PATCH
</Show>
<Show Dialog="CustomWelcomeEulaDlg" Before="ProgressDlg">
NOT Installed
</Show>

在 CustomWelcomeEulaDlg 中,后退和下一步按钮应该是这样的:

<Control Id="Back" Type="PushButton" X="156" Y="243"
Width="56" Height="17" Disabled="yes" Text="Back" />

<Control Id="Next" Type="PushButton" ElevationShield="yes"
X="212" Y="243" Width="80" Height="17" Default="yes"
Text="Next" Hidden="yes">
<Publish Event="NewDialog" Value="InstallTypeDlg">1</Publish>
</Control>

并且在 InstallTypeDlg 中,后退和安装按钮应该与此类似:

<Control Id="Back" Type="PushButton" X="156" Y="243" Width="56"
Height="17" Disabled="yes" Text="Back">
<Publish Event="NewDialog" Value="CustomWelcomeEulaDlg">1</Publish>
</Control>

<Control Id="Install" Type="PushButton" ElevationShield="yes" X="212" Y="243"
Width="80" Height="17" Default="yes" Text="Install" Hidden="yes">
<Publish Event="EndDialog" Value="Return" />
</Control>

关于WIX - 添加自定义对话框后退/下一步按钮有问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12571461/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com