summaryrefslogtreecommitdiff
path: root/src/mongo/installer/msi/wxs/UIFragment.wxs
blob: 6775c80cb7835a22f980ba38f6c44c2603d5db25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"  xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
    <Fragment>
        <UI Id="MongoWixUI">
            <!-- Base our MSI on the FeatureTree based Wix set, and add our custom dialog boxes -->
            <UIRef Id="WixUI_FeatureTree" />

            <Publish Event="NewDialog" Value="MongoSetupTypeDlg" Dialog="LicenseAgreementDlg" Control="Next">LicenseAccepted = "1"</Publish>
            <Publish Event="NewDialog" Value="MongoSetupTypeDlg" Dialog="CustomizeDlg" Control="Back">WixUI_InstallMode = "InstallCustom"</Publish>
            <Publish Event="NewDialog" Value="ServiceDlg" Dialog="CustomizeDlg" Control="Next">
                <![CDATA[&Server = 3]]>
            </Publish>
            <Publish Event="NewDialog" Value="CompassDlg" Dialog="CustomizeDlg" Control="Next">
                <![CDATA[NOT (&Server = 3)]]>
            </Publish>

            <!-- A custom setup type dialog box with only Complete and Custom buttons -->
            <Dialog Id="MongoSetupTypeDlg" X="50" Y="50" Width="370" Height="270" Title="[ProductName] Setup">
                <Control Id="CompleteButton" Type="PushButton" X="40" Y="65" Width="80" Height="17" Text="C&amp;omplete" ToolTip="Complete Installation" TabSkip="no" Default="yes">
                    <Publish Property="WixUI_InstallMode" Value="InstallComplete">1</Publish>
                    <Publish Event="NewDialog" Value="ServiceDlg">1</Publish>
                    <Publish Event="SetInstallLevel" Value="1000">1</Publish>
                </Control>
                <Control Id="CustomButton" Type="PushButton" X="40" Y="118" Width="80" Height="17" Text="C&amp;ustom" ToolTip="Custom Installation" TabSkip="no">
                    <Publish Property="WixUI_InstallMode" Value="InstallCustom">1</Publish>
                    <Publish Event="NewDialog" Value="CustomizeDlg">1</Publish>
                </Control>
                <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="&amp;Back" TabSkip="no">
                    <Publish Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
                </Control>
                <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Text="&amp;Next" TabSkip="no" Disabled="yes" />
                <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Text="Cancel" TabSkip="no" Cancel="yes">
                    <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
                </Control>
                <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" Text="WixUI_Bmp_Banner" TabSkip="no" Disabled="yes" />
                <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Text="Choose the setup type that best suits your needs" TabSkip="yes" Transparent="yes" NoPrefix="yes" />
                <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Text="{\WixUI_Font_Title}Choose Setup Type" TabSkip="yes" Transparent="yes" NoPrefix="yes" />
                <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" TabSkip="yes" Disabled="yes" />
                <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" TabSkip="yes" Disabled="yes" />
                <Control Id="TypicalText" Type="Text" X="60" Y="85" Width="280" Height="20" Text="All program features will be installed. Requires the most disk space. Recommended for most users." TabSkip="yes" />
                <Control Id="CustomText" Type="Text" X="60" Y="138" Width="280" Height="30" Text="Allows users to choose which program features will be installed and where they will be installed. Recommended for advanced users." TabSkip="yes" />
            </Dialog>

            <!-- A custom dialog box to warn the user about an invalid service logon. -->
            <Dialog Id="InvalidServiceAccount" Width="260" Height="85" Title="[ProductName] Error" NoMinimize="yes">
                <Control Id="Icon" Type="Icon" X="15" Y="15" Width="24" Height="24" ToolTip="Information icon" FixedSize="yes" IconSize="32" Text="MongoDBIconBinary" />
                <Control Id="Return" Type="PushButton" X="100" Y="57" Width="56" Height="17" Default="yes" Cancel="yes" Text="&amp;Return">
                    <Publish Event="EndDialog" Value="Return">1</Publish>
                </Control>
                <Control Id="Text" Type="Text" X="48" Y="15" Width="194" Height="30" TabSkip="no">
                    <Text>The domain, user name and/or password are incorrect. Remember to use "." for the domain if the account is on the local machine.</Text>
                </Control>
            </Dialog>

            <!-- A custom dialog box to configure a Windows service -->
            <Dialog Id="ServiceDlg" X="50" Y="50" Width="370" Height="270" Title="[ProductName] Service Customization">
                <Control Id="textTitle" Type="Text" X="8" Y="8" Width="122" Height="15" TabSkip="yes" Transparent="yes">
                    <Text>{\WixUI_Font_Title}Service Configuration</Text>
                </Control>
                <Control Id="textDescription" Type="Text" X="23" Y="23" Width="345" Height="10" TabSkip="yes" Transparent="yes">
                    <Text>Specify optional settings to configure MongoDB as a service.</Text>
                </Control>
                <Control Id="lineTopDivider" Type="Line" X="0" Y="44" Width="370" Height="2" />
                <Control Id="lineBottomDivider" Type="Line" X="0" Y="234" Width="370" Height="2" />
                <Control Id="Back" Type="PushButton" X="189" Y="244" Width="56" Height="17" TabSkip="no">
                    <Text>&lt; &amp;Back</Text>
                    <Publish Event="NewDialog" Value="MongoSetupTypeDlg" Order="1">WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete"</Publish>
                    <Publish Event="NewDialog" Value="CustomizeDlg" Order="2">WixUI_InstallMode = "InstallCustom"</Publish>
                </Control>
                <Control Id="Next" Type="PushButton" X="244" Y="244" Width="56" Height="17" TabSkip="no">
                    <Text>&amp;Next &gt;</Text>
                    <Publish Event="AddLocal" Value="ServerNoService">NOT MONGO_SERVICE_INSTALL</Publish>
                    <Publish Event="AddLocal" Value="ServerService">MONGO_SERVICE_INSTALL</Publish>
                    <Publish Property="MONGO_SERVICE_ACCOUNT_VALID" Value="1" Order="1"><![CDATA[MONGO_SERVICE_ACCOUNT_TYPE ~= "ServiceLocalNetwork"]]></Publish>
                    <Publish Event="DoAction" Value="ValidateServiceLogon" Order="2"><![CDATA[MONGO_SERVICE_INSTALL AND MONGO_SERVICE_ACCOUNT_TYPE <> "ServiceLocalNetwork"]]></Publish>
                    <Publish Event="SpawnDialog" Value="InvalidServiceAccount" Order="3">MONGO_SERVICE_ACCOUNT_VALID = "0"</Publish>
                    <Publish Event="NewDialog" Value="CompassDlg" Order="3">NOT MONGO_SERVICE_INSTALL OR (MONGO_SERVICE_ACCOUNT_TYPE = "ServiceLocalNetwork" OR MONGO_SERVICE_ACCOUNT_VALID)</Publish>
                </Control>
                <Control Id="Cancel" Type="PushButton" X="309" Y="244" Width="56" Height="17" TabSkip="no">
                    <Text>Cancel</Text>
                    <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
                </Control>
                <Control Id="CheckBox1" Type="CheckBox" X="8" Y="48" Width="132" Height="18"  Property="MONGO_SERVICE_INSTALL" CheckBoxValue="TRUE" TabSkip="no">
                    <Text>Install MongoD as a Service</Text>
                </Control>
                <Control Id="RadioButtonGroup1" Type="RadioButtonGroup" Property="MONGO_SERVICE_ACCOUNT_TYPE" X="20" Y="62" Width="190" Height="44">
                    <RadioButtonGroup Property="MONGO_SERVICE_ACCOUNT_TYPE">
                        <RadioButton X="0" Y="2" Width="184" Height="18" Value="ServiceLocalNetwork" Text="Run service as Network Service user" />
                        <RadioButton X="0" Y="18" Width="184" Height="18" Value="ServiceCustomAccount" Text="Run service as a local or domain user:" />
                    </RadioButtonGroup>
                    <Condition Action="disable">NOT MONGO_SERVICE_INSTALL</Condition>
                    <Condition Action="enable">MONGO_SERVICE_INSTALL</Condition>
                </Control>
                <Control Id="textAccountName" Type="Text" X="38" Y="116" Width="76" Height="15" TabSkip="yes">
                    <Text>Account Name:</Text>
                    <Condition Action="disable">NOT MONGO_SERVICE_INSTALL OR MONGO_SERVICE_ACCOUNT_TYPE = "ServiceLocalNetwork"</Condition>
                    <Condition Action="enable"><![CDATA[MONGO_SERVICE_INSTALL AND MONGO_SERVICE_ACCOUNT_TYPE <> "ServiceLocalNetwork"]]></Condition>
                </Control>
                <Control Id="textAccountDomain" Type="Text" X="38" Y="98" Width="76" Height="15" TabSkip="yes">
                    <Text>Account Domain:</Text>
                    <Condition Action="disable">NOT MONGO_SERVICE_INSTALL OR MONGO_SERVICE_ACCOUNT_TYPE = "ServiceLocalNetwork"</Condition>
                    <Condition Action="enable"><![CDATA[MONGO_SERVICE_INSTALL AND MONGO_SERVICE_ACCOUNT_TYPE <> "ServiceLocalNetwork"]]></Condition>
                </Control>
                <Control Id="textAccountPassword" Type="Text" X="38" Y="134" Width="76" Height="15" TabSkip="yes">
                    <Text>Account Password:</Text>
                    <Condition Action="disable">NOT MONGO_SERVICE_INSTALL OR MONGO_SERVICE_ACCOUNT_TYPE = "ServiceLocalNetwork"</Condition>
                    <Condition Action="enable"><![CDATA[MONGO_SERVICE_INSTALL AND MONGO_SERVICE_ACCOUNT_TYPE <> "ServiceLocalNetwork"]]></Condition>
                </Control>
                <Control Id="editAccountDomain" Type="Edit" X="124" Y="98" Width="101" Height="15" TabSkip="no" Property="MONGO_SERVICE_ACCOUNT_DOMAIN">
                    <Text>{32767}</Text>
                    <Condition Action="disable">NOT MONGO_SERVICE_INSTALL OR MONGO_SERVICE_ACCOUNT_TYPE = "ServiceLocalNetwork"</Condition>
                    <Condition Action="enable"><![CDATA[MONGO_SERVICE_INSTALL AND MONGO_SERVICE_ACCOUNT_TYPE <> "ServiceLocalNetwork"]]></Condition>
                </Control>
                <Control Id="editAccountName" Type="Edit" X="124" Y="116" Width="101" Height="15" TabSkip="no" Property="MONGO_SERVICE_ACCOUNT_NAME">
                    <Text>{32767}</Text>
                    <Condition Action="disable">NOT MONGO_SERVICE_INSTALL OR MONGO_SERVICE_ACCOUNT_TYPE = "ServiceLocalNetwork"</Condition>
                    <Condition Action="enable"><![CDATA[MONGO_SERVICE_INSTALL AND MONGO_SERVICE_ACCOUNT_TYPE <> "ServiceLocalNetwork"]]></Condition>
                </Control>
                <Control Id="editAccountPassword" Type="Edit" X="124" Y="134" Width="101" Height="15" TabSkip="no" Password="yes" Property="MONGO_SERVICE_ACCOUNT_PASSWORD">
                    <Text>{32767}</Text>
                    <Condition Action="disable">NOT MONGO_SERVICE_INSTALL OR MONGO_SERVICE_ACCOUNT_TYPE = "ServiceLocalNetwork"</Condition>
                    <Condition Action="enable"><![CDATA[MONGO_SERVICE_INSTALL AND MONGO_SERVICE_ACCOUNT_TYPE <> "ServiceLocalNetwork"]]></Condition>
                </Control>
                <Control Id="textServiceName" Type="Text" X="23" Y="161" Width="62" Height="15" TabSkip="yes">
                    <Text>Service Name:</Text>
                    <Condition Action="disable">NOT MONGO_SERVICE_INSTALL</Condition>
                    <Condition Action="enable">MONGO_SERVICE_INSTALL</Condition>
                </Control>
                <Control Id="editServiceName" Type="Edit" X="98" Y="161" Width="105" Height="15" TabSkip="no" Property="MONGO_SERVICE_NAME">
                    <Condition Action="disable">NOT MONGO_SERVICE_INSTALL</Condition>
                    <Condition Action="enable">MONGO_SERVICE_INSTALL</Condition>
                </Control>
                <Control Id="textDataDirectory" Type="Text" X="23" Y="188" Width="64" Height="15" TabSkip="yes">
                    <Text>Data Directory:</Text>
                    <Condition Action="disable">NOT MONGO_SERVICE_INSTALL</Condition>
                    <Condition Action="enable">MONGO_SERVICE_INSTALL</Condition>
                </Control>
                <Control Id="textLogDirectory" Type="Text" X="23" Y="210" Width="62" Height="15" TabSkip="yes">
                    <Text>Log Directory:</Text>
                    <Condition Action="disable">NOT MONGO_SERVICE_INSTALL</Condition>
                    <Condition Action="enable">MONGO_SERVICE_INSTALL</Condition>
                </Control>
                <Control Id="editDataDirectory" Type="Edit" X="98" Y="188" Width="237" Height="15" TabSkip="no" Property="MONGO_DATA_PATH">
                    <Text>{32767}</Text>
                    <Condition Action="disable">NOT MONGO_SERVICE_INSTALL</Condition>
                    <Condition Action="enable">MONGO_SERVICE_INSTALL</Condition>
                </Control>
                <Control Id="editLogDirectory" Type="Edit" X="98" Y="210" Width="238" Height="15" TabSkip="no" Property="MONGO_LOG_PATH">
                    <Text>{32767}</Text>
                    <Condition Action="disable">NOT MONGO_SERVICE_INSTALL</Condition>
                    <Condition Action="enable">MONGO_SERVICE_INSTALL</Condition>
                </Control>
        </Dialog>

            <!-- A dialog box to choose to optionally install Compass -->
            <Dialog Id="CompassDlg" X="50" Y="50" Width="370" Height="270" Title="MongoDB Compass">
                <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" Text="WixUI_Bmp_Banner" TabSkip="no" Disabled="yes" />
                <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" TabSkip="yes" Disabled="yes" />
                <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" TabSkip="yes" Disabled="yes" />
                <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Text="{\WixUI_Font_Title}Install MongoDB Compass" TabSkip="yes" Transparent="yes" NoPrefix="yes" />
                <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Text="MongoDB Compass is the official graphical user interface for MongoDB." TabSkip="yes" Transparent="yes" NoPrefix="yes" />
                <Control Id="LongDescription" Type="Text" X="25" Y="50"
                         Width="280" Height="30" Text="By checking below this installer will automatically download and install the latest version of MongoDB Compass on this machine. You can learn more about MongoDB Compass here: https://www.mongodb.com/products/compass" TabSkip="yes" NoPrefix="yes" />

                <Control Id="InstallCompass" CheckBoxValue="1" Property="SHOULD_INSTALL_COMPASS" X="15" Y="243" Width="150" Height="17" Text="Install MongoDB Compass" Type="CheckBox" />

                <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="&amp;Back" TabSkip="no">
                    <Publish Event="NewDialog" Value="ServiceDlg">
                        <![CDATA[&Server = 3]]>
                    </Publish>
                    <Publish Event="NewDialog" Value="MongoSetupTypeDlg">
                        <![CDATA[
                            NOT (&Server = 3) AND (WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete")
                        ]]>
                    </Publish>
                    <Publish Event="NewDialog" Value="CustomizeDlg" Order="2">
                        <![CDATA[
                            NOT (&Server = 3) AND WixUI_InstallMode = "InstallCustom"
                        ]]>
                    </Publish>
                </Control>
                <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Text="&amp;Next" TabSkip="no" Disabled="no" >
                    <Publish Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
                </Control>
                <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Text="Cancel" TabSkip="no" Cancel="yes">
                    <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
                </Control>
            </Dialog>

            <ProgressText Action="InstallCompassScript">Installing MongoDB Compass... (this may take a few minutes)</ProgressText>

        </UI>
    </Fragment>
</Wix>