diff options
Diffstat (limited to 'src/ext/UI/wixlib/WixUI_Advanced.wxs')
-rw-r--r-- | src/ext/UI/wixlib/WixUI_Advanced.wxs | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/src/ext/UI/wixlib/WixUI_Advanced.wxs b/src/ext/UI/wixlib/WixUI_Advanced.wxs new file mode 100644 index 00000000..7d1f4df0 --- /dev/null +++ b/src/ext/UI/wixlib/WixUI_Advanced.wxs | |||
@@ -0,0 +1,121 @@ | |||
1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
2 | |||
3 | |||
4 | |||
5 | <!-- | ||
6 | WixUI_Advanced offers a two-click install (EULA checkbox and Install button) | ||
7 | and offers an Advanced button that lets users choose per-machine or per-user | ||
8 | installs, install path, and features. | ||
9 | |||
10 | WiX variables used: | ||
11 | - WixUISupportPerMachine | ||
12 | - WixUISupportPerUser | ||
13 | |||
14 | Todo: | ||
15 | - Clicking Install doesn't work! - APPLICATIONFOLDER isn't set; need to accept another "incoming" property. | ||
16 | - Replace this dialog set UI fragment with the UI extension. | ||
17 | = This set is still in active development. | ||
18 | = Future releases are likely to be incompatible. | ||
19 | = Future releases are likely to be much easier to use. | ||
20 | = Use at your own risk. | ||
21 | |||
22 | --> | ||
23 | |||
24 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
25 | <Fragment> | ||
26 | <WixVariable Id="WixUISupportPerUser" Value="1" Overridable="yes" /> | ||
27 | <WixVariable Id="WixUISupportPerMachine" Value="1" Overridable="yes" /> | ||
28 | |||
29 | <PropertyRef Id="ApplicationFolderName" /> | ||
30 | |||
31 | <CustomAction Id="WixSetDefaultPerUserFolder" Property="WixPerUserFolder" Value="[LocalAppDataFolder]Apps\[ApplicationFolderName]" Execute="immediate" /> | ||
32 | <CustomAction Id="WixSetDefaultPerMachineFolder" Property="WixPerMachineFolder" Value="[ProgramFilesFolder][ApplicationFolderName]" Execute="immediate" /> | ||
33 | <CustomAction Id="WixSetPerUserFolder" Property="APPLICATIONFOLDER" Value="[WixPerUserFolder]" Execute="immediate" /> | ||
34 | <CustomAction Id="WixSetPerMachineFolder" Property="APPLICATIONFOLDER" Value="[WixPerMachineFolder]" Execute="immediate" /> | ||
35 | |||
36 | <InstallExecuteSequence> | ||
37 | <Custom Action="WixSetDefaultPerUserFolder" Before="CostFinalize" /> | ||
38 | <Custom Action="WixSetDefaultPerMachineFolder" After="WixSetDefaultPerUserFolder" /> | ||
39 | <Custom Action="WixSetPerUserFolder" After="WixSetDefaultPerMachineFolder" Condition="ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged)))" /> | ||
40 | <Custom Action="WixSetPerMachineFolder" After="WixSetPerUserFolder" Condition="ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS=1 OR (ALLUSERS=2 AND Privileged))" /> | ||
41 | </InstallExecuteSequence> | ||
42 | <InstallUISequence> | ||
43 | <Custom Action="WixSetDefaultPerUserFolder" Before="CostFinalize" /> | ||
44 | <Custom Action="WixSetDefaultPerMachineFolder" After="WixSetDefaultPerUserFolder" /> | ||
45 | <Custom Action="WixSetPerUserFolder" After="WixSetDefaultPerMachineFolder" Condition="ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged)))" /> | ||
46 | <Custom Action="WixSetPerMachineFolder" After="WixSetPerUserFolder" Condition="ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS=1 OR (ALLUSERS=2 AND Privileged))" /> | ||
47 | </InstallUISequence> | ||
48 | |||
49 | <UI Id="WixUI_Advanced"> | ||
50 | <TextStyle Id="WixUI_Font_Normal" FaceName="!(loc.Advanced_Font_FaceName)" Size="!(loc.Advanced_Font_Normal_Size)" /> | ||
51 | <TextStyle Id="WixUI_Font_Bigger" FaceName="!(loc.Advanced_Font_FaceName)" Size="!(loc.Advanced_Font_Bigger_Size)" /> | ||
52 | <TextStyle Id="WixUI_Font_Title" FaceName="!(loc.Advanced_Font_FaceName)" Size="!(loc.Advanced_Font_Title_Size)" Bold="yes" /> | ||
53 | <TextStyle Id="WixUI_Font_Emphasized" FaceName="!(loc.Advanced_Font_FaceName)" Size="!(loc.Advanced_Font_Emphasized_Size)" Bold="yes" /> | ||
54 | |||
55 | <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" /> | ||
56 | <Property Id="WixUI_Mode" Value="Advanced" /> | ||
57 | |||
58 | <DialogRef Id="BrowseDlg" /> | ||
59 | <DialogRef Id="DiskCostDlg" /> | ||
60 | <DialogRef Id="ErrorDlg" /> | ||
61 | <DialogRef Id="FatalError" /> | ||
62 | <DialogRef Id="FilesInUse" /> | ||
63 | <DialogRef Id="MsiRMFilesInUse" /> | ||
64 | <DialogRef Id="PrepareDlg" /> | ||
65 | <DialogRef Id="ProgressDlg" /> | ||
66 | <DialogRef Id="ResumeDlg" /> | ||
67 | <DialogRef Id="UserExit" /> | ||
68 | <DialogRef Id="WelcomeDlg" /> | ||
69 | |||
70 | <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" /> | ||
71 | <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="1" /> | ||
72 | <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="2" Condition="WIXUI_INSTALLDIR_VALID<>"1"" /> | ||
73 | |||
74 | <Publish Dialog="AdvancedWelcomeEulaDlg" Control="Advanced" Event="NewDialog" Value="InstallScopeDlg" Order="1" Condition="!(wix.WixUISupportPerMachine) AND !(wix.WixUISupportPerUser)" /> | ||
75 | <Publish Dialog="AdvancedWelcomeEulaDlg" Control="Advanced" Event="NewDialog" Value="FeaturesDlg" Order="2" Condition="NOT !(wix.WixUISupportPerMachine)" /> | ||
76 | <Publish Dialog="AdvancedWelcomeEulaDlg" Control="Advanced" Event="NewDialog" Value="InstallDirDlg" Order="3" Condition="!(wix.WixUISupportPerMachine) AND NOT !(wix.WixUISupportPerUser)" /> | ||
77 | |||
78 | <Publish Dialog="InstallScopeDlg" Control="Back" Event="NewDialog" Value="AdvancedWelcomeEulaDlg" /> | ||
79 | <!-- override default WixAppFolder of WixPerMachineFolder as standard user won't be shown the radio group to set WixAppFolder --> | ||
80 | <Publish Dialog="InstallScopeDlg" Control="Next" Property="WixAppFolder" Value="WixPerUserFolder" Order="1" Condition="!(wix.WixUISupportPerUser) AND NOT Privileged" /> | ||
81 | <Publish Dialog="InstallScopeDlg" Control="Next" Property="ALLUSERS" Value="{}" Order="2" Condition="WixAppFolder = "WixPerUserFolder"" /> | ||
82 | <Publish Dialog="InstallScopeDlg" Control="Next" Property="ALLUSERS" Value="1" Order="3" Condition="WixAppFolder = "WixPerMachineFolder"" /> | ||
83 | <Publish Dialog="InstallScopeDlg" Control="Next" Property="APPLICATIONFOLDER" Value="[WixPerUserFolder]" Order="4" Condition="WixAppFolder = "WixPerUserFolder"" /> | ||
84 | <Publish Dialog="InstallScopeDlg" Control="Next" Property="APPLICATIONFOLDER" Value="[WixPerMachineFolder]" Order="5" Condition="WixAppFolder = "WixPerMachineFolder"" /> | ||
85 | <Publish Dialog="InstallScopeDlg" Control="Next" Event="NewDialog" Value="FeaturesDlg" Order="6" Condition="WixAppFolder = "WixPerUserFolder"" /> | ||
86 | <Publish Dialog="InstallScopeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Order="7" Condition="WixAppFolder = "WixPerMachineFolder"" /> | ||
87 | |||
88 | <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="InstallScopeDlg" Condition="!(wix.WixUISupportPerUser)" /> | ||
89 | <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="AdvancedWelcomeEulaDlg" Condition="NOT !(wix.WixUISupportPerUser)" /> | ||
90 | <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1" /> | ||
91 | <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2" Condition="NOT WIXUI_DONTVALIDATEPATH" /> | ||
92 | <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3" Condition="NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"" /> | ||
93 | <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="FeaturesDlg" Order="4" Condition="WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"" /> | ||
94 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1" /> | ||
95 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2" /> | ||
96 | |||
97 | <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="InstallScopeDlg" Condition="NOT Installed AND WixAppFolder = "WixPerUserFolder"" /> | ||
98 | <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Condition="NOT Installed AND WixAppFolder = "WixPerMachineFolder"" /> | ||
99 | <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Condition="Installed" /> | ||
100 | |||
101 | <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg" /> | ||
102 | |||
103 | <Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" Event="NewDialog" Value="FeaturesDlg" /> | ||
104 | <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg" /> | ||
105 | <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg" /> | ||
106 | <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg" /> | ||
107 | |||
108 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2" Condition="Installed AND NOT PATCH" /> | ||
109 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3" Condition="Installed AND PATCH" /> | ||
110 | |||
111 | <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Condition="Installed AND PATCH" /> | ||
112 | </UI> | ||
113 | |||
114 | <InstallUISequence> | ||
115 | <Show Dialog="WelcomeDlg" Before="AdvancedWelcomeEulaDlg" Condition="Installed AND PATCH" /> | ||
116 | </InstallUISequence> | ||
117 | |||
118 | <Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONFOLDER" /> | ||
119 | <UIRef Id="WixUI_Common" /> | ||
120 | </Fragment> | ||
121 | </Wix> | ||