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