1<!-- $Id: dbwix.m4,v 1.9 2008/04/17 01:59:10 alexg Exp $
2 - This file is included by WiX input files to define m4 macros.
3 - m4 is tricky.  It has NO notion of XML comments, so
4 - take care using these names in comments after they are defined,
5 - since they will be expanded (probably what you don't want).
6 -
7 - Note that this file is shared by multiple installers.
8 - If you want to change a definition to customize an individual project,
9 - consider redefining the macro in a local file.
10 -->
11
12<!-- Some basic UI characteristics -->
13m4_define(`DIALOG_WIDTH', `390')
14m4_define(`DIALOG_HEIGHT', `320')
15m4_define(`BOTTOMSTRIPE_Y', `m4_eval(DIALOG_HEIGHT-32)')
16m4_define(`NAVBUTTON_Y', `m4_eval(DIALOG_HEIGHT-23)')
17m4_define(`NAVBUTTON_DIM', `X="`$1'" Y="NAVBUTTON_Y" Width="66" Height="17"')
18
19<!-- _YPOS is a running total of the current Y position -->
20m4_define(`_YPOS', `0')
21m4_define(`SETY', `m4_define(`_YPOS', `$1')')
22m4_define(`INCY', `SETY(m4_eval(_YPOS+(`$1')))')
23
24<!-- PARTIALHEIGHT(yheight [, gap=10 ]) -->
25m4_define(`PARTIALHEIGHT', `Y="_YPOS" Height="`$1'" INCY(`$1') INCY(_GETGAP(`$2'))')
26m4_define(`_GETGAP', `m4_ifelse(`',`$1', 10, `$1')')
27m4_define(`FULLHEIGHT', `Y="_YPOS" Height="m4_eval(BOTTOMSTRIPE_Y - _YPOS - 10)"')
28
29<!-- BOTTOM_Y:  bottom of the usable area before nav buttons -->
30m4_define(`BOTTOM_Y', `m4_eval(BOTTOMSTRIPE_Y - 10)')
31
32m4_define(`DIALOGPROP', `Width="DIALOG_WIDTH" Height="DIALOG_HEIGHT"
33        Title="[ProductName] - Installer" NoMinimize="yes"')
34
35m4_define(`TOPSTRIPE', `
36        SETY(`$1')
37        INCY(10)
38<!-- stripe bitmap removed for now until we get better quality bitmaps.
39        <Control Id="TopStripe" Type="Bitmap"
40                 X="0" Y="0" Width="DIALOG_WIDTH" Height="`$1'" Text="Stripe" />
41-->
42        <Control Id="TopStripeBorder" Type="Line"
43                 X="0" Y="`$1'" Width="DIALOG_WIDTH" Height="0" />
44        <Control Id="TopTitle" Type="Text"
45                 X="8" Y="6" Width="292" Height="25" Transparent="yes">
46          <Text>{&amp;MSSansBold8}`$2'</Text>
47        </Control>
48        <Control Id="TopText" Type="Text"
49                 X="16" Y="23" Width="m4_eval(DIALOG_WIDTH-34)"
50                 Height="m4_eval(`$1' - 19)" Transparent="yes">
51          <Text>`$3'</Text>
52        </Control>')
53
54m4_define(`TEXTCONTROL', `
55        <Control Id="`$1'" Type="Text"
56            X="20" Y="_YPOS" Width="m4_eval(DIALOG_WIDTH-42)" Height="`$2'">
57          <Text>`$3'</Text>
58        </Control>
59        INCY(`$2')')
60
61<!-- TEXTCONTROL2 (name,height,text). No newline -->
62m4_define(`TEXTCONTROL2', `
63        <Control Id="`$1'" Type="Text"
64            X="20" Y="_YPOS" Width="m4_eval(DIALOG_WIDTH-42)" Height="`$2'" Transparent="yes">
65          <Text>`$3'</Text>
66        </Control>')
67
68m4_define(`BOTTOMSTRIPE', `
69        <Control Id="BottomStripeBorder" Type="Line"
70                 X="0" Y="BOTTOMSTRIPE_Y" Width="DIALOG_WIDTH" Height="0" />')
71
72m4_define(`NEWDIALOGEVENT', `
73          <Publish Event="NewDialog" Value="`$1'">
74                   <![CDATA[1]]>
75          </Publish>')
76
77m4_define(`SPAWNDIALOGEVENT', `
78          <Publish Event="SpawnDialog" Value="`$1'">
79                   <![CDATA[1]]>
80          </Publish>')
81
82<!-- use an arrow only if the text is Back, like this: "< Back" -->
83m4_define(`BACKBUTTON_GENERIC', `
84        <Control Id="`$1'" Type="PushButton"
85                 NAVBUTTON_DIM(170)
86                 Text="m4_ifelse(Back,`$1',&lt; )&amp;`$1'" `$2'>
87           `$3'
88        </Control>')
89
90<!-- use an arrow only if the text is Next, like this: "Next >" -->
91m4_define(`NEXTBUTTON_GENERIC', `
92        <Control Id="`$1'" Type="PushButton"
93                 NAVBUTTON_DIM(236)
94                 Default="yes" Text="&amp;`$1'm4_ifelse(Next,`$1', &gt;)" `$2'>
95           `$3'
96        </Control>')
97
98m4_define(`CANCELBUTTON_GENERIC', `
99        <Control Id="`$1'" Type="PushButton"
100                 NAVBUTTON_DIM(308)
101                 Text="`$1'" `$2'>
102          `$3'
103        </Control>')
104
105m4_define(`NEXTBUTTON_NOTDEFAULT', `
106        <Control Id="`$1'" Type="PushButton"
107                 NAVBUTTON_DIM(236)
108                 Default="no" Text="&amp;`$1'm4_ifelse(Next,`$1', &gt;)" `$2'>
109           `$3'
110        </Control>')
111
112<!-- typical usages -->
113m4_define(`BACKBUTTON_DISABLED', `BACKBUTTON_GENERIC(Back, Disabled="yes")')
114m4_define(`BACKBUTTON', `BACKBUTTON_GENERIC(Back, , NEWDIALOGEVENT(`$1'))')
115m4_define(`NEXTBUTTON_DISABLED', `NEXTBUTTON_GENERIC(Next, Disabled="yes")')
116m4_define(`NEXTBUTTON', `NEXTBUTTON_GENERIC(Next, , NEWDIALOGEVENT(`$1'))')
117m4_define(`CANCELBUTTON', `CANCELBUTTON_GENERIC(Cancel, Cancel="yes",
118                          SPAWNDIALOGEVENT(CancelInstallerDlg))')
119
120<!-- a little (imperfect) magic to create some unique GUIDs. -->
121m4_define(`_GUIDSUFFIX', `10000000')
122m4_define(`_SETGUID', `m4_define(`_GUIDSUFFIX', `$1')')
123m4_define(`_GUIDINC', `_SETGUID(m4_eval(_GUIDSUFFIX+1))')
124m4_define(`GUID_CREATE_UNIQUE', `_GUIDINC()WIX_DB_GUID_PREFIX()`'_GUIDSUFFIX()')
125
126<!-- These three defines are data values, used by GUID_CREATE_PERSISTENT -->
127m4_define(`_WIXDB_PRODUCT', WIX_DB_PRODUCT_NAME)
128m4_define(`_WIXDB_VERSION', WIX_DB_VERSION)
129m4_define(`_WIXDB_CURDIR', `unknown')
130m4_define(`_WIXDB_CURFILE', `unknown')
131m4_define(`_WIXDB_SUBDIR', `')
132
133<!-- These defines set the data values above -->
134m4_define(`WIX_DB_SET_PRODUCT', `m4_define(`_WIXDB_PRODUCT', `$1')')
135m4_define(`WIX_DB_SET_VERSION', `m4_define(`_WIXDB_VERSION', `$1')')
136m4_define(`WIX_DB_SET_CURDIR', `m4_define(`_WIXDB_CURDIR', `$1')')
137m4_define(`WIX_DB_SET_CURFILE', `m4_define(`_WIXDB_CURFILE', `$1')')
138m4_define(`WIX_DB_SET_SUBDIR', `m4_define(`_WIXDB_SUBDIR', `$1')')
139
140m4_define(`_LASTCHAR', `m4_substr(`$1',m4_eval(m4_len(`$1')-1))')
141m4_define(`_LOPCHAR', `m4_substr(`$1',0,m4_eval(m4_len(`$1')-1))')
142m4_define(`_CHOPNAME', `m4_ifelse(_LASTCHAR(`$1'),/,`$1',`_CHOPNAME(_LOPCHAR(`$1'))')')
143m4_define(`WIX_DB_BEGIN_SUBDIR', `WIX_DB_SET_SUBDIR(_WIXDB_SUBDIR/`$1')')
144m4_define(`WIX_DB_END_SUBDIR', `WIX_DB_SET_SUBDIR(_LOPCHAR(_CHOPNAME(_WIXDB_SUBDIR)))')
145m4_define(`WIX_DB_CLEAR_SUBDIR', `WIX_DB_SET_SUBDIR()')
146
147<!-- Create a GUID from the current product, directory, file -->
148m4_define(`WIX_DB_PERSISTENT_GUID', `m4_esyscmd(echo "_WIXDB_PRODUCT @@ _WIXDB_VERSION @@ _WIXDB_CURDIR @@ _WIXDB_SUBDIR @@ _WIXDB_CURFILE" | openssl md5 | sed -e "s/^\(........\)\(....\)\(....\)\(....\)\(....\)\(............\)/\1-\2-\3-\4-\5/")')
149
150m4_define(`DB_LICENSE_INTRO', `The following license applies to this copy of software you are about to install.  Please read it carefully before proceeding.  Select below the nature of the license by which you will use this product.  For more information about Oracle Corporation&apos;s licensing please contact us at berkeleydb-info_us@oracle.com')
151
152m4_define(`DB_ENVIRONMENT_INTRO', `[ProductName] will need to modify certain environment variables to work properly.  If you elect not to set these variables you may find that some utilities`,' scripts and other parts of [ProductName] won&apos;t work properly.  Please indicate that you skipped this step if you request support help from us.')
153
154m4_define(`COMMON_PROPERTIES', `
155    <Property Id="ApplicationUsers"><![CDATA[AnyUser]]></Property>
156    <Property Id="LicenseType"><![CDATA[Open]]></Property>
157
158    <!-- The ARP* properties affect the Add/Remove Programs dialog -->
159    <Property Id="ARPURLINFOABOUT"><![CDATA[http://www.oracle.com]]></Property>
160    <Property Id="ARPCONTACT"><![CDATA[berkeleydb-info_us@oracle.com]]></Property>
161    <Property Id="ARPNOMODIFY"><![CDATA[1]]></Property>
162    <Property Id="ARPNOREPAIR"><![CDATA[1]]></Property>
163    <!-- TODO: this icon does not work here -->
164    <Property Id="ARPPRODUCTION"><![CDATA[IconWeb]]></Property>
165
166    <Property Id="INSTALLLEVEL"><![CDATA[200]]></Property>
167    <Property Id="FullOrCustom"><![CDATA[Full]]></Property>
168
169    <Property Id="DiscussionCheck" Hidden="yes"><![CDATA[yes]]></Property>
170    <Property Id="AnnouncementsCheck" Hidden="yes"><![CDATA[yes]]></Property>
171    <Property Id="NewsletterCheck" Hidden="yes"><![CDATA[yes]]></Property>
172    <Property Id="EmailAddress" Hidden="yes"></Property>
173    <Property Id="SalesContactCheck" Hidden="yes"><![CDATA[yes]]></Property>
174    <Property Id="EnvironmentSetCheck" Hidden="yes"><![CDATA[1]]></Property>
175    <Property Id="EnvironmentGenCheck" Hidden="yes"><![CDATA[1]]></Property>
176<!-- (PBR) We use DebugCheck to track the state of the debug checkbox -->
177    <Property Id="DebugCheck" Hidden="yes"><![CDATA[yes]]></Property>
178
179    <!-- Part of the build process creates a program instenv.exe
180      -  that is installed into InstUtil and used only by the installer.
181      -  When a user wants to generate a file with environment vars,
182      -  we launch instreg and that program creates it.
183      -
184      -  The final location of the instenv.exe program is not known
185      -  when we create this property, we set the real value of the
186      -  property later.
187      -->
188
189    <Property Id="InstEnvironmentProgram"><![CDATA[0]]></Property>
190<!-- TODO: should not have to hardwire PATH and CLASSPATH here -->
191    <CustomAction Id="InstEnvironment" Property="InstEnvironmentProgram" 
192         ExeCommand="[INSTALLDIR]\dbvars.bat PATH=[PATHEscValue] CLASSPATH=[CLASSPATHEscValue]" Return="asyncNoWait"/>
193
194    <!-- Some properties to aid in debugging.
195      -  Sometimes creating a msg dialog is the easiest way to see the
196      -  value of a property.  To make this work when you hit the next
197      -  button, add this to your NEXTBUTTON__GENERIC call:
198
199          <Publish Event="DoAction" Value="InstDebug"><![CDATA[1]]></Publish>
200
201      -->
202    <Property Id="DebugUserId">dda</Property>
203    <Property Id="DebugShowProgram">msg.exe</Property>
204
205    <!-- tweek me as needed -->
206    <CustomAction Id="InstDebug" Property="DebugShowProgram" 
207         ExeCommand="[DebugUserId] InstEnvironmentProgram=[InstEnvironmentProgram]= EnvironmentGenCheck=[EnvironmentGenCheck]= AlwaysInstall=[!AlwaysInstall]=" Return="asyncNoWait" />
208
209    <Property Id="NULL" Hidden="yes"></Property>
210    <Property Id="FeatureList" Hidden="yes"></Property>
211    <Property Id="DoInstallDebug" Hidden="yes">yes</Property>
212    <Property Id="DoInstallEnvironment" Hidden="yes">yes</Property>
213
214    <Binary Id="OracleLogo" src="WIX_DB_IMAGEDIR\oracle.jpg" />
215    <Binary Id="Stripe" src="WIX_DB_IMAGEDIR\topstripe.ibd" />
216
217    <!-- TODO: does not work yet -->
218    <Binary Id="IconWeb" src="WIX_DB_IMAGEDIR\caticon.ibd" />
219
220    <!-- These are 16x16 Windows ico files -->
221    <Binary Id="IconCreateDir" src="WIX_DB_IMAGEDIR\foldernew.ibd" />
222    <Binary Id="IconUp" src="WIX_DB_IMAGEDIR\folderup.ibd" />
223
224')
225
226m4_define(`COMMON_COMPONENTS', `
227        <Component Id="RequiredCommonFiles"
228               Guid="545CFE00-93D7-11D9-EAD3-F63F68BDEB1A"
229                   KeyPath="yes" SharedDllRefCount="yes"
230                   Location="either" DiskId="1">
231	      <Registry Id="Ext.Registry" Root="HKCR"
232                   Key=".bdbsc"
233                   Value="Oracle.InformationalShortcut"
234                   Type="string" Action="write" />
235	      <Registry Id="Name.Registry" Root="HKCR"
236                   Key="Oracle.InformationalShortcut"
237                   Value="Oracle Corporation Informational Shortcut"
238                   Type="string" Action="write" />
239	      <Registry Id="Tip.Registry" Root="HKCR"
240                   Key="Oracle.InformationalShortcut" Name="InfoTip"
241                   Value="Oracle Corporation Informational Shortcut"
242                   Type="string" Action="write" />
243	      <Registry Id="NoShow.Registry" Root="HKCR"
244                   Key="Oracle.InformationalShortcut" Name="NeverShowExt"
245                   Type="string" Action="write" />
246	      <Registry Id="Icon.Registry" Root="HKCR"
247                   Key="Oracle.InformationalShortcut\DefaultIcon"
248                   Value="[INSTALLDIR]\installutil\webicon.ico"
249                   Type="string" Action="write" />
250	      <Registry Id="Command.Registry" Root="HKCR"
251                   Key="Oracle.InformationalShortcut\shell\open\command"
252                   Value="rundll32.exe shdocvw.dll,OpenURL %1"
253                   Type="string" Action="write" />
254	      <Registry Id="Explore.Registry" Root="HKCU"
255                   Key="Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bdbsc\OpenWithProgIds\Oracle.InformationalShortcut"
256                   Action="write" />
257	      <Registry Id="HklmExt.Registry" Root="HKLM"
258                   Key="Software\Classes\.bdbsc"
259                   Value="Oracle.InformationalShortcut"
260                   Type="string" Action="write" />
261	      <Registry Id="HklmCommand.Registry" Root="HKLM"
262                   Key="Software\Classes\Oracle.InformationalShortcut\shell\open\command"
263                   Value="rundll32.exe shdocvw.dll,OpenURL %1"
264                   Type="string" Action="write" />
265            </Component>
266')
267
268m4_define(`COMMON_UI_TEXT', `
269      <!-- These are needed to show various canned text -->
270      <UIText Id="AbsentPath" />
271      <UIText Id="NewFolder">Fldr|New Folder</UIText>
272      <UIText Id="bytes">bytes</UIText>
273      <UIText Id="GB">GB</UIText>
274      <UIText Id="KB">KB</UIText>
275      <UIText Id="MB">MB</UIText>
276      <UIText Id="MenuAbsent">This feature will not be installed.</UIText>
277      <UIText Id="MenuAllLocal">This feature, and all subfeatures, will be installed.</UIText>
278      <UIText Id="MenuLocal">This feature will be installed.</UIText>
279      <UIText Id="SelAbsentAbsent">This feature will remain uninstalled.</UIText>
280      <UIText Id="SelAbsentLocal">This feature will be installed.</UIText>
281      <UIText Id="SelChildCostNeg">This feature frees up [1] on your hard drive.</UIText>
282      <UIText Id="SelChildCostPos">This feature requires [1] on your hard drive.</UIText>
283      <UIText Id="SelCostPending">Compiling cost for this feature...</UIText>
284      <UIText Id="SelLocalAbsent">This feature will be completely removed.</UIText>
285      <UIText Id="SelLocalLocal">This feature will remain installed.</UIText>
286      <UIText Id="SelParentCostNegNeg">This feature frees up [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures free up [4] on your hard drive.</UIText>
287      <UIText Id="SelParentCostNegPos">This feature frees up [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures require [4] on your hard drive.</UIText>
288      <UIText Id="SelParentCostPosNeg">This feature requires [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures free up [4] on your hard drive.</UIText>
289      <UIText Id="SelParentCostPosPos">This feature requires [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures require [4] on your hard drive.</UIText>
290      <UIText Id="TimeRemaining">Time remaining: {[1] min }[2] sec</UIText>
291      <UIText Id="VolumeCostAvailable">Available</UIText>
292      <UIText Id="VolumeCostDifference">Differences</UIText>
293      <UIText Id="VolumeCostRequired">Required</UIText>
294      <UIText Id="VolumeCostSize">Disk Size</UIText>
295      <UIText Id="VolumeCostVolume">Volume</UIText>
296')
297
298m4_define(`COMMON_FEATURES', `
299    <!-- Here we list all the features to be installed.
300      -  There is one canned feature, the rest of the
301      -  features come from features.in, by way of a file
302      -  that gets included.
303      -->
304    <Feature Id="AlwaysInstall" Title="Always Install"
305             Description="`$1'" Display="hidden" Level="1"
306             AllowAdvertise="no"
307             ConfigurableDirectory="INSTALLDIR" Absent="disallow">
308      <ComponentRef Id="RequiredFiles" />
309      <ComponentRef Id="RequiredCommonFiles" />
310    </Feature>
311
312    <!-- <Feature>, <ComponentRef> generated from {features,files}.in -->
313    WIX_DB_FEATURE_STRUCTURE()
314')
315
316m4_define(`COMMON_EXECUTE_SEQUENCE', `
317    <!-- TODO: fix comment
318      -  We modify the execute sequence to insert some custom actions:
319      -  we want the instenv program to run during install (after files
320      -  are installed), and during uninstall (before files are removed).
321      -  We set a condition on the custom actions to make this happen.
322      -  The "!ident" notation indicates the current action for a feature 
323      -  with that identifier.  We use the AlwaysInstall feature because
324      -  it is always present in our feature list.  A value of 3 means
325      -  it is being installed locally, 1 means it is being uninstalled.
326      - TODO: removed for now
327      <Custom Action="InstEnvironment" After="PublishProduct">
328        <![CDATA[Not Installed]]></Custom>
329      -->
330    <InstallExecuteSequence>
331    </InstallExecuteSequence>
332')
333
334<!--
335  -  Here are macros for each dialog that is shared by the installers.
336  -  The idea for any customization is that each installer
337  -  could potentially override a particular dialog.
338  -  However, if it is feasible to share code, any of these
339  -  dialogs could be parameterized further.
340  -
341  -  In general, these macros have 3 parameters.
342  -  The first is the id name of the dialog.
343  -  The second is the id of the previous dialog (for the Back button).
344  -  The third is the id of the next dialog (for the Next button).
345  -->
346m4_define(`DIALOG_WELCOME', `
347      <Dialog Id="`$1'" DIALOGPROP>
348        BOTTOMSTRIPE()
349        BACKBUTTON_DISABLED()
350        CANCELBUTTON()
351        NEXTBUTTON(`$3')
352
353        TOPSTRIPE(54, `Welcome',
354`The Installer will install [ProductName] on your computer.
355To continue, click Next.')
356
357        <Control Id="Logo" Type="Bitmap" Text="OracleLogo" 
358                 X="0" Width="DIALOG_WIDTH" PARTIALHEIGHT(168) />
359      </Dialog>
360')
361
362<!-- Takes a 4th parameter, a short product name, like "Berkeley DB" -->
363m4_define(`DIALOG_LICENSE', `
364      <RadioButtonGroup Property="LicenseType">
365        <RadioButton Value="Open"
366           X="0" Y="0" Width="310" Height="15"
367           Text="I qualify for the &amp;open source license shown above" />
368        <RadioButton Value="Commercial"
369           X="0" Y="15" Width="310" Height="15"
370           Text="I will need a co&amp;mmercial license when I ship my product" />
371      </RadioButtonGroup>
372
373      <Dialog Id="`$1'" DIALOGPROP>
374
375        TOPSTRIPE(84, `Open Source License', DB_LICENSE_INTRO(`$4'))
376        BOTTOMSTRIPE()
377        BACKBUTTON(`$2')
378        CANCELBUTTON()
379	NEXTBUTTON(`$3')
380
381        <Control Id="LicenseText" Type="ScrollableText" X="8" Width="368"
382                  PARTIALHEIGHT(130) Sunken="yes">
383          <Text>WIX_DB_LICENSE_RTF()</Text>
384        </Control>
385
386        <Control Id="LicenseRadio" Type="RadioButtonGroup" X="8" Width="340"
387                 PARTIALHEIGHT(35) Property="LicenseType" />
388
389      </Dialog>
390')
391
392m4_define(`DIALOG_TARGET', `
393
394      <RadioButtonGroup Property="ApplicationUsers">
395        <RadioButton Value="AnyUser" X="0" Y="0" Width="270" Height="15"
396            Text="&amp;Anyone who uses this computer (all users)" />
397        <RadioButton Value="CurUser" X="0" Y="15" Width="270" Height="15"
398            Text="Only for the current user" />
399      </RadioButtonGroup>
400
401      <Dialog Id="`$1'" DIALOGPROP>
402
403        TOPSTRIPE(44, `Installation Folder',
404                  `Click Next to install to the default folder.')
405        BOTTOMSTRIPE()
406        BACKBUTTON(`$2')
407        CANCELBUTTON()
408
409        NEXTBUTTON_GENERIC(Next,,
410	   NEWDIALOGEVENT(`$3')
411          <Publish Event="SetInstallLevel" Value="300">
412            <![CDATA[0]]></Publish>
413          <Publish Property="ALLUSERS" Value="1">
414            <![CDATA[ApplicationUsers = "AnyUser"]]></Publish>
415          <Publish Property="ALLUSERS" Value="{}">
416            <![CDATA[ApplicationUsers = "CurUser"]]></Publish>
417          <Publish Property="SelectedSetupType" Value="Custom">
418            <![CDATA[1]]></Publish>
419
420	)
421
422        TEXTCONTROL(InstallToText, 16, `Install [ProductName] to:')
423
424        <Control Id="ChangeFolder" Type="PushButton" X="318" Y="_YPOS"
425                 Width="66" Height="17" Text="&amp;Change...">
426          <Publish Event="SpawnDialog" Value="ChangeFolderDlg">
427            <![CDATA[1]]></Publish>
428          <Publish Property="NewInstallDir" Value="INSTALLDIR">
429            <![CDATA[1]]></Publish>
430        </Control>
431
432        <Control Id="InstallToValue" Type="Text" X="40" Width="250"
433           PARTIALHEIGHT(20, 20)
434           Property="NewInstallDir" Text="[INSTALLDIR]" />
435
436        TEXTCONTROL(InstallForText, 14, `Install [ProductName] for:')
437
438        <Control Id="InstallForRadio" Type="RadioButtonGroup" PARTIALHEIGHT(50)
439             X="40" Width="310" Property="ApplicationUsers" />
440      </Dialog>
441
442      <Dialog Id="ChangeFolderDlg" DIALOGPROP>
443        TOPSTRIPE(44, `Change the Installation Folder',
444                  `Browse to the folder you want to install to.')
445        BOTTOMSTRIPE()
446        NEXTBUTTON_GENERIC(OK,,
447          <Publish Event="SetTargetPath"
448            Value="[NewInstallDir]"><![CDATA[1]]></Publish>
449          <Publish Event="EndDialog" Value="Return"><![CDATA[1]]></Publish>
450        )
451        CANCELBUTTON_GENERIC(Cancel, Cancel="yes",
452          <Publish Event="Reset" Value="0"><![CDATA[1]]></Publish>
453          <Publish Event="EndDialog" Value="Return"><![CDATA[1]]></Publish>
454        )
455
456        TEXTCONTROL(LookText, 15, `&amp;Install into:')
457
458        <Control Id="DirCombo" Type="DirectoryCombo"
459           X="20" Width="270" Y="_YPOS" Height="80"
460           Property="NewInstallDir" Indirect="yes" Removable="yes"
461           Fixed="yes" Remote="yes" CDROM="yes" RAMDisk="yes" Floppy="yes" />
462
463        <Control Id="FolderUp" Type="PushButton"
464           X="320" Width="19" Y="_YPOS" Height="19"
465           ToolTip="Up One Level" Icon="yes" FixedSize="yes"
466           IconSize="16" Text="IconUp">
467          <Publish Event="DirectoryListUp" Value="0"><![CDATA[1]]></Publish>
468        </Control>
469
470        <Control Id="FolderCreate" Type="PushButton"
471           X="345" Width="19" Y="_YPOS" Height="19"
472           ToolTip="Create New Folder" Icon="yes" FixedSize="yes"
473           IconSize="16" Text="IconCreateDir">
474          <Publish Event="DirectoryListNew" Value="0"><![CDATA[1]]></Publish>
475        </Control>
476
477        INCY(25)
478        <Control Id="DirList" Type="DirectoryList"
479           X="20" Width="342" PARTIALHEIGHT(100, 5)
480           Property="NewInstallDir" Sunken="yes"
481           Indirect="yes" TabSkip="no" />
482
483        <Control Id="FolderText" Type="Text"
484           X="20" Width="99" PARTIALHEIGHT(14, 1)
485           TabSkip="no" Text="&amp;Folder name:" />
486
487        <Control Id="PathEditControl" Type="PathEdit"
488           X="20" Width="342" PARTIALHEIGHT(17)
489           Property="NewInstallDir" Sunken="yes" Indirect="yes" />
490
491      </Dialog>
492
493')
494
495<!-- Takes a 4th parameter, any extra text (restrictions) for debug libs -->
496m4_define(`DIALOG_FEATURE', `
497      <Dialog Id="`$1'" DIALOGPROP TrackDiskSpace="yes">
498
499        TOPSTRIPE(36, `Feature Selection',
500                  `Select the features of [ProductName] you want. Maximum install size is [MaxInstallSize].')
501        BOTTOMSTRIPE()
502        CANCELBUTTON
503        BACKBUTTON(`$2')
504
505        NEXTBUTTON_GENERIC(Next,,
506          <Publish Event="NewDialog" Value="`$3'">
507            <![CDATA[OutOfNoRbDiskSpace <> 1]]></Publish>
508          <Publish Event="NewDialog" Value="OutOfSpaceDlg">
509            <![CDATA[OutOfNoRbDiskSpace = 1]]></Publish>
510          <Publish Property="FullOrCustom" Value="Custom">
511            <![CDATA[1]]></Publish>
512
513           <!--
514            -  This updates the FeatureList property and the
515            -  properties like PATHValue that track the value
516            -  to be displayed for environment variables.
517           -->
518            WIX_DB_ENV_FEATURE_SET()
519        )
520
521
522        <!-- TODO: When the debug checkbox is clicked,
523          -  we would like to update the disk space usage numbers
524          -  as shown in the SelectionTreeControl.  Tried this:
525              <Publish Event="DoAction" Value="CostFinalize">
526                 <![CDATA[1]]></Publish>
527          -  but it made all the numbers zero.  Probably need
528          -  to perform a whole sequence, (like CostInitialize,...)
529          -->
530
531
532        TEXTCONTROL(ClickText, 15,
533`Click on an icon in the list below to change how a feature is installed.')
534        INCY(5)
535
536        <Control Id="SelectionTreeControl" Type="SelectionTree"
537                 X="8" Width="220" FULLHEIGHT
538                 Property="NewInstallDir" Sunken="yes" TabSkip="no" />
539
540        <Control Id="GroupBoxControl" Type="GroupBox"
541                 X="235" Width="131" FULLHEIGHT
542                 Text="Feature Description" />
543        INCY(15)
544
545        <Control Id="ItemDescription" Type="Text"
546                 X="241" Width="120" PARTIALHEIGHT(50) >
547          <Text></Text>
548          <Subscribe Event="SelectionDescription" Attribute="Text" />
549        </Control>
550
551        <Control Id="Size" Type="Text"
552                 X="241" Width="120" PARTIALHEIGHT(50)
553                 Text="Feature size">
554          <Subscribe Event="SelectionSize" Attribute="Text" />
555        </Control>
556
557      </Dialog>
558')
559
560<!--
561 - Note: for Win/9X, Win/ME
562 - Here we must do costfinalize whenever leaving
563 - this dialog (via Back or Next) because changing whether we have
564 - environment enabled or not changes the list of features
565 - (which is finalized by costfinalize).
566 - Calling costfinalize more than once is apparently not
567 - supported on older (9X,ME) systems.
568 -->
569m4_define(`DIALOG_ENVIRONMENT', `
570      <Dialog Id="`$1'" DIALOGPROP>
571        TOPSTRIPE(84, `Setting Environment Variables', DB_ENVIRONMENT_INTRO)
572        BOTTOMSTRIPE()
573        CANCELBUTTON
574        BACKBUTTON_GENERIC(Back, ,
575           NEWDIALOGEVENT(`$2')
576<!--PBR (4/4/2005) I removed this because it resets the feature choices
577           <Publish Event="DoAction" Value="CostFinalize">
578             <![CDATA[1]]></Publish>
579-->
580        )
581        NEXTBUTTON_GENERIC(Next, , 
582           NEWDIALOGEVENT(`$3')
583<!--PBR (4/4/2005) I removed this because it resets the feature choices
584           <Publish Event="DoAction" Value="CostFinalize">
585             <![CDATA[1]]></Publish>
586-->
587          <Publish Property="DoInstallEnvironment" Value="yes">
588                 <![CDATA[EnvironmentSetCheck = "1"]]></Publish>
589          <Publish Property="DoInstallEnvironment" Value="no">
590                 <![CDATA[EnvironmentSetCheck <> "1"]]></Publish>
591        )
592
593        <Control Id="SetEnvBox" Type="CheckBox" PARTIALHEIGHT(15, 5)
594             Text="Set the values in the environment variables"
595             X="26" Width="250" Property="EnvironmentSetCheck" CheckBoxValue="1"/>
596        <Control Id="GenEnvBox" Type="CheckBox" PARTIALHEIGHT(15, 8)
597             Text="Generate a dbvars.bat file with the given values"
598             X="26" Width="250" Property="EnvironmentGenCheck" CheckBoxValue="1"/>
599        INCY(5)
600
601        TEXTCONTROL(ReviewText, 12,
602`Here are the new environment values:')
603
604        <Control Id="LargeBox" Type="Text"
605                  X="19" Width="340" FULLHEIGHT
606                  Disabled="yes" Sunken="yes" Transparent="yes" TabSkip="no" />
607
608        INCY(5)
609
610        <!-- Show the properties for environment -->
611        WIX_DB_ENV_FEATURE_SHOW()
612
613      </Dialog>
614')
615
616m4_define(`DIALOG_READY', `
617      <Dialog Id="`$1'" DIALOGPROP TrackDiskSpace="yes">
618        NEXTBUTTON_GENERIC(Install,,
619          <Publish Event="NewDialog" Value="OutOfSpaceDlg">
620            <![CDATA[OutOfNoRbDiskSpace = 1]]></Publish>
621          <Publish Event="EndDialog" Value="Return">
622            <![CDATA[OutOfNoRbDiskSpace <> 1]]></Publish>
623
624<!-- Note: we set the name of the instenv now because we do not know
625           the installed pathname at the beginning of the execution -->
626
627          <Publish Property="InstEnvironmentProgram"
628                 Value="[INSTALLDIR]\installutil\bin\instenv.exe">
629                 <![CDATA[1]]></Publish>
630        )
631
632        TOPSTRIPE(44, `Ready', `The installer is ready to begin.')
633        BOTTOMSTRIPE()
634        CANCELBUTTON()
635        BACKBUTTON(`$2')
636
637        TEXTCONTROL(ReviewText, 24,
638`If you want to review or change any of your installation settings, click Back to the Feature Selection.  Click Cancel to exit the installer.')
639
640        <Control Id="LargeBox" Type="Text"
641                  X="19" Width="340" FULLHEIGHT
642                  Disabled="yes" Sunken="yes" Transparent="yes" TabSkip="no" />
643
644        INCY(5)
645
646        <Control Id="DestinationText" Type="Text"
647                  X="23" Width="316" PARTIALHEIGHT(11, 4)
648                  TabSkip="no" Text="Destination Folder:" />
649
650        <Control Id="DestinationValue" Type="Text"
651                  X="37" Width="316" PARTIALHEIGHT(13, 8)
652                  TabSkip="no" Text="[INSTALLDIR]" />
653
654        <Control Id="FeatureListText" Type="Text"
655                  X="23" Width="316" PARTIALHEIGHT(13, 4)
656                  TabSkip="no" Text="Features to be installed:" />
657
658        <Control Id="FeatureListValue" Type="Text"
659                  X="37" Width="316" PARTIALHEIGHT(30, 8)
660                  TabSkip="no" Text="Shortcuts[FeatureList]" />
661
662        <Control Id="EnvironmentText" Type="Text"
663                  X="23" Width="316" PARTIALHEIGHT(15, 0)
664                  TabSkip="no" Text="Environment Variables:" />
665
666        <Control Id="EnvironmentValue" Type="Text"
667                  X="37" Width="316" PARTIALHEIGHT(20, 0)
668                  TabSkip="no" Text="[DoInstallEnvironment]" />
669
670      </Dialog>
671
672')
673
674m4_define(`DIALOG_PROGRESS', `
675      <Dialog Id="`$1'" DIALOGPROP Modeless="yes">
676        BOTTOMSTRIPE()
677        BACKBUTTON_DISABLED()
678        CANCELBUTTON()
679        NEXTBUTTON_DISABLED()
680
681        TOPSTRIPE(44, `Installer Progress', `Installing [ProductName].')
682
683        <Control Id="ActionText" Type="Text"
684                  X="59" Y="100" Width="275" Height="12">
685          <Subscribe Event="ActionText" Attribute="Text" />
686        </Control>
687
688        <Control Id="ActionProgress95" Type="ProgressBar"
689                  X="59" Y="113" Width="275" Height="12"
690                  ProgressBlocks="yes" Text="Progress done">
691          <Subscribe Event="InstallFiles" Attribute="Progress" />
692          <Subscribe Event="MoveFiles" Attribute="Progress" />
693          <Subscribe Event="RemoveFiles" Attribute="Progress" />
694          <Subscribe Event="RemoveRegistryValues" Attribute="Progress" />
695          <Subscribe Event="WriteIniValues" Attribute="Progress" />
696          <Subscribe Event="WriteRegistryValues" Attribute="Progress" />
697          <Subscribe Event="UnmoveFiles" Attribute="Progress" />
698          <Subscribe Event="AdminInstallFinalize" Attribute="Progress" />
699          <Subscribe Event="SetProgress" Attribute="Progress" />
700        </Control>
701      </Dialog>
702')
703
704<!--
705  -  Takes two extra parameters (in addition to the usual dialog parms)
706  -  4th: a short product name, like "Berkeley DB"
707  -  5th: a description of where to find online info, like "on www.xyz.com"
708  -->
709m4_define(`DIALOG_SUCCESS', `
710      <Dialog Id="`$1'" DIALOGPROP>
711        BOTTOMSTRIPE()
712        NEXTBUTTON_GENERIC(Finish, Cancel="yes",
713          <Publish Event="EndDialog" Value="Exit">
714            <![CDATA[1]]></Publish>
715        )
716        CANCELBUTTON_GENERIC(Cancel, Disabled="yes", )
717        BACKBUTTON_DISABLED()
718
719        TOPSTRIPE(44, `Installed', `[ProductName] is now installed.')
720
721        TEXTCONTROL(InstallSuccessText, 80,
722`Please go to http://forums.oracle.com/forums/category.jspa?categoryID=18 for any technical issues or contact berkeleydb-info_us@oracle.com for sales and licensing questions.
723
724Information about this product can also be found $5.
725
726Thank you for installing [ProductName].')
727
728        <Control Id="Image" Type="Bitmap" Text="OracleLogo"
729                  X="0" Width="DIALOG_WIDTH" FULLHEIGHT TabSkip="no" />
730
731      </Dialog>
732')
733
734
735m4_define(`DIALOG_ADMIN_INTERRUPTED', `
736      <Dialog Id="`$1'" DIALOGPROP>
737        TOPSTRIPE(44, `Interrupted',
738`The installer was interrupted before [ProductName] could be completely installed.')
739
740        BOTTOMSTRIPE()
741        NEXTBUTTON_GENERIC(Finish, Cancel="yes",
742          <Publish Event="EndDialog" Value="Exit">
743            <![CDATA[1]]></Publish>
744          <Condition Action="default">
745            <![CDATA[NOT UpdateStarted]]></Condition>
746        )
747        CANCELBUTTON_GENERIC(Cancel, Disabled="yes",
748          <Publish Property="Suspend" Value="1"><![CDATA[1]]></Publish>
749          <Publish Event="EndDialog" Value="`$2'"><![CDATA[1]]></Publish>
750          <Condition Action="disable"><![CDATA[NOT UpdateStarted]]></Condition>
751          <Condition Action="enable"><![CDATA[UpdateStarted]]></Condition>
752        )
753        BACKBUTTON_GENERIC(Back, Disabled="yes",
754          <Publish Property="Suspend" Value="{}"><![CDATA[1]]></Publish>
755          <Publish Event="EndDialog" Value="`$2'"><![CDATA[1]]></Publish>
756          <Condition Action="disable"><![CDATA[NOT UpdateStarted]]></Condition>
757          <Condition Action="enable"><![CDATA[UpdateStarted]]></Condition>
758          <Condition Action="default"><![CDATA[UpdateStarted]]></Condition>
759        )
760
761        <Control Id="NotModifiedText" Type="Text"
762                  X="20" Y="_YPOS" Width="228" Height="50" Transparent="yes">
763          <Text>Your system has not been modified.  To complete the installation later, please run the installer again.</Text>
764          <Condition Action="hide"><![CDATA[UpdateStarted]]></Condition>
765          <Condition Action="show"><![CDATA[NOT UpdateStarted]]></Condition>
766        </Control>
767
768        <Control Id="YesModifiedText" Type="Text"
769                  X="20" Y="_YPOS" Width="228" Height="50" Transparent="yes">
770          <Text>The product may be partially installed.  Any installed elements will be removed when you exit.</Text>
771          <Condition Action="hide"><![CDATA[NOT UpdateStarted]]></Condition>
772          <Condition Action="show"><![CDATA[UpdateStarted]]></Condition>
773        </Control>
774        INCY(30)
775
776        TEXTCONTROL(FinishText, 25, `Click Finish to exit the install.')
777
778        <Control Id="Image" Type="Bitmap"
779                  X="0" Width="DIALOG_WIDTH" PARTIALHEIGHT(168) Text="OracleLogo" />
780      </Dialog>
781')
782
783m4_define(`DIALOG_ADMIN_CANCEL', `
784
785      <Dialog Id="`$1'" Width="280" Height="90"
786              Title="[ProductName] - Installer" NoMinimize="yes">
787
788        SETY(20)
789        TEXTCONTROL(CancelText, 24,
790`Are you sure you want to cancel [ProductName] installation?')
791
792        <Control Id="YesButton" Type="PushButton"
793                  X="60" Y="60" Width="66" Height="17" Text="&amp;Yes">
794          <Publish Event="EndDialog" Value="Exit"><![CDATA[1]]></Publish>
795        </Control>
796
797        <Control Id="NoButton" Type="PushButton"
798                  X="130" Y="60" Width="66" Height="17"
799                  Default="yes" Cancel="yes" Text="&amp;No">
800          <Publish Event="EndDialog" Value="Return">
801                 <![CDATA[1]]></Publish>
802        </Control>
803
804      </Dialog>
805')
806
807m4_define(`DIALOG_ADMIN_NOSPACE', `
808      <Dialog Id="`$1'" DIALOGPROP>
809        TOPSTRIPE(44, `Out of Disk Space',
810`The disk does not have enough space for the selected features.')
811        BOTTOMSTRIPE()
812
813        CANCELBUTTON_GENERIC(OK, Default="yes" Cancel="yes",
814          <Publish Event="NewDialog" Value="`$2'">
815             <![CDATA[ACTION <> "ADMIN"]]></Publish>
816        )
817
818        TEXTCONTROL(NoSpaceText, 43,
819`The highlighted volumes (if any) do not have enough disk space for the currently selected features.  You can either remove files from the highlighted volumes, or choose to install fewer features, or choose a different destination drive.')
820
821        <Control Id="VolumeCostListControl" Type="VolumeCostList"
822                  X="23" Width="310" FULLHEIGHT
823                  Sunken="yes" Fixed="yes" Remote="yes">
824          <Text>{120}{70}{70}{70}{70}</Text>
825        </Control>
826      </Dialog>
827')
828