@@ -0,0 +1,142 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<?if $(sys.BUILDARCH)=x64?>
3+<?define ProgFilesFolder="ProgramFiles64Folder"?>
4+<?else?>
5+<?define ProgFilesFolder="ProgramFilesFolder"?>
6+<?endif?>
7+<!--
8+ <copyright file="WixUI_Advanced_Custom.wxs" company="Outercurve Foundation">
9+ Copyright (c) 2004, Outercurve Foundation.
10+ This software is released under Microsoft Reciprocal License (MS-RL).
11+ The license and further copyright text can be found in the file
12+ LICENSE.TXT at the root directory of the distribution.
13+ </copyright>
14+-->
15+
16+<!--
17+WixUI_Advanced_Custom offers a two-click install (EULA checkbox and Install button)
18+and offers an Advanced button that lets users choose per-machine or per-user
19+installs, install path, and features.
20+
21+WiX variables used:
22+ - WixUISupportPerMachine
23+ - WixUISupportPerUser
24+
25+Todo:
26+ - Clicking Install doesn't work! - APPLICATIONFOLDER isn't set; need to accept another "incoming" property.
27+ - Replace this dialog set UI fragment with the UI extension.
28+ = This set is still in active development.
29+ = Future releases are likely to be incompatible.
30+ = Future releases are likely to be much easier to use.
31+ = Use at your own risk.
32+
33+-->
34+
35+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
36+ <Fragment>
37+ <WixVariable Id="WixUISupportPerUser" Value="1" Overridable="yes" />
38+ <WixVariable Id="WixUISupportPerMachine" Value="1" Overridable="yes" />
39+
40+ <PropertyRef Id="ApplicationFolderName" />
41+
42+ <CustomAction Id="WixSetDefaultPerUserFolder2" Property="WixPerUserFolder" Value="[LocalAppDataFolder][ApplicationFolderName]" Execute="immediate" />
43+ <CustomAction Id="WixSetDefaultPerMachineFolder2" Property="WixPerMachineFolder" Value="[$(var.ProgFilesFolder)][ApplicationFolderName]" Execute="immediate" />
44+ <CustomAction Id="WixSetPerUserFolder2" Property="APPLICATIONFOLDER" Value="[WixPerUserFolder]" Execute="immediate" />
45+ <CustomAction Id="WixSetPerMachineFolder2" Property="APPLICATIONFOLDER" Value="[WixPerMachineFolder]" Execute="immediate" />
46+
47+ <InstallExecuteSequence>
48+ <Custom Action="WixSetDefaultPerUserFolder2" Before="CostFinalize" />
49+ <Custom Action="WixSetDefaultPerMachineFolder2" After="WixSetDefaultPerUserFolder2" />
50+ <Custom Action="WixSetPerUserFolder2" After="WixSetDefaultPerMachineFolder2">ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged)))</Custom>
51+ <Custom Action="WixSetPerMachineFolder2" After="WixSetPerUserFolder2">ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS=1 OR (ALLUSERS=2 AND Privileged))</Custom>
52+ </InstallExecuteSequence>
53+ <InstallUISequence>
54+ <Custom Action="WixSetDefaultPerUserFolder2" Before="CostFinalize" />
55+ <Custom Action="WixSetDefaultPerMachineFolder2" After="WixSetDefaultPerUserFolder2" />
56+ <Custom Action="WixSetPerUserFolder2" After="WixSetDefaultPerMachineFolder2">ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged)))</Custom>
57+ <Custom Action="WixSetPerMachineFolder2" After="WixSetPerUserFolder2">ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS=1 OR (ALLUSERS=2 AND Privileged))</Custom>
58+ </InstallUISequence>
59+
60+ <UI Id="WixUI_Advanced_Custom">
61+ <TextStyle Id="WixUI_Font_Normal" FaceName="!(loc.Advanced_Font_FaceName)" Size="!(loc.Advanced_Font_Normal_Size)" />
62+ <TextStyle Id="WixUI_Font_Bigger" FaceName="!(loc.Advanced_Font_FaceName)" Size="!(loc.Advanced_Font_Bigger_Size)" />
63+ <TextStyle Id="WixUI_Font_Title" FaceName="!(loc.Advanced_Font_FaceName)" Size="!(loc.Advanced_Font_Title_Size)" Bold="yes" />
64+ <TextStyle Id="WixUI_Font_Emphasized" FaceName="!(loc.Advanced_Font_FaceName)" Size="!(loc.Advanced_Font_Emphasized_Size)" Bold="yes" />
65+
66+ <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
67+ <Property Id="WixUI_Mode" Value="Advanced" />
68+
69+ <DialogRef Id="BrowseDlg" />
70+ <DialogRef Id="DiskCostDlg" />
71+ <DialogRef Id="ErrorDlg" />
72+ <DialogRef Id="FatalError" />
73+ <DialogRef Id="FilesInUse" />
74+ <DialogRef Id="MsiRMFilesInUse" />
75+ <DialogRef Id="PrepareDlg" />
76+ <DialogRef Id="ProgressDlg" />
77+ <DialogRef Id="ResumeDlg" />
78+ <DialogRef Id="UserExit" />
79+ <DialogRef Id="WelcomeDlg"/>
80+
81+ <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
82+
83+ <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="1">1</Publish>
84+ <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="2"><![CDATA[WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
85+
86+ <!--<Publish Dialog="AdvancedWelcomeEulaDlg_Custom" Control="Advanced" Event="NewDialog" Value="InstallScopeDlg" Order="1">!(wix.WixUISupportPerMachine) AND !(wix.WixUISupportPerUser)</Publish>-->
87+ <!--<Publish Dialog="AdvancedWelcomeEulaDlg_Custom" Control="Advanced" Event="NewDialog" Value="FeaturesDlg" Order="2">NOT !(wix.WixUISupportPerMachine)</Publish>-->
88+ <!--<Publish Dialog="AdvancedWelcomeEulaDlg_Custom" Control="Advanced" Event="NewDialog" Value="InstallDirDlg" Order="3">!(wix.WixUISupportPerMachine) AND NOT !(wix.WixUISupportPerUser)</Publish>-->
89+
90+ <Publish Dialog="AdvancedWelcomeEulaDlg_Custom" Control="Advanced" Property="WixAppFolder" Value="WixPerMachineFolder" Order="1">ALLUSERS = 1</Publish>
91+ <Publish Dialog="AdvancedWelcomeEulaDlg_Custom" Control="Advanced" Property="APPLICATIONFOLDER" Value="[$(var.ProgFilesFolder)][ApplicationFolderName]" Order="2">ALLUSERS = 1</Publish>
92+ <Publish Dialog="AdvancedWelcomeEulaDlg_Custom" Control="Advanced" Event="NewDialog" Value="InstallDirDlg" Order="3">!(wix.WixUISupportPerMachine) AND !(wix.WixUISupportPerUser)</Publish>
93+
94+ <Publish Dialog="AdvancedWelcomeEulaDlg_Custom" Control="AllUsersCheckBox" Property="WixAppFolder" Value="WixPerMachineFolder" Order="1">ALLUSERS = 1</Publish>
95+ <Publish Dialog="AdvancedWelcomeEulaDlg_Custom" Control="AllUsersCheckBox" Property="APPLICATIONFOLDER" Value="[$(var.ProgFilesFolder)][ApplicationFolderName]" Order="2">ALLUSERS = 1</Publish>
96+
97+ <Publish Dialog="AdvancedWelcomeEulaDlg_Custom" Control="AllUsersCheckBox" Property="WixAppFolder" Value="WixPerUserFolder" Order="1">NOT (ALLUSERS = 1)</Publish>
98+ <Publish Dialog="AdvancedWelcomeEulaDlg_Custom" Control="AllUsersCheckBox" Property="APPLICATIONFOLDER" Value="[LocalAppDataFolder][ApplicationFolderName]" Order="2">NOT (ALLUSERS = 1)</Publish>
99+
100+ <!--<Publish Dialog="InstallScopeDlg" Control="Back" Event="NewDialog" Value="AdvancedWelcomeEulaDlg_Custom">1</Publish>-->
101+ <!-- override default WixAppFolder of WixPerMachineFolder as standard user won't be shown the radio group to set WixAppFolder -->
102+
103+ <!--<Publish Dialog="InstallScopeDlg" Control="Next" Property="WixAppFolder" Value="WixPerUserFolder" Order="1">!(wix.WixUISupportPerUser) AND NOT Privileged</Publish>-->
104+
105+
106+
107+ <!--<Publish Dialog="InstallScopeDlg" Control="Next" Event="NewDialog" Value="FeaturesDlg" Order="6">WixAppFolder = "WixPerUserFolder"</Publish>
108+ <Publish Dialog="InstallScopeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Order="7">WixAppFolder = "WixPerMachineFolder"</Publish>-->
109+
110+ <!--<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="InstallScopeDlg">!(wix.WixUISupportPerUser)</Publish>-->
111+ <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="AdvancedWelcomeEulaDlg_Custom">1</Publish>
112+ <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
113+ <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish>
114+ <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
115+ <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
116+ <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
117+ <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
118+
119+ <!--<Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="InstallScopeDlg">NOT Installed AND WixAppFolder = "WixPerUserFolder"</Publish>-->
120+ <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg">NOT Installed AND WixAppFolder = "WixPerMachineFolder"</Publish>
121+ <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg">Installed</Publish>
122+
123+ <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
124+
125+ <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
126+ <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
127+ <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
128+
129+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish>
130+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3">Installed AND PATCH</Publish>
131+
132+ <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
133+ </UI>
134+
135+ <InstallUISequence>
136+ <Show Dialog="WelcomeDlg" Before="AdvancedWelcomeEulaDlg_Custom" >Installed AND PATCH</Show>
137+ </InstallUISequence>
138+
139+ <Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONFOLDER" />
140+ <UIRef Id="WixUI_Common" />
141+ </Fragment>
142+</Wix>