~ubuntu-branches/ubuntu/utopic/mariadb-5.5/utopic-security

« back to all changes in this revision

Viewing changes to win/packaging/custom_ui.wxs

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2015-06-13 21:09:48 UTC
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: package-import@ubuntu.com-20150613210948-0un6au1f6ujj37lv
Tags: upstream-5.5.44
Import upstream version 5.5.44

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="UTF-8"?>
2
 
 
3
 
 
4
 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
5
 
  <Fragment>
6
 
    <Property Id="PortTemplate" Value="####" />
7
 
    <Property Id="PORT" Value="3306"></Property>
8
 
    <Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable"/>
9
 
    <Property Id="CREATEDBINSTANCE"><![CDATA[&DBInstance=3 AND NOT !DBInstance=3]]></Property>
10
 
    <UI>
11
 
      <Dialog Id="DatabaseCreationDlg" Width="370" Height="270" Title="[ProductName] Setup" NoMinimize="yes">
12
 
        <Control Id="ServiceNameLabel" Type="Text" X="20" Y="73" Width="70" Height="15" TabSkip="no" Text="Service Name:" />
13
 
        <Control Id="ServiceName" Type="Edit" X="90" Y="73" Width="120" Height="15" Property="SERVICENAME" Text="{20}" />
14
 
 
15
 
        <Control Id="RootPasswordLabel" Type="Text" X="20" Y="90" Width="120" Height="15" TabSkip="no" Text="&amp;Root password:" />
16
 
        <Control Id="RootPassword" Type="Edit"  X="20" Y="105" Width="120" Height="18" Property="ROOT_PASSWORD" Password="yes" Text="{20}" />
17
 
 
18
 
        <Control Id="RootPasswordConfirmLabel" Type="Text" X="150" Y="90" Width="150" Height="15" TabSkip="no" Text="&amp;Confirm Root password:" />
19
 
        <Control Id="RootPasswordConfirm" Type="Edit" X="150" Y="105" Width="120" Height="18" Property="ROOT_PASSWORD_CONFIRM" Password="yes" Text="{20}" />
20
 
        <Control Id="BannerLine0" Type="Line" X="0" Y="128" Width="370" Height="0" />
21
 
 
22
 
        <Control Id="PortLabel" Type="Text" X="20" Y="137" Width="40" Height="15" TabSkip="no" Text="TCP port:"  />
23
 
 
24
 
        <Control Id="Port" Type="MaskedEdit" X="60" Y="136" Width="30" Height="15"  Property="PORT" Text="[PortTemplate]"/>
25
 
        <!--<Control Id="FirewallExceptionCheckBox" Type="CheckBox" X="150" Y="136" Height="15" Property="FIREWALL_EXCEPTION" Width="200" CheckBoxValue="1"
26
 
                 Text="Create Firewall exception for this port"/>-->
27
 
 
28
 
        <Control Id="BannerLine2" Type="Line" X="0" Y="155" Width="370" Height="0" />
29
 
 
30
 
        <Control Id="FolderLabel" Type="Text" X="20" Y="181" Width="100" Height="15" TabSkip="no" Text="Database location:"  />
31
 
        <Control Id="Folder" Type="PathEdit" X="20" Y="204" Width="200" Height="18" Property="DATABASELOCATION" Indirect="no" />
32
 
 
33
 
        <!-- Navigation buttons-->
34
 
        <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="&amp;Back">
35
 
          <Publish Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
36
 
        </Control>
37
 
        <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="&amp;Next">
38
 
          <!--
39
 
          <Publish Event="ValidateProductID" Value="0">1</Publish>
40
 
          <Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">CostingComplete = 1</Publish>
41
 
          -->
42
 
          <!--<Publish Event="NewDialog" Value="SetupTypeDlg">ProductID</Publish>-->
43
 
        </Control>
44
 
        <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel">
45
 
          <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
46
 
        </Control>
47
 
        <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="WixUI_Bmp_Banner" />
48
 
        <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes">
49
 
          <Text>Create default [ProductName] instance</Text>
50
 
        </Control>
51
 
        <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
52
 
        <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes">
53
 
          <Text>{\WixUI_Font_Title}Default instance properties</Text>
54
 
        </Control>
55
 
        <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
56
 
      </Dialog>
57
 
 
58
 
      <Dialog Id="ConfirmDataCleanupDlg" Width="370" Height="270" Title="[ProductName] Setup" NoMinimize="yes">
59
 
        <Control Id="ServiceRemoveText" Type="Text" X="20" Y="73" Width="300" Height="15" TabSkip="no">
60
 
          <Text>Service '[SERVICENAME]' will be removed</Text>
61
 
        </Control>
62
 
        <Control Id="CleanupDataCheckBox" Type="CheckBox" X="20" Y="100" Height="15" Property="CLEANUP_DATA" Width="15" CheckBoxValue="0"/>
63
 
        <Control Id="RemoveDataText" Type="Text" X="37" Y="101" Width="300" Height="200" TabSkip="no">
64
 
          <Text>Remove default database directory '[DATABASELOCATION]'</Text>
65
 
        </Control>
66
 
        
67
 
      <!-- Navigation buttons-->
68
 
      <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="&amp;Back">
69
 
        <Publish Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
70
 
      </Control>
71
 
      <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="&amp;Next">
72
 
        <Publish Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
73
 
      </Control>
74
 
      <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel">
75
 
        <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
76
 
      </Control>
77
 
      <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="WixUI_Bmp_Banner" />
78
 
      <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes">
79
 
        <Text>Remove default [ProductName] database</Text>
80
 
      </Control>
81
 
      <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
82
 
      <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes">
83
 
        <Text>{\WixUI_Font_Title}Default instance properties</Text>
84
 
      </Control>
85
 
        <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
86
 
      </Dialog>
87
 
    </UI>
88
 
    <UI Id="MyWixUI_Mondo">
89
 
      <UIRef Id="WixUI_FeatureTree" />
90
 
      <UIRef Id="WixUI_ErrorProgressText" />
91
 
      <DialogRef Id="DatabaseCreationDlg" />
92
 
      <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="DatabaseCreationDlg" Order="999"><![CDATA[&DBInstance=3 AND NOT !DBInstance=3]]></Publish>
93
 
      <Publish Dialog="DatabaseCreationDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="3">1</Publish>
94
 
      <Publish Dialog="DatabaseCreationDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="3">1</Publish>
95
 
      <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="DatabaseCreationDlg" Order="3" ><![CDATA[&DBInstance=3 AND NOT !DBInstance=3]]></Publish>
96
 
      <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ConfirmDataCleanupDlg" Order="3" ><![CDATA[(&DBInstance=2) AND (!DBInstance=3)]]></Publish>
97
 
      <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ConfirmDataCleanupDlg" Order="999"><![CDATA[(&DBInstance=2) AND (!DBInstance=3)]]></Publish>
98
 
      <Publish Dialog="ConfirmDataCleanupDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg">WixUI_InstallMode = "Change"</Publish>
99
 
      <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="ConfirmDataCleanupDlg" Order="999">!DBInstance=3</Publish>
100
 
      <Publish Dialog="ConfirmDataCleanupDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg">WixUI_InstallMode = "Remove"</Publish>
101
 
    </UI>
102
 
 
103
 
    <DirectoryRef Id='TARGETDIR'>
104
 
      <Directory Id="CommonAppDataFolder">
105
 
        <Directory Id="DatabasesRoot" Name="MariaDB">
106
 
          <Directory Id="DATABASELOCATION" Name="MariaDB Server 5.1">
107
 
          </Directory>
108
 
        </Directory>
109
 
      </Directory>
110
 
    </DirectoryRef>
111
 
 
112
 
    <Feature Id='DBInstance'
113
 
         Title='Database instance'
114
 
         Description='Install database instance'
115
 
         ConfigurableDirectory='DATABASELOCATION'
116
 
         AllowAdvertise='no'
117
 
         Level='1'>
118
 
      <Component Id="C.datadir" Guid="*" Directory="DATABASELOCATION">
119
 
        <RegistryValue Root='HKLM'
120
 
           Key='SOFTWARE\[Manufacturer]\[ProductName]'
121
 
           Name='DatabaseLocation' Value='[DATABASELOCATION]' Type='string' KeyPath='yes'/>
122
 
        <CreateFolder />
123
 
      </Component>
124
 
      <Component Id="C.service" Guid="*" Directory="DATABASELOCATION">
125
 
        <Condition>SERVICENAME</Condition>
126
 
        <RegistryValue Root='HKLM' 
127
 
           Key='SOFTWARE\[Manufacturer]\[ProductName]' 
128
 
           Name='ServiceName' Value='[SERVICENAME]' Type='string' KeyPath='yes'/>
129
 
        <ServiceControl Id='DBInstanceServiceStop' Name='[SERVICENAME]'  Stop='uninstall'  Wait='yes'></ServiceControl>
130
 
        <ServiceControl Id='DBInstanceServiceStart' Name='[SERVICENAME]' Start='install' Wait='no'></ServiceControl>
131
 
        <ServiceControl Id='DBInstanceServiceRemove' Name='[SERVICENAME]' Remove='uninstall'  Wait='yes'></ServiceControl>
132
 
      </Component>
133
 
   </Feature>
134
 
    
135
 
    <CustomAction Id="QtExecDeferredExampleWithProperty_Cmd" Property="QtExecDeferredExampleWithProperty"
136
 
            Value="&quot;[#F.bin.mysql_install_db.exe]&quot; &quot;--service=[SERVICENAME]&quot; &quot;--password=[ROOT_PASSWORD]&quot; &quot;--datadir=[DATABASELOCATION]&quot;"
137
 
            Execute="immediate"/>
138
 
    <CustomAction Id="QtExecDeferredExampleWithProperty" BinaryKey="WixCA" DllEntry="CAQuietExec"
139
 
            Execute="deferred" Return="check" Impersonate="no"/>
140
 
 
141
 
    <UI>
142
 
      <ProgressText Action="QtExecDeferredExampleWithProperty">Running mysql_install_db.exe</ProgressText>
143
 
    </UI>
144
 
 
145
 
    <!-- Use Wix toolset "remember property" pattern to store properties between major upgrades etc -->
146
 
    <InstallExecuteSequence>
147
 
      <Custom Action="QtExecDeferredExampleWithProperty_Cmd" After="CostFinalize"><![CDATA[&DBInstance=3 AND NOT !DBInstance=3]]></Custom>
148
 
      <Custom Action="QtExecDeferredExampleWithProperty" After="InstallFiles"><![CDATA[&DBInstance=3 AND NOT !DBInstance=3]]></Custom>
149
 
    </InstallExecuteSequence>
150
 
    
151
 
    <Property Id='SERVICENAME'>
152
 
    <RegistrySearch Id='ServiceNameProperty' Root='HKLM' 
153
 
                    Key='SOFTWARE\[Manufacturer]\[ProductName]'
154
 
                    Name='ServiceName' Type='raw' />
155
 
    </Property>
156
 
     <SetProperty After='AppSearch' Id="SERVICENAME" Value="MariaDB_51"><![CDATA[NOT SERVICENAME]]></SetProperty>
157
 
     <Property Id="DATABASELOCATION">
158
 
      <RegistrySearch Id='DatabaseLocationProperty' Root='HKLM'
159
 
                   Key='SOFTWARE\[Manufacturer]\[ProductName]'
160
 
                   Name='´DatabaseLocation' Type='raw' />
161
 
    </Property>
162
 
    <SetProperty After='AppSearch' Id="DATABASELOCATION" Value="[CommonAppDataFolder]\MariaDB\[ProductName]"><![CDATA[NOT DATABASELOCATION]]></SetProperty>
163
 
    <CustomAction Id='SaveCmdLineValue_SERVICENAME' Property='CMDLINE_SERVICENAME' 
164
 
                  Value='[SERVICENAME]' Execute='firstSequence' /> 
165
 
    <CustomAction Id='SetFromCmdLineValue_SERVICENAME' Property='SERVICENAME'  Value='[CMDLINE_SERVICENAME]' Execute='firstSequence' />
166
 
    <CustomAction Id='SaveCmdLineValue_DATABASELOCATION' Property='CMDLINE_DATABASELOCATION'
167
 
              Value='[DATABASELOCATION]' Execute='firstSequence' />
168
 
    <CustomAction Id='SetFromCmdLineValue_DATABASELOCATION' Property='DATABASELOCATION'  Value='[CMDLINE_DATABASELOCATION]' Execute='firstSequence' />
169
 
 
170
 
    <InstallUISequence>
171
 
       <Custom Action='SaveCmdLineValue_SERVICENAME' Before='AppSearch' />  
172
 
       <Custom Action='SetFromCmdLineValue_SERVICENAME' After='AppSearch'>CMDLINE_SERVICENAME</Custom>
173
 
       <Custom Action='SaveCmdLineValue_DATABASELOCATION' Before='AppSearch' />
174
 
       <Custom Action='SetFromCmdLineValue_DATABASELOCATION' After='AppSearch'>CMDLINE_DATABASELOCATION</Custom>
175
 
    </InstallUISequence>
176
 
    <InstallExecuteSequence>
177
 
      <Custom Action='SaveCmdLineValue_SERVICENAME' Before='AppSearch' />
178
 
      <Custom Action='SetFromCmdLineValue_SERVICENAME' After='AppSearch'>CMDLINE_SERVICENAME</Custom>
179
 
      <Custom Action='SaveCmdLineValue_DATABASELOCATION' Before='AppSearch' />
180
 
      <Custom Action='SetFromCmdLineValue_DATABASELOCATION' After='AppSearch'>CMDLINE_DATABASELOCATION</Custom>
181
 
    </InstallExecuteSequence>
182
 
  </Fragment>
 
1
<?xml version="1.0" encoding="UTF-8"?>
 
2
 
 
3
 
 
4
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
 
5
  <Fragment>
 
6
    <Property Id="PortTemplate" Value="####" />
 
7
    <Property Id="PORT" Value="3306"></Property>
 
8
    <Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable"/>
 
9
    <Property Id="CREATEDBINSTANCE"><![CDATA[&DBInstance=3 AND NOT !DBInstance=3]]></Property>
 
10
    <UI>
 
11
      <Dialog Id="DatabaseCreationDlg" Width="370" Height="270" Title="[ProductName] Setup" NoMinimize="yes">
 
12
        <Control Id="ServiceNameLabel" Type="Text" X="20" Y="73" Width="70" Height="15" TabSkip="no" Text="Service Name:" />
 
13
        <Control Id="ServiceName" Type="Edit" X="90" Y="73" Width="120" Height="15" Property="SERVICENAME" Text="{20}" />
 
14
 
 
15
        <Control Id="RootPasswordLabel" Type="Text" X="20" Y="90" Width="120" Height="15" TabSkip="no" Text="&amp;Root password:" />
 
16
        <Control Id="RootPassword" Type="Edit"  X="20" Y="105" Width="120" Height="18" Property="ROOT_PASSWORD" Password="yes" Text="{20}" />
 
17
 
 
18
        <Control Id="RootPasswordConfirmLabel" Type="Text" X="150" Y="90" Width="150" Height="15" TabSkip="no" Text="&amp;Confirm Root password:" />
 
19
        <Control Id="RootPasswordConfirm" Type="Edit" X="150" Y="105" Width="120" Height="18" Property="ROOT_PASSWORD_CONFIRM" Password="yes" Text="{20}" />
 
20
        <Control Id="BannerLine0" Type="Line" X="0" Y="128" Width="370" Height="0" />
 
21
 
 
22
        <Control Id="PortLabel" Type="Text" X="20" Y="137" Width="40" Height="15" TabSkip="no" Text="TCP port:"  />
 
23
 
 
24
        <Control Id="Port" Type="MaskedEdit" X="60" Y="136" Width="30" Height="15"  Property="PORT" Text="[PortTemplate]"/>
 
25
        <!--<Control Id="FirewallExceptionCheckBox" Type="CheckBox" X="150" Y="136" Height="15" Property="FIREWALL_EXCEPTION" Width="200" CheckBoxValue="1"
 
26
                 Text="Create Firewall exception for this port"/>-->
 
27
 
 
28
        <Control Id="BannerLine2" Type="Line" X="0" Y="155" Width="370" Height="0" />
 
29
 
 
30
        <Control Id="FolderLabel" Type="Text" X="20" Y="181" Width="100" Height="15" TabSkip="no" Text="Database location:"  />
 
31
        <Control Id="Folder" Type="PathEdit" X="20" Y="204" Width="200" Height="18" Property="DATABASELOCATION" Indirect="no" />
 
32
 
 
33
        <!-- Navigation buttons-->
 
34
        <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="&amp;Back">
 
35
          <Publish Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
 
36
        </Control>
 
37
        <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="&amp;Next">
 
38
          <!--
 
39
          <Publish Event="ValidateProductID" Value="0">1</Publish>
 
40
          <Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">CostingComplete = 1</Publish>
 
41
          -->
 
42
          <!--<Publish Event="NewDialog" Value="SetupTypeDlg">ProductID</Publish>-->
 
43
        </Control>
 
44
        <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel">
 
45
          <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
 
46
        </Control>
 
47
        <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="WixUI_Bmp_Banner" />
 
48
        <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes">
 
49
          <Text>Create default [ProductName] instance</Text>
 
50
        </Control>
 
51
        <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
 
52
        <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes">
 
53
          <Text>{\WixUI_Font_Title}Default instance properties</Text>
 
54
        </Control>
 
55
        <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
 
56
      </Dialog>
 
57
 
 
58
      <Dialog Id="ConfirmDataCleanupDlg" Width="370" Height="270" Title="[ProductName] Setup" NoMinimize="yes">
 
59
        <Control Id="ServiceRemoveText" Type="Text" X="20" Y="73" Width="300" Height="15" TabSkip="no">
 
60
          <Text>Service '[SERVICENAME]' will be removed</Text>
 
61
        </Control>
 
62
        <Control Id="CleanupDataCheckBox" Type="CheckBox" X="20" Y="100" Height="15" Property="CLEANUP_DATA" Width="15" CheckBoxValue="0"/>
 
63
        <Control Id="RemoveDataText" Type="Text" X="37" Y="101" Width="300" Height="200" TabSkip="no">
 
64
          <Text>Remove default database directory '[DATABASELOCATION]'</Text>
 
65
        </Control>
 
66
        
 
67
      <!-- Navigation buttons-->
 
68
      <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="&amp;Back">
 
69
        <Publish Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
 
70
      </Control>
 
71
      <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="&amp;Next">
 
72
        <Publish Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
 
73
      </Control>
 
74
      <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel">
 
75
        <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
 
76
      </Control>
 
77
      <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="WixUI_Bmp_Banner" />
 
78
      <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes">
 
79
        <Text>Remove default [ProductName] database</Text>
 
80
      </Control>
 
81
      <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
 
82
      <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes">
 
83
        <Text>{\WixUI_Font_Title}Default instance properties</Text>
 
84
      </Control>
 
85
        <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
 
86
      </Dialog>
 
87
    </UI>
 
88
    <UI Id="MyWixUI_Mondo">
 
89
      <UIRef Id="WixUI_FeatureTree" />
 
90
      <UIRef Id="WixUI_ErrorProgressText" />
 
91
      <DialogRef Id="DatabaseCreationDlg" />
 
92
      <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="DatabaseCreationDlg" Order="999"><![CDATA[&DBInstance=3 AND NOT !DBInstance=3]]></Publish>
 
93
      <Publish Dialog="DatabaseCreationDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="3">1</Publish>
 
94
      <Publish Dialog="DatabaseCreationDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="3">1</Publish>
 
95
      <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="DatabaseCreationDlg" Order="3" ><![CDATA[&DBInstance=3 AND NOT !DBInstance=3]]></Publish>
 
96
      <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ConfirmDataCleanupDlg" Order="3" ><![CDATA[(&DBInstance=2) AND (!DBInstance=3)]]></Publish>
 
97
      <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ConfirmDataCleanupDlg" Order="999"><![CDATA[(&DBInstance=2) AND (!DBInstance=3)]]></Publish>
 
98
      <Publish Dialog="ConfirmDataCleanupDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg">WixUI_InstallMode = "Change"</Publish>
 
99
      <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="ConfirmDataCleanupDlg" Order="999">!DBInstance=3</Publish>
 
100
      <Publish Dialog="ConfirmDataCleanupDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg">WixUI_InstallMode = "Remove"</Publish>
 
101
    </UI>
 
102
 
 
103
    <DirectoryRef Id='TARGETDIR'>
 
104
      <Directory Id="CommonAppDataFolder">
 
105
        <Directory Id="DatabasesRoot" Name="MariaDB">
 
106
          <Directory Id="DATABASELOCATION" Name="MariaDB Server 5.1">
 
107
          </Directory>
 
108
        </Directory>
 
109
      </Directory>
 
110
    </DirectoryRef>
 
111
 
 
112
    <Feature Id='DBInstance'
 
113
         Title='Database instance'
 
114
         Description='Install database instance'
 
115
         ConfigurableDirectory='DATABASELOCATION'
 
116
         AllowAdvertise='no'
 
117
         Level='1'>
 
118
      <Component Id="C.datadir" Guid="*" Directory="DATABASELOCATION">
 
119
        <RegistryValue Root='HKLM'
 
120
           Key='SOFTWARE\[Manufacturer]\[ProductName]'
 
121
           Name='DatabaseLocation' Value='[DATABASELOCATION]' Type='string' KeyPath='yes'/>
 
122
        <CreateFolder />
 
123
      </Component>
 
124
      <Component Id="C.service" Guid="*" Directory="DATABASELOCATION">
 
125
        <Condition>SERVICENAME</Condition>
 
126
        <RegistryValue Root='HKLM' 
 
127
           Key='SOFTWARE\[Manufacturer]\[ProductName]' 
 
128
           Name='ServiceName' Value='[SERVICENAME]' Type='string' KeyPath='yes'/>
 
129
        <ServiceControl Id='DBInstanceServiceStop' Name='[SERVICENAME]'  Stop='uninstall'  Wait='yes'></ServiceControl>
 
130
        <ServiceControl Id='DBInstanceServiceStart' Name='[SERVICENAME]' Start='install' Wait='no'></ServiceControl>
 
131
        <ServiceControl Id='DBInstanceServiceRemove' Name='[SERVICENAME]' Remove='uninstall'  Wait='yes'></ServiceControl>
 
132
      </Component>
 
133
   </Feature>
 
134
    
 
135
    <CustomAction Id="QtExecDeferredExampleWithProperty_Cmd" Property="QtExecDeferredExampleWithProperty"
 
136
            Value="&quot;[#F.bin.mysql_install_db.exe]&quot; &quot;--service=[SERVICENAME]&quot; &quot;--password=[ROOT_PASSWORD]&quot; &quot;--datadir=[DATABASELOCATION]&quot;"
 
137
            Execute="immediate"/>
 
138
    <CustomAction Id="QtExecDeferredExampleWithProperty" BinaryKey="WixCA" DllEntry="CAQuietExec"
 
139
            Execute="deferred" Return="check" Impersonate="no"/>
 
140
 
 
141
    <UI>
 
142
      <ProgressText Action="QtExecDeferredExampleWithProperty">Running mysql_install_db.exe</ProgressText>
 
143
    </UI>
 
144
 
 
145
    <!-- Use Wix toolset "remember property" pattern to store properties between major upgrades etc -->
 
146
    <InstallExecuteSequence>
 
147
      <Custom Action="QtExecDeferredExampleWithProperty_Cmd" After="CostFinalize"><![CDATA[&DBInstance=3 AND NOT !DBInstance=3]]></Custom>
 
148
      <Custom Action="QtExecDeferredExampleWithProperty" After="InstallFiles"><![CDATA[&DBInstance=3 AND NOT !DBInstance=3]]></Custom>
 
149
    </InstallExecuteSequence>
 
150
    
 
151
    <Property Id='SERVICENAME'>
 
152
    <RegistrySearch Id='ServiceNameProperty' Root='HKLM' 
 
153
                    Key='SOFTWARE\[Manufacturer]\[ProductName]'
 
154
                    Name='ServiceName' Type='raw' />
 
155
    </Property>
 
156
     <SetProperty After='AppSearch' Id="SERVICENAME" Value="MariaDB_51"><![CDATA[NOT SERVICENAME]]></SetProperty>
 
157
     <Property Id="DATABASELOCATION">
 
158
      <RegistrySearch Id='DatabaseLocationProperty' Root='HKLM'
 
159
                   Key='SOFTWARE\[Manufacturer]\[ProductName]'
 
160
                   Name='´DatabaseLocation' Type='raw' />
 
161
    </Property>
 
162
    <SetProperty After='AppSearch' Id="DATABASELOCATION" Value="[CommonAppDataFolder]\MariaDB\[ProductName]"><![CDATA[NOT DATABASELOCATION]]></SetProperty>
 
163
    <CustomAction Id='SaveCmdLineValue_SERVICENAME' Property='CMDLINE_SERVICENAME' 
 
164
                  Value='[SERVICENAME]' Execute='firstSequence' /> 
 
165
    <CustomAction Id='SetFromCmdLineValue_SERVICENAME' Property='SERVICENAME'  Value='[CMDLINE_SERVICENAME]' Execute='firstSequence' />
 
166
    <CustomAction Id='SaveCmdLineValue_DATABASELOCATION' Property='CMDLINE_DATABASELOCATION'
 
167
              Value='[DATABASELOCATION]' Execute='firstSequence' />
 
168
    <CustomAction Id='SetFromCmdLineValue_DATABASELOCATION' Property='DATABASELOCATION'  Value='[CMDLINE_DATABASELOCATION]' Execute='firstSequence' />
 
169
 
 
170
    <InstallUISequence>
 
171
       <Custom Action='SaveCmdLineValue_SERVICENAME' Before='AppSearch' />  
 
172
       <Custom Action='SetFromCmdLineValue_SERVICENAME' After='AppSearch'>CMDLINE_SERVICENAME</Custom>
 
173
       <Custom Action='SaveCmdLineValue_DATABASELOCATION' Before='AppSearch' />
 
174
       <Custom Action='SetFromCmdLineValue_DATABASELOCATION' After='AppSearch'>CMDLINE_DATABASELOCATION</Custom>
 
175
    </InstallUISequence>
 
176
    <InstallExecuteSequence>
 
177
      <Custom Action='SaveCmdLineValue_SERVICENAME' Before='AppSearch' />
 
178
      <Custom Action='SetFromCmdLineValue_SERVICENAME' After='AppSearch'>CMDLINE_SERVICENAME</Custom>
 
179
      <Custom Action='SaveCmdLineValue_DATABASELOCATION' Before='AppSearch' />
 
180
      <Custom Action='SetFromCmdLineValue_DATABASELOCATION' After='AppSearch'>CMDLINE_DATABASELOCATION</Custom>
 
181
    </InstallExecuteSequence>
 
182
  </Fragment>
183
183
</Wix>
 
 
b'\\ No newline at end of file'