1<!-- $Id$
2 -
3 - Dbcorewix.in is the DB core WiX input file, and is used by
4 - s_winmsi to create dbcore.wxs (an input to WiX).
5 - Most everything here is pure 'WiX' syntax within XML,
6 - the exceptions are:
7 -    1) everything is pushed through the m4 preprocessor first.
8 -       this makes certain boilerplate actions in the UI tolerable.
9 -       We put all needed defines at the top of this file.
10 -    2) a very few identifiers beginning with WIX_DB_*
11 -       are predefined as m4 macros on the command line.
12 -       These are items that only the caller (s_winmsi) can know.
13 -
14 - M4 makes many things easier, but there are peculiarities.
15 - In particular, if you are using a macro with args, like
16 - TOPSTRIPE, note that *any* occurance of the characters "( ) ,"
17 - are interpreted by m4, even if they occur in an Xml comment or string.
18 - Remember this when editing this file!
19 -
20 - Beyond that, there is a lot to understand about WiX
21 - and how this file operates, to get started, look at
22 - various WiX tutorials, like:
23 -    http://www.ondotnet.com/pub/a/dotnet/2004/04/19/wix.html
24 -    http://blogs.msdn.com/robmen/archive/2004/04/05/107709.aspx
25 - Also view the lecture covered here:
26 -    http://blogs.msdn.com/robmen/archive/2004/09/23/233684.aspx
27 -
28 - Finally, understand that WiX is an XML layering above the concepts
29 - defined by the world of the MSI installer.  To really know how to do WiX,
30 - (and especially the UI), you need to understand the MSI installer.
31 - A key point is that MSI (and hence WiX) is not really procedural.
32 - MSI defines a number of tables (like Feature or CustomAction) in
33 - an internal database.  WiX merely specifies how to fill these tables,
34 - and the msiexec program merely cranks through the various tables,
35 - processing each row.  It is true that you can do procedural things
36 - via CustomActions, but to get them in order, you must specify columns
37 - in the table with things like After="SomeOtherRowId".
38 -
39 - See "About the User Interface" and subordinate documents:
40 -    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/about_the_user_interface.asp
41-->
42
43m4_include(WIX_DB_SHARED_WINMSIDIR/dbwix.m4)   <!-- Define common macros -->
44
45<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi">
46
47  <!-- The ???? stuff asks WiX to create a unique GUID for us -->
48  <Product Id='????????-????-????-????-????????????'
49   Name='Berkeley DB WIX_DB_VERSION' Version='WIX_DB_VERSION.0'
50   Manufacturer='Oracle Corporation' Language='1033'>
51
52    <!-- Store files as a compressed 'cabinet' embedded in the .MSI file. -->
53    <Package Id='????????-????-????-????-????????????'
54     Keywords="Embedded Database Datastore"
55     Description='Berkeley DB WIX_DB_VERSION'
56     Comments='includes sources and binaries' InstallerVersion='200'
57     Compressed='yes' Platforms="Intel"
58     Languages="1033" SummaryCodepage="1252" />
59
60    <Media Id='1' Cabinet='dbcore.cab' EmbedCab='yes' />
61
62    COMMON_PROPERTIES()
63
64    <!-- Declare properties for environment -->
65    WIX_DB_ENV_FEATURE_PROPS()
66
67    <Condition Message=
68       "To install [ProductName], you must be running Windows 2000 or Windows XP.">
69       <![CDATA[VersionNT>=500]]></Condition>
70
71    <Condition Message=
72      "You must have administrative access to install this product.">
73      NOT Priviledged
74    </Condition>
75
76    <Directory Id="TARGETDIR" Name="SourceDir">
77      <Directory Id="DesktopFolder" Name="." SourceName="." />
78      <Directory Id="FavoritesFolder" Name="." SourceName="." />
79
80      <Directory Id="ProgramFilesFolder" Name="." SourceName=".">
81        <Directory Id="OracleFolder" Name="Oracle" LongName="Oracle">
82          <Directory Id="INSTALLDIR" Name="WIX_DB_8CHAR_VERSION"
83                   LongName="Berkeley DB WIX_DB_VERSION">
84            <Directory Id="INSTALLUTIL" Name="instutil"
85                   LongName="installutil">
86            </Directory>
87
88
89            <!-- Note: these guids must be changed when an installer
90              -  for a new release is made available.
91              -
92              -  TODO: to play by the rules of components (see
93              -  http://blogs.msdn.com/robmen/archive/2003/10/18/56497.aspx,
94              -  "Component Rules 101" by Rob Mensching),
95              -  we should devise a strategy for ALL guids (remember
96              -  many are created by s_winmsi).  This should work:
97              -
98              -  Each guid is composed of three parts, like so:
99              -     PPPPPPPP-VVVV-VVVV-HHHH-HHHHHHHHHHHH
100              -  The P part is unique to the product, e.g.
101              -  the bdb core installer might always use 9A3FE019.
102              -  The V part is the version of the product, e.g.
103              -  4.2.37 might be translated as 0402-0025   # 25 is 37 in hex
104              -  The H part is a hash value created from the directory
105              -  that houses the component.  Like if the component for
106              -  the directory "bin/Debug" hashed to 1234567890abcdef,
107              -  then the H part is 1234-567890abcdef.
108              - 
109              -  This scheme guarantees that rebuilds of the installer
110              -  over the same release tree get the same GUIDs.
111              -  But for a different release tree (which *should* get
112              -  installed in a different directory, since install
113              -  directories are named by release number), we will get
114              -  completely different GUIDs.
115              -->
116            <Component Id="RequiredFiles"
117                   Guid="13E1DF48-903B-11D9-8BDE-F66BAD1E3F3A"
118                   KeyPath="yes" SharedDllRefCount="yes"
119                   Location="either" DiskId="1">
120
121              <File Id="LICENSE.txt" Name="LICENSE.txt"
122                    src="WIX_DB_SRCDIR\LICENSE" />
123              <File Id="README.txt" Name="README.txt"
124                    src="WIX_DB_SRCDIR\README" />
125	      <Registry Id="RootDir.RegistryVal" Root="HKLM"
126                   Key="SOFTWARE\Oracle\Berkeley DB\WIX_DB_VERSION"
127                   Name="RootDirectory" Value="[INSTALLDIR]" Type="string"
128                   Action="write" />
129              <CreateFolder />
130            </Component>
131
132            COMMON_COMPONENTS()
133
134            <!-- <Directory>, <Component> generated from files.in -->
135	    WIX_DB_DIRECTORY_STRUCTURE()
136
137          </Directory>
138        </Directory>
139      </Directory>
140      <Directory Id="ProgramMenuFolder" Name="." SourceName=".">
141        <Directory Id="BerkeleyDbMenu" Name="WIX_DB_8CHAR_VERSION"
142         LongName="Berkeley DB WIX_DB_VERSION" />
143      </Directory>
144    </Directory>
145
146    <!-- <File>, <Shortcut> generated from links.in -->
147    WIX_DB_LINKS()
148
149    COMMON_FEATURES(`Berkeley DB')
150
151    <!-- ================================================================ -->
152    <UI>
153
154      <Property Id="DefaultUIFont"><![CDATA[Tahoma8]]></Property>
155      <TextStyle Id="Tahoma8" FaceName="Tahoma" Size="8" />
156
157      DIALOG_WELCOME(MainWelcomeDlg, , ShowLicenseDlg)
158      DIALOG_LICENSE(ShowLicenseDlg, MainWelcomeDlg, TargetFolderDlg,
159                     `Berkeley DB')
160      DIALOG_TARGET(TargetFolderDlg, ShowLicenseDlg, FeatureSelectionDlg)
161      DIALOG_FEATURE(FeatureSelectionDlg, TargetFolderDlg, EnvVarDlg,
162                     `Debug libraries are needed for working C/C++ examples.')
163      DIALOG_ENVIRONMENT(EnvVarDlg, FeatureSelectionDlg, ReadyToInstallDlg)
164      DIALOG_READY(ReadyToInstallDlg, EnvVarDlg, )
165
166      DIALOG_PROGRESS(ShowProgressDlg, , )
167      DIALOG_SUCCESS(InstallSuccessDlg, , , `Berkeley DB',
168                     `Oracle Technology Network Berkeley DB forum')
169
170
171      <!-- Here are extra admin dialogs -->
172      DIALOG_ADMIN_CANCEL(CancelInstallerDlg)
173      DIALOG_ADMIN_NOSPACE(OutOfSpaceDlg, FeatureSelectionDlg)
174      DIALOG_ADMIN_INTERRUPTED(InstallErrorDlg, Return)
175      DIALOG_ADMIN_INTERRUPTED(InstallCancelledDlg, Exit)
176
177
178      <!-- This sequence tells MSI what to do when (at the highest level) -->
179      <InstallUISequence>
180        <Show Dialog="InstallErrorDlg" OnExit="error" />
181        <Show Dialog="InstallCancelledDlg" OnExit="cancel" />
182        <Show Dialog="InstallSuccessDlg" OnExit="success" />
183        <Show Dialog="MainWelcomeDlg" After="CostFinalize" />
184        <Show Dialog="ShowProgressDlg" After="MainWelcomeDlg" />
185      </InstallUISequence>
186
187      COMMON_UI_TEXT()
188      <Property Id="MaxInstallSize">49 MB</Property>
189
190
191    </UI>
192
193    COMMON_EXECUTE_SEQUENCE()
194
195  </Product>
196</Wix>
197