summaryrefslogtreecommitdiff
path: root/db-4.8.30/dist/winmsi
diff options
context:
space:
mode:
Diffstat (limited to 'db-4.8.30/dist/winmsi')
-rw-r--r--db-4.8.30/dist/winmsi/dbcorewix.in196
-rw-r--r--db-4.8.30/dist/winmsi/dbvarsbat.in25
-rw-r--r--db-4.8.30/dist/winmsi/dbwix.m4827
-rw-r--r--db-4.8.30/dist/winmsi/environment.in23
-rw-r--r--db-4.8.30/dist/winmsi/features.in35
-rw-r--r--db-4.8.30/dist/winmsi/files.in100
-rw-r--r--db-4.8.30/dist/winmsi/images/caticon.ibdbin0 -> 1406 bytes
-rw-r--r--db-4.8.30/dist/winmsi/images/foldernew.ibdbin0 -> 1078 bytes
-rw-r--r--db-4.8.30/dist/winmsi/images/folderup.ibdbin0 -> 1078 bytes
-rw-r--r--db-4.8.30/dist/winmsi/images/oracle.jpgbin0 -> 10496 bytes
-rw-r--r--db-4.8.30/dist/winmsi/images/topstripe.ibdbin0 -> 1827 bytes
-rw-r--r--db-4.8.30/dist/winmsi/images/webicon.icobin0 -> 318 bytes
-rw-r--r--db-4.8.30/dist/winmsi/links.in17
-rw-r--r--db-4.8.30/dist/winmsi/s_winmsi.fcn1473
-rw-r--r--db-4.8.30/dist/winmsi/winbuild.bat97
15 files changed, 2793 insertions, 0 deletions
diff --git a/db-4.8.30/dist/winmsi/dbcorewix.in b/db-4.8.30/dist/winmsi/dbcorewix.in
new file mode 100644
index 0000000..44137fe
--- /dev/null
+++ b/db-4.8.30/dist/winmsi/dbcorewix.in
@@ -0,0 +1,196 @@
+<!-- $Id$
+ -
+ - Dbcorewix.in is the DB core WiX input file, and is used by
+ - s_winmsi to create dbcore.wxs (an input to WiX).
+ - Most everything here is pure 'WiX' syntax within XML,
+ - the exceptions are:
+ - 1) everything is pushed through the m4 preprocessor first.
+ - this makes certain boilerplate actions in the UI tolerable.
+ - We put all needed defines at the top of this file.
+ - 2) a very few identifiers beginning with WIX_DB_*
+ - are predefined as m4 macros on the command line.
+ - These are items that only the caller (s_winmsi) can know.
+ -
+ - M4 makes many things easier, but there are peculiarities.
+ - In particular, if you are using a macro with args, like
+ - TOPSTRIPE, note that *any* occurance of the characters "( ) ,"
+ - are interpreted by m4, even if they occur in an Xml comment or string.
+ - Remember this when editing this file!
+ -
+ - Beyond that, there is a lot to understand about WiX
+ - and how this file operates, to get started, look at
+ - various WiX tutorials, like:
+ - http://www.ondotnet.com/pub/a/dotnet/2004/04/19/wix.html
+ - http://blogs.msdn.com/robmen/archive/2004/04/05/107709.aspx
+ - Also view the lecture covered here:
+ - http://blogs.msdn.com/robmen/archive/2004/09/23/233684.aspx
+ -
+ - Finally, understand that WiX is an XML layering above the concepts
+ - defined by the world of the MSI installer. To really know how to do WiX,
+ - (and especially the UI), you need to understand the MSI installer.
+ - A key point is that MSI (and hence WiX) is not really procedural.
+ - MSI defines a number of tables (like Feature or CustomAction) in
+ - an internal database. WiX merely specifies how to fill these tables,
+ - and the msiexec program merely cranks through the various tables,
+ - processing each row. It is true that you can do procedural things
+ - via CustomActions, but to get them in order, you must specify columns
+ - in the table with things like After="SomeOtherRowId".
+ -
+ - See "About the User Interface" and subordinate documents:
+ - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/about_the_user_interface.asp
+-->
+
+m4_include(WIX_DB_SHARED_WINMSIDIR/dbwix.m4) <!-- Define common macros -->
+
+<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi">
+
+ <!-- The ???? stuff asks WiX to create a unique GUID for us -->
+ <Product Id='????????-????-????-????-????????????'
+ Name='Berkeley DB WIX_DB_VERSION' Version='WIX_DB_VERSION.0'
+ Manufacturer='Oracle Corporation' Language='1033'>
+
+ <!-- Store files as a compressed 'cabinet' embedded in the .MSI file. -->
+ <Package Id='????????-????-????-????-????????????'
+ Keywords="Embedded Database Datastore"
+ Description='Berkeley DB WIX_DB_VERSION'
+ Comments='includes sources and binaries' InstallerVersion='200'
+ Compressed='yes' Platforms="Intel"
+ Languages="1033" SummaryCodepage="1252" />
+
+ <Media Id='1' Cabinet='dbcore.cab' EmbedCab='yes' />
+
+ COMMON_PROPERTIES()
+
+ <!-- Declare properties for environment -->
+ WIX_DB_ENV_FEATURE_PROPS()
+
+ <Condition Message=
+ "To install [ProductName], you must be running Windows 2000 or Windows XP.">
+ <![CDATA[VersionNT>=500]]></Condition>
+
+ <Condition Message=
+ "You must have administrative access to install this product.">
+ NOT Priviledged
+ </Condition>
+
+ <Directory Id="TARGETDIR" Name="SourceDir">
+ <Directory Id="DesktopFolder" Name="." SourceName="." />
+ <Directory Id="FavoritesFolder" Name="." SourceName="." />
+
+ <Directory Id="ProgramFilesFolder" Name="." SourceName=".">
+ <Directory Id="OracleFolder" Name="Oracle" LongName="Oracle">
+ <Directory Id="INSTALLDIR" Name="WIX_DB_8CHAR_VERSION"
+ LongName="Berkeley DB WIX_DB_VERSION">
+ <Directory Id="INSTALLUTIL" Name="instutil"
+ LongName="installutil">
+ </Directory>
+
+
+ <!-- Note: these guids must be changed when an installer
+ - for a new release is made available.
+ -
+ - TODO: to play by the rules of components (see
+ - http://blogs.msdn.com/robmen/archive/2003/10/18/56497.aspx,
+ - "Component Rules 101" by Rob Mensching),
+ - we should devise a strategy for ALL guids (remember
+ - many are created by s_winmsi). This should work:
+ -
+ - Each guid is composed of three parts, like so:
+ - PPPPPPPP-VVVV-VVVV-HHHH-HHHHHHHHHHHH
+ - The P part is unique to the product, e.g.
+ - the bdb core installer might always use 9A3FE019.
+ - The V part is the version of the product, e.g.
+ - 4.2.37 might be translated as 0402-0025 # 25 is 37 in hex
+ - The H part is a hash value created from the directory
+ - that houses the component. Like if the component for
+ - the directory "bin/Debug" hashed to 1234567890abcdef,
+ - then the H part is 1234-567890abcdef.
+ -
+ - This scheme guarantees that rebuilds of the installer
+ - over the same release tree get the same GUIDs.
+ - But for a different release tree (which *should* get
+ - installed in a different directory, since install
+ - directories are named by release number), we will get
+ - completely different GUIDs.
+ -->
+ <Component Id="RequiredFiles"
+ Guid="13E1DF48-903B-11D9-8BDE-F66BAD1E3F3A"
+ KeyPath="yes" SharedDllRefCount="yes"
+ Location="either" DiskId="1">
+
+ <File Id="LICENSE.txt" Name="LICENSE.txt"
+ src="WIX_DB_SRCDIR\LICENSE" />
+ <File Id="README.txt" Name="README.txt"
+ src="WIX_DB_SRCDIR\README" />
+ <Registry Id="RootDir.RegistryVal" Root="HKLM"
+ Key="SOFTWARE\Oracle\Berkeley DB\WIX_DB_VERSION"
+ Name="RootDirectory" Value="[INSTALLDIR]" Type="string"
+ Action="write" />
+ <CreateFolder />
+ </Component>
+
+ COMMON_COMPONENTS()
+
+ <!-- <Directory>, <Component> generated from files.in -->
+ WIX_DB_DIRECTORY_STRUCTURE()
+
+ </Directory>
+ </Directory>
+ </Directory>
+ <Directory Id="ProgramMenuFolder" Name="." SourceName=".">
+ <Directory Id="BerkeleyDbMenu" Name="WIX_DB_8CHAR_VERSION"
+ LongName="Berkeley DB WIX_DB_VERSION" />
+ </Directory>
+ </Directory>
+
+ <!-- <File>, <Shortcut> generated from links.in -->
+ WIX_DB_LINKS()
+
+ COMMON_FEATURES(`Berkeley DB')
+
+ <!-- ================================================================ -->
+ <UI>
+
+ <Property Id="DefaultUIFont"><![CDATA[Tahoma8]]></Property>
+ <TextStyle Id="Tahoma8" FaceName="Tahoma" Size="8" />
+
+ DIALOG_WELCOME(MainWelcomeDlg, , ShowLicenseDlg)
+ DIALOG_LICENSE(ShowLicenseDlg, MainWelcomeDlg, TargetFolderDlg,
+ `Berkeley DB')
+ DIALOG_TARGET(TargetFolderDlg, ShowLicenseDlg, FeatureSelectionDlg)
+ DIALOG_FEATURE(FeatureSelectionDlg, TargetFolderDlg, EnvVarDlg,
+ `Debug libraries are needed for working C/C++ examples.')
+ DIALOG_ENVIRONMENT(EnvVarDlg, FeatureSelectionDlg, ReadyToInstallDlg)
+ DIALOG_READY(ReadyToInstallDlg, EnvVarDlg, )
+
+ DIALOG_PROGRESS(ShowProgressDlg, , )
+ DIALOG_SUCCESS(InstallSuccessDlg, , , `Berkeley DB',
+ `Oracle Technology Network Berkeley DB forum')
+
+
+ <!-- Here are extra admin dialogs -->
+ DIALOG_ADMIN_CANCEL(CancelInstallerDlg)
+ DIALOG_ADMIN_NOSPACE(OutOfSpaceDlg, FeatureSelectionDlg)
+ DIALOG_ADMIN_INTERRUPTED(InstallErrorDlg, Return)
+ DIALOG_ADMIN_INTERRUPTED(InstallCancelledDlg, Exit)
+
+
+ <!-- This sequence tells MSI what to do when (at the highest level) -->
+ <InstallUISequence>
+ <Show Dialog="InstallErrorDlg" OnExit="error" />
+ <Show Dialog="InstallCancelledDlg" OnExit="cancel" />
+ <Show Dialog="InstallSuccessDlg" OnExit="success" />
+ <Show Dialog="MainWelcomeDlg" After="CostFinalize" />
+ <Show Dialog="ShowProgressDlg" After="MainWelcomeDlg" />
+ </InstallUISequence>
+
+ COMMON_UI_TEXT()
+ <Property Id="MaxInstallSize">49 MB</Property>
+
+
+ </UI>
+
+ COMMON_EXECUTE_SEQUENCE()
+
+ </Product>
+</Wix>
diff --git a/db-4.8.30/dist/winmsi/dbvarsbat.in b/db-4.8.30/dist/winmsi/dbvarsbat.in
new file mode 100644
index 0000000..cd1cf8f
--- /dev/null
+++ b/db-4.8.30/dist/winmsi/dbvarsbat.in
@@ -0,0 +1,25 @@
+@echo off
+
+:: $Id$
+:: This file sets the environment variables needed to run Berkeley DB.
+
+set DBROOTDIR=
+for /F "tokens=3 delims= " %%A in ('REG QUERY "HKLM\SOFTWARE\Oracle\Berkeley DB\WIX_DB_VERSION" /v RootDirectory') do set DBROOTDIR=%%A
+if ERRORLEVEL 2 goto MISSING
+if not defined DBROOTDIR goto MISSING
+
+echo Setting environment variables for Berkeley DB, installed in %DBROOTDIR%
+
+set PATH=%DBROOTDIR%\bin;%DBROOTDIR%\bin\debug;%PATH%
+set CLASSPATH=%CLASSPATH%;%DBROOTDIR%\jar\debug\db.jar;%DBROOTDIR%\jar\debug\dbexamples.jar;%CLASSPATH%;%DBROOTDIR%\jar\db.jar;%DBROOTDIR%\jar\dbexamples.jar
+goto END
+
+:MISSING
+echo
+echo NOTE:
+echo The Berkeley DB version could not be determined.
+echo If you are running on Windows 2000, make sure the
+echo REG.EXE program is installed from the Tools disk"
+echo
+
+:END
diff --git a/db-4.8.30/dist/winmsi/dbwix.m4 b/db-4.8.30/dist/winmsi/dbwix.m4
new file mode 100644
index 0000000..d7ec90c
--- /dev/null
+++ b/db-4.8.30/dist/winmsi/dbwix.m4
@@ -0,0 +1,827 @@
+<!-- $Id$
+ - This file is included by WiX input files to define m4 macros.
+ - m4 is tricky. It has NO notion of XML comments, so
+ - take care using these names in comments after they are defined,
+ - since they will be expanded (probably what you don't want).
+ -
+ - Note that this file is shared by multiple installers.
+ - If you want to change a definition to customize an individual project,
+ - consider redefining the macro in a local file.
+ -->
+
+<!-- Some basic UI characteristics -->
+m4_define(`DIALOG_WIDTH', `390')
+m4_define(`DIALOG_HEIGHT', `320')
+m4_define(`BOTTOMSTRIPE_Y', `m4_eval(DIALOG_HEIGHT-32)')
+m4_define(`NAVBUTTON_Y', `m4_eval(DIALOG_HEIGHT-23)')
+m4_define(`NAVBUTTON_DIM', `X="`$1'" Y="NAVBUTTON_Y" Width="66" Height="17"')
+
+<!-- _YPOS is a running total of the current Y position -->
+m4_define(`_YPOS', `0')
+m4_define(`SETY', `m4_define(`_YPOS', `$1')')
+m4_define(`INCY', `SETY(m4_eval(_YPOS+(`$1')))')
+
+<!-- PARTIALHEIGHT(yheight [, gap=10 ]) -->
+m4_define(`PARTIALHEIGHT', `Y="_YPOS" Height="`$1'" INCY(`$1') INCY(_GETGAP(`$2'))')
+m4_define(`_GETGAP', `m4_ifelse(`',`$1', 10, `$1')')
+m4_define(`FULLHEIGHT', `Y="_YPOS" Height="m4_eval(BOTTOMSTRIPE_Y - _YPOS - 10)"')
+
+<!-- BOTTOM_Y: bottom of the usable area before nav buttons -->
+m4_define(`BOTTOM_Y', `m4_eval(BOTTOMSTRIPE_Y - 10)')
+
+m4_define(`DIALOGPROP', `Width="DIALOG_WIDTH" Height="DIALOG_HEIGHT"
+ Title="[ProductName] - Installer" NoMinimize="yes"')
+
+m4_define(`TOPSTRIPE', `
+ SETY(`$1')
+ INCY(10)
+<!-- stripe bitmap removed for now until we get better quality bitmaps.
+ <Control Id="TopStripe" Type="Bitmap"
+ X="0" Y="0" Width="DIALOG_WIDTH" Height="`$1'" Text="Stripe" />
+-->
+ <Control Id="TopStripeBorder" Type="Line"
+ X="0" Y="`$1'" Width="DIALOG_WIDTH" Height="0" />
+ <Control Id="TopTitle" Type="Text"
+ X="8" Y="6" Width="292" Height="25" Transparent="yes">
+ <Text>{&amp;MSSansBold8}`$2'</Text>
+ </Control>
+ <Control Id="TopText" Type="Text"
+ X="16" Y="23" Width="m4_eval(DIALOG_WIDTH-34)"
+ Height="m4_eval(`$1' - 19)" Transparent="yes">
+ <Text>`$3'</Text>
+ </Control>')
+
+m4_define(`TEXTCONTROL', `
+ <Control Id="`$1'" Type="Text"
+ X="20" Y="_YPOS" Width="m4_eval(DIALOG_WIDTH-42)" Height="`$2'">
+ <Text>`$3'</Text>
+ </Control>
+ INCY(`$2')')
+
+<!-- TEXTCONTROL2 (name,height,text). No newline -->
+m4_define(`TEXTCONTROL2', `
+ <Control Id="`$1'" Type="Text"
+ X="20" Y="_YPOS" Width="m4_eval(DIALOG_WIDTH-42)" Height="`$2'" Transparent="yes">
+ <Text>`$3'</Text>
+ </Control>')
+
+m4_define(`BOTTOMSTRIPE', `
+ <Control Id="BottomStripeBorder" Type="Line"
+ X="0" Y="BOTTOMSTRIPE_Y" Width="DIALOG_WIDTH" Height="0" />')
+
+m4_define(`NEWDIALOGEVENT', `
+ <Publish Event="NewDialog" Value="`$1'">
+ <![CDATA[1]]>
+ </Publish>')
+
+m4_define(`SPAWNDIALOGEVENT', `
+ <Publish Event="SpawnDialog" Value="`$1'">
+ <![CDATA[1]]>
+ </Publish>')
+
+<!-- use an arrow only if the text is Back, like this: "< Back" -->
+m4_define(`BACKBUTTON_GENERIC', `
+ <Control Id="`$1'" Type="PushButton"
+ NAVBUTTON_DIM(170)
+ Text="m4_ifelse(Back,`$1',&lt; )&amp;`$1'" `$2'>
+ `$3'
+ </Control>')
+
+<!-- use an arrow only if the text is Next, like this: "Next >" -->
+m4_define(`NEXTBUTTON_GENERIC', `
+ <Control Id="`$1'" Type="PushButton"
+ NAVBUTTON_DIM(236)
+ Default="yes" Text="&amp;`$1'm4_ifelse(Next,`$1', &gt;)" `$2'>
+ `$3'
+ </Control>')
+
+m4_define(`CANCELBUTTON_GENERIC', `
+ <Control Id="`$1'" Type="PushButton"
+ NAVBUTTON_DIM(308)
+ Text="`$1'" `$2'>
+ `$3'
+ </Control>')
+
+m4_define(`NEXTBUTTON_NOTDEFAULT', `
+ <Control Id="`$1'" Type="PushButton"
+ NAVBUTTON_DIM(236)
+ Default="no" Text="&amp;`$1'm4_ifelse(Next,`$1', &gt;)" `$2'>
+ `$3'
+ </Control>')
+
+<!-- typical usages -->
+m4_define(`BACKBUTTON_DISABLED', `BACKBUTTON_GENERIC(Back, Disabled="yes")')
+m4_define(`BACKBUTTON', `BACKBUTTON_GENERIC(Back, , NEWDIALOGEVENT(`$1'))')
+m4_define(`NEXTBUTTON_DISABLED', `NEXTBUTTON_GENERIC(Next, Disabled="yes")')
+m4_define(`NEXTBUTTON', `NEXTBUTTON_GENERIC(Next, , NEWDIALOGEVENT(`$1'))')
+m4_define(`CANCELBUTTON', `CANCELBUTTON_GENERIC(Cancel, Cancel="yes",
+ SPAWNDIALOGEVENT(CancelInstallerDlg))')
+
+<!-- a little (imperfect) magic to create some unique GUIDs. -->
+m4_define(`_GUIDSUFFIX', `10000000')
+m4_define(`_SETGUID', `m4_define(`_GUIDSUFFIX', `$1')')
+m4_define(`_GUIDINC', `_SETGUID(m4_eval(_GUIDSUFFIX+1))')
+m4_define(`GUID_CREATE_UNIQUE', `_GUIDINC()WIX_DB_GUID_PREFIX()`'_GUIDSUFFIX()')
+
+<!-- These three defines are data values, used by GUID_CREATE_PERSISTENT -->
+m4_define(`_WIXDB_PRODUCT', WIX_DB_PRODUCT_NAME)
+m4_define(`_WIXDB_VERSION', WIX_DB_VERSION)
+m4_define(`_WIXDB_CURDIR', `unknown')
+m4_define(`_WIXDB_CURFILE', `unknown')
+m4_define(`_WIXDB_SUBDIR', `')
+
+<!-- These defines set the data values above -->
+m4_define(`WIX_DB_SET_PRODUCT', `m4_define(`_WIXDB_PRODUCT', `$1')')
+m4_define(`WIX_DB_SET_VERSION', `m4_define(`_WIXDB_VERSION', `$1')')
+m4_define(`WIX_DB_SET_CURDIR', `m4_define(`_WIXDB_CURDIR', `$1')')
+m4_define(`WIX_DB_SET_CURFILE', `m4_define(`_WIXDB_CURFILE', `$1')')
+m4_define(`WIX_DB_SET_SUBDIR', `m4_define(`_WIXDB_SUBDIR', `$1')')
+
+m4_define(`_LASTCHAR', `m4_substr(`$1',m4_eval(m4_len(`$1')-1))')
+m4_define(`_LOPCHAR', `m4_substr(`$1',0,m4_eval(m4_len(`$1')-1))')
+m4_define(`_CHOPNAME', `m4_ifelse(_LASTCHAR(`$1'),/,`$1',`_CHOPNAME(_LOPCHAR(`$1'))')')
+m4_define(`WIX_DB_BEGIN_SUBDIR', `WIX_DB_SET_SUBDIR(_WIXDB_SUBDIR/`$1')')
+m4_define(`WIX_DB_END_SUBDIR', `WIX_DB_SET_SUBDIR(_LOPCHAR(_CHOPNAME(_WIXDB_SUBDIR)))')
+m4_define(`WIX_DB_CLEAR_SUBDIR', `WIX_DB_SET_SUBDIR()')
+
+<!-- Create a GUID from the current product, directory, file -->
+m4_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/")')
+
+m4_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')
+
+m4_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.')
+
+m4_define(`COMMON_PROPERTIES', `
+ <Property Id="ApplicationUsers"><![CDATA[AnyUser]]></Property>
+ <Property Id="LicenseType"><![CDATA[Open]]></Property>
+
+ <!-- The ARP* properties affect the Add/Remove Programs dialog -->
+ <Property Id="ARPURLINFOABOUT"><![CDATA[http://www.oracle.com]]></Property>
+ <Property Id="ARPCONTACT"><![CDATA[berkeleydb-info_us@oracle.com]]></Property>
+ <Property Id="ARPNOMODIFY"><![CDATA[1]]></Property>
+ <Property Id="ARPNOREPAIR"><![CDATA[1]]></Property>
+ <!-- TODO: this icon does not work here -->
+ <Property Id="ARPPRODUCTION"><![CDATA[IconWeb]]></Property>
+
+ <Property Id="INSTALLLEVEL"><![CDATA[200]]></Property>
+ <Property Id="FullOrCustom"><![CDATA[Full]]></Property>
+
+ <Property Id="DiscussionCheck" Hidden="yes"><![CDATA[yes]]></Property>
+ <Property Id="AnnouncementsCheck" Hidden="yes"><![CDATA[yes]]></Property>
+ <Property Id="NewsletterCheck" Hidden="yes"><![CDATA[yes]]></Property>
+ <Property Id="EmailAddress" Hidden="yes"></Property>
+ <Property Id="SalesContactCheck" Hidden="yes"><![CDATA[yes]]></Property>
+ <Property Id="EnvironmentSetCheck" Hidden="yes"><![CDATA[1]]></Property>
+ <Property Id="EnvironmentGenCheck" Hidden="yes"><![CDATA[1]]></Property>
+<!-- (PBR) We use DebugCheck to track the state of the debug checkbox -->
+ <Property Id="DebugCheck" Hidden="yes"><![CDATA[yes]]></Property>
+
+ <!-- Part of the build process creates a program instenv.exe
+ - that is installed into InstUtil and used only by the installer.
+ - When a user wants to generate a file with environment vars,
+ - we launch instreg and that program creates it.
+ -
+ - The final location of the instenv.exe program is not known
+ - when we create this property, we set the real value of the
+ - property later.
+ -->
+
+ <Property Id="InstEnvironmentProgram"><![CDATA[0]]></Property>
+<!-- TODO: should not have to hardwire PATH and CLASSPATH here -->
+ <CustomAction Id="InstEnvironment" Property="InstEnvironmentProgram"
+ ExeCommand="[INSTALLDIR]\dbvars.bat PATH=[PATHEscValue] CLASSPATH=[CLASSPATHEscValue]" Return="asyncNoWait"/>
+
+ <!-- Some properties to aid in debugging.
+ - Sometimes creating a msg dialog is the easiest way to see the
+ - value of a property. To make this work when you hit the next
+ - button, add this to your NEXTBUTTON__GENERIC call:
+
+ <Publish Event="DoAction" Value="InstDebug"><![CDATA[1]]></Publish>
+
+ -->
+ <Property Id="DebugUserId">dda</Property>
+ <Property Id="DebugShowProgram">msg.exe</Property>
+
+ <!-- tweek me as needed -->
+ <CustomAction Id="InstDebug" Property="DebugShowProgram"
+ ExeCommand="[DebugUserId] InstEnvironmentProgram=[InstEnvironmentProgram]= EnvironmentGenCheck=[EnvironmentGenCheck]= AlwaysInstall=[!AlwaysInstall]=" Return="asyncNoWait" />
+
+ <Property Id="NULL" Hidden="yes"></Property>
+ <Property Id="FeatureList" Hidden="yes"></Property>
+ <Property Id="DoInstallDebug" Hidden="yes">yes</Property>
+ <Property Id="DoInstallEnvironment" Hidden="yes">yes</Property>
+
+ <Binary Id="OracleLogo" src="WIX_DB_IMAGEDIR\oracle.jpg" />
+ <Binary Id="Stripe" src="WIX_DB_IMAGEDIR\topstripe.ibd" />
+
+ <!-- TODO: does not work yet -->
+ <Binary Id="IconWeb" src="WIX_DB_IMAGEDIR\caticon.ibd" />
+
+ <!-- These are 16x16 Windows ico files -->
+ <Binary Id="IconCreateDir" src="WIX_DB_IMAGEDIR\foldernew.ibd" />
+ <Binary Id="IconUp" src="WIX_DB_IMAGEDIR\folderup.ibd" />
+
+')
+
+m4_define(`COMMON_COMPONENTS', `
+ <Component Id="RequiredCommonFiles"
+ Guid="545CFE00-93D7-11D9-EAD3-F63F68BDEB1A"
+ KeyPath="yes" SharedDllRefCount="yes"
+ Location="either" DiskId="1">
+ <Registry Id="Ext.Registry" Root="HKCR"
+ Key=".bdbsc"
+ Value="Oracle.InformationalShortcut"
+ Type="string" Action="write" />
+ <Registry Id="Name.Registry" Root="HKCR"
+ Key="Oracle.InformationalShortcut"
+ Value="Oracle Corporation Informational Shortcut"
+ Type="string" Action="write" />
+ <Registry Id="Tip.Registry" Root="HKCR"
+ Key="Oracle.InformationalShortcut" Name="InfoTip"
+ Value="Oracle Corporation Informational Shortcut"
+ Type="string" Action="write" />
+ <Registry Id="NoShow.Registry" Root="HKCR"
+ Key="Oracle.InformationalShortcut" Name="NeverShowExt"
+ Type="string" Action="write" />
+ <Registry Id="Icon.Registry" Root="HKCR"
+ Key="Oracle.InformationalShortcut\DefaultIcon"
+ Value="[INSTALLDIR]\installutil\webicon.ico"
+ Type="string" Action="write" />
+ <Registry Id="Command.Registry" Root="HKCR"
+ Key="Oracle.InformationalShortcut\shell\open\command"
+ Value="rundll32.exe shdocvw.dll,OpenURL %1"
+ Type="string" Action="write" />
+ <Registry Id="Explore.Registry" Root="HKCU"
+ Key="Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bdbsc\OpenWithProgIds\Oracle.InformationalShortcut"
+ Action="write" />
+ <Registry Id="HklmExt.Registry" Root="HKLM"
+ Key="Software\Classes\.bdbsc"
+ Value="Oracle.InformationalShortcut"
+ Type="string" Action="write" />
+ <Registry Id="HklmCommand.Registry" Root="HKLM"
+ Key="Software\Classes\Oracle.InformationalShortcut\shell\open\command"
+ Value="rundll32.exe shdocvw.dll,OpenURL %1"
+ Type="string" Action="write" />
+ </Component>
+')
+
+m4_define(`COMMON_UI_TEXT', `
+ <!-- These are needed to show various canned text -->
+ <UIText Id="AbsentPath" />
+ <UIText Id="NewFolder">Fldr|New Folder</UIText>
+ <UIText Id="bytes">bytes</UIText>
+ <UIText Id="GB">GB</UIText>
+ <UIText Id="KB">KB</UIText>
+ <UIText Id="MB">MB</UIText>
+ <UIText Id="MenuAbsent">This feature will not be installed.</UIText>
+ <UIText Id="MenuAllLocal">This feature, and all subfeatures, will be installed.</UIText>
+ <UIText Id="MenuLocal">This feature will be installed.</UIText>
+ <UIText Id="SelAbsentAbsent">This feature will remain uninstalled.</UIText>
+ <UIText Id="SelAbsentLocal">This feature will be installed.</UIText>
+ <UIText Id="SelChildCostNeg">This feature frees up [1] on your hard drive.</UIText>
+ <UIText Id="SelChildCostPos">This feature requires [1] on your hard drive.</UIText>
+ <UIText Id="SelCostPending">Compiling cost for this feature...</UIText>
+ <UIText Id="SelLocalAbsent">This feature will be completely removed.</UIText>
+ <UIText Id="SelLocalLocal">This feature will remain installed.</UIText>
+ <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>
+ <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>
+ <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>
+ <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>
+ <UIText Id="TimeRemaining">Time remaining: {[1] min }[2] sec</UIText>
+ <UIText Id="VolumeCostAvailable">Available</UIText>
+ <UIText Id="VolumeCostDifference">Differences</UIText>
+ <UIText Id="VolumeCostRequired">Required</UIText>
+ <UIText Id="VolumeCostSize">Disk Size</UIText>
+ <UIText Id="VolumeCostVolume">Volume</UIText>
+')
+
+m4_define(`COMMON_FEATURES', `
+ <!-- Here we list all the features to be installed.
+ - There is one canned feature, the rest of the
+ - features come from features.in, by way of a file
+ - that gets included.
+ -->
+ <Feature Id="AlwaysInstall" Title="Always Install"
+ Description="`$1'" Display="hidden" Level="1"
+ AllowAdvertise="no"
+ ConfigurableDirectory="INSTALLDIR" Absent="disallow">
+ <ComponentRef Id="RequiredFiles" />
+ <ComponentRef Id="RequiredCommonFiles" />
+ </Feature>
+
+ <!-- <Feature>, <ComponentRef> generated from {features,files}.in -->
+ WIX_DB_FEATURE_STRUCTURE()
+')
+
+m4_define(`COMMON_EXECUTE_SEQUENCE', `
+ <!-- TODO: fix comment
+ - We modify the execute sequence to insert some custom actions:
+ - we want the instenv program to run during install (after files
+ - are installed), and during uninstall (before files are removed).
+ - We set a condition on the custom actions to make this happen.
+ - The "!ident" notation indicates the current action for a feature
+ - with that identifier. We use the AlwaysInstall feature because
+ - it is always present in our feature list. A value of 3 means
+ - it is being installed locally, 1 means it is being uninstalled.
+ - TODO: removed for now
+ <Custom Action="InstEnvironment" After="PublishProduct">
+ <![CDATA[Not Installed]]></Custom>
+ -->
+ <InstallExecuteSequence>
+ </InstallExecuteSequence>
+')
+
+<!--
+ - Here are macros for each dialog that is shared by the installers.
+ - The idea for any customization is that each installer
+ - could potentially override a particular dialog.
+ - However, if it is feasible to share code, any of these
+ - dialogs could be parameterized further.
+ -
+ - In general, these macros have 3 parameters.
+ - The first is the id name of the dialog.
+ - The second is the id of the previous dialog (for the Back button).
+ - The third is the id of the next dialog (for the Next button).
+ -->
+m4_define(`DIALOG_WELCOME', `
+ <Dialog Id="`$1'" DIALOGPROP>
+ BOTTOMSTRIPE()
+ BACKBUTTON_DISABLED()
+ CANCELBUTTON()
+ NEXTBUTTON(`$3')
+
+ TOPSTRIPE(54, `Welcome',
+`The Installer will install [ProductName] on your computer.
+To continue, click Next.')
+
+ <Control Id="Logo" Type="Bitmap" Text="OracleLogo"
+ X="0" Width="DIALOG_WIDTH" PARTIALHEIGHT(168) />
+ </Dialog>
+')
+
+<!-- Takes a 4th parameter, a short product name, like "Berkeley DB" -->
+m4_define(`DIALOG_LICENSE', `
+ <RadioButtonGroup Property="LicenseType">
+ <RadioButton Value="Open"
+ X="0" Y="0" Width="310" Height="15"
+ Text="I qualify for the &amp;open source license shown above" />
+ <RadioButton Value="Commercial"
+ X="0" Y="15" Width="310" Height="15"
+ Text="I will need a co&amp;mmercial license when I ship my product" />
+ </RadioButtonGroup>
+
+ <Dialog Id="`$1'" DIALOGPROP>
+
+ TOPSTRIPE(84, `Open Source License', DB_LICENSE_INTRO(`$4'))
+ BOTTOMSTRIPE()
+ BACKBUTTON(`$2')
+ CANCELBUTTON()
+ NEXTBUTTON(`$3')
+
+ <Control Id="LicenseText" Type="ScrollableText" X="8" Width="368"
+ PARTIALHEIGHT(130) Sunken="yes">
+ <Text>WIX_DB_LICENSE_RTF()</Text>
+ </Control>
+
+ <Control Id="LicenseRadio" Type="RadioButtonGroup" X="8" Width="340"
+ PARTIALHEIGHT(35) Property="LicenseType" />
+
+ </Dialog>
+')
+
+m4_define(`DIALOG_TARGET', `
+
+ <RadioButtonGroup Property="ApplicationUsers">
+ <RadioButton Value="AnyUser" X="0" Y="0" Width="270" Height="15"
+ Text="&amp;Anyone who uses this computer (all users)" />
+ <RadioButton Value="CurUser" X="0" Y="15" Width="270" Height="15"
+ Text="Only for the current user" />
+ </RadioButtonGroup>
+
+ <Dialog Id="`$1'" DIALOGPROP>
+
+ TOPSTRIPE(44, `Installation Folder',
+ `Click Next to install to the default folder.')
+ BOTTOMSTRIPE()
+ BACKBUTTON(`$2')
+ CANCELBUTTON()
+
+ NEXTBUTTON_GENERIC(Next,,
+ NEWDIALOGEVENT(`$3')
+ <Publish Event="SetInstallLevel" Value="300">
+ <![CDATA[0]]></Publish>
+ <Publish Property="ALLUSERS" Value="1">
+ <![CDATA[ApplicationUsers = "AnyUser"]]></Publish>
+ <Publish Property="ALLUSERS" Value="{}">
+ <![CDATA[ApplicationUsers = "CurUser"]]></Publish>
+ <Publish Property="SelectedSetupType" Value="Custom">
+ <![CDATA[1]]></Publish>
+
+ )
+
+ TEXTCONTROL(InstallToText, 16, `Install [ProductName] to:')
+
+ <Control Id="ChangeFolder" Type="PushButton" X="318" Y="_YPOS"
+ Width="66" Height="17" Text="&amp;Change...">
+ <Publish Event="SpawnDialog" Value="ChangeFolderDlg">
+ <![CDATA[1]]></Publish>
+ <Publish Property="NewInstallDir" Value="INSTALLDIR">
+ <![CDATA[1]]></Publish>
+ </Control>
+
+ <Control Id="InstallToValue" Type="Text" X="40" Width="250"
+ PARTIALHEIGHT(20, 20)
+ Property="NewInstallDir" Text="[INSTALLDIR]" />
+
+ TEXTCONTROL(InstallForText, 14, `Install [ProductName] for:')
+
+ <Control Id="InstallForRadio" Type="RadioButtonGroup" PARTIALHEIGHT(50)
+ X="40" Width="310" Property="ApplicationUsers" />
+ </Dialog>
+
+ <Dialog Id="ChangeFolderDlg" DIALOGPROP>
+ TOPSTRIPE(44, `Change the Installation Folder',
+ `Browse to the folder you want to install to.')
+ BOTTOMSTRIPE()
+ NEXTBUTTON_GENERIC(OK,,
+ <Publish Event="SetTargetPath"
+ Value="[NewInstallDir]"><![CDATA[1]]></Publish>
+ <Publish Event="EndDialog" Value="Return"><![CDATA[1]]></Publish>
+ )
+ CANCELBUTTON_GENERIC(Cancel, Cancel="yes",
+ <Publish Event="Reset" Value="0"><![CDATA[1]]></Publish>
+ <Publish Event="EndDialog" Value="Return"><![CDATA[1]]></Publish>
+ )
+
+ TEXTCONTROL(LookText, 15, `&amp;Install into:')
+
+ <Control Id="DirCombo" Type="DirectoryCombo"
+ X="20" Width="270" Y="_YPOS" Height="80"
+ Property="NewInstallDir" Indirect="yes" Removable="yes"
+ Fixed="yes" Remote="yes" CDROM="yes" RAMDisk="yes" Floppy="yes" />
+
+ <Control Id="FolderUp" Type="PushButton"
+ X="320" Width="19" Y="_YPOS" Height="19"
+ ToolTip="Up One Level" Icon="yes" FixedSize="yes"
+ IconSize="16" Text="IconUp">
+ <Publish Event="DirectoryListUp" Value="0"><![CDATA[1]]></Publish>
+ </Control>
+
+ <Control Id="FolderCreate" Type="PushButton"
+ X="345" Width="19" Y="_YPOS" Height="19"
+ ToolTip="Create New Folder" Icon="yes" FixedSize="yes"
+ IconSize="16" Text="IconCreateDir">
+ <Publish Event="DirectoryListNew" Value="0"><![CDATA[1]]></Publish>
+ </Control>
+
+ INCY(25)
+ <Control Id="DirList" Type="DirectoryList"
+ X="20" Width="342" PARTIALHEIGHT(100, 5)
+ Property="NewInstallDir" Sunken="yes"
+ Indirect="yes" TabSkip="no" />
+
+ <Control Id="FolderText" Type="Text"
+ X="20" Width="99" PARTIALHEIGHT(14, 1)
+ TabSkip="no" Text="&amp;Folder name:" />
+
+ <Control Id="PathEditControl" Type="PathEdit"
+ X="20" Width="342" PARTIALHEIGHT(17)
+ Property="NewInstallDir" Sunken="yes" Indirect="yes" />
+
+ </Dialog>
+
+')
+
+<!-- Takes a 4th parameter, any extra text (restrictions) for debug libs -->
+m4_define(`DIALOG_FEATURE', `
+ <Dialog Id="`$1'" DIALOGPROP TrackDiskSpace="yes">
+
+ TOPSTRIPE(36, `Feature Selection',
+ `Select the features of [ProductName] you want. Maximum install size is [MaxInstallSize].')
+ BOTTOMSTRIPE()
+ CANCELBUTTON
+ BACKBUTTON(`$2')
+
+ NEXTBUTTON_GENERIC(Next,,
+ <Publish Event="NewDialog" Value="`$3'">
+ <![CDATA[OutOfNoRbDiskSpace <> 1]]></Publish>
+ <Publish Event="NewDialog" Value="OutOfSpaceDlg">
+ <![CDATA[OutOfNoRbDiskSpace = 1]]></Publish>
+ <Publish Property="FullOrCustom" Value="Custom">
+ <![CDATA[1]]></Publish>
+
+ <!--
+ - This updates the FeatureList property and the
+ - properties like PATHValue that track the value
+ - to be displayed for environment variables.
+ -->
+ WIX_DB_ENV_FEATURE_SET()
+ )
+
+
+ <!-- TODO: When the debug checkbox is clicked,
+ - we would like to update the disk space usage numbers
+ - as shown in the SelectionTreeControl. Tried this:
+ <Publish Event="DoAction" Value="CostFinalize">
+ <![CDATA[1]]></Publish>
+ - but it made all the numbers zero. Probably need
+ - to perform a whole sequence, (like CostInitialize,...)
+ -->
+
+
+ TEXTCONTROL(ClickText, 15,
+`Click on an icon in the list below to change how a feature is installed.')
+ INCY(5)
+
+ <Control Id="SelectionTreeControl" Type="SelectionTree"
+ X="8" Width="220" FULLHEIGHT
+ Property="NewInstallDir" Sunken="yes" TabSkip="no" />
+
+ <Control Id="GroupBoxControl" Type="GroupBox"
+ X="235" Width="131" FULLHEIGHT
+ Text="Feature Description" />
+ INCY(15)
+
+ <Control Id="ItemDescription" Type="Text"
+ X="241" Width="120" PARTIALHEIGHT(50) >
+ <Text></Text>
+ <Subscribe Event="SelectionDescription" Attribute="Text" />
+ </Control>
+
+ <Control Id="Size" Type="Text"
+ X="241" Width="120" PARTIALHEIGHT(50)
+ Text="Feature size">
+ <Subscribe Event="SelectionSize" Attribute="Text" />
+ </Control>
+
+ </Dialog>
+')
+
+<!--
+ - Note: for Win/9X, Win/ME
+ - Here we must do costfinalize whenever leaving
+ - this dialog (via Back or Next) because changing whether we have
+ - environment enabled or not changes the list of features
+ - (which is finalized by costfinalize).
+ - Calling costfinalize more than once is apparently not
+ - supported on older (9X,ME) systems.
+ -->
+m4_define(`DIALOG_ENVIRONMENT', `
+ <Dialog Id="`$1'" DIALOGPROP>
+ TOPSTRIPE(84, `Setting Environment Variables', DB_ENVIRONMENT_INTRO)
+ BOTTOMSTRIPE()
+ CANCELBUTTON
+ BACKBUTTON_GENERIC(Back, ,
+ NEWDIALOGEVENT(`$2')
+<!--PBR (4/4/2005) I removed this because it resets the feature choices
+ <Publish Event="DoAction" Value="CostFinalize">
+ <![CDATA[1]]></Publish>
+-->
+ )
+ NEXTBUTTON_GENERIC(Next, ,
+ NEWDIALOGEVENT(`$3')
+<!--PBR (4/4/2005) I removed this because it resets the feature choices
+ <Publish Event="DoAction" Value="CostFinalize">
+ <![CDATA[1]]></Publish>
+-->
+ <Publish Property="DoInstallEnvironment" Value="yes">
+ <![CDATA[EnvironmentSetCheck = "1"]]></Publish>
+ <Publish Property="DoInstallEnvironment" Value="no">
+ <![CDATA[EnvironmentSetCheck <> "1"]]></Publish>
+ )
+
+ <Control Id="SetEnvBox" Type="CheckBox" PARTIALHEIGHT(15, 5)
+ Text="Set the values in the environment variables"
+ X="26" Width="250" Property="EnvironmentSetCheck" CheckBoxValue="1"/>
+ <Control Id="GenEnvBox" Type="CheckBox" PARTIALHEIGHT(15, 8)
+ Text="Generate a dbvars.bat file with the given values"
+ X="26" Width="250" Property="EnvironmentGenCheck" CheckBoxValue="1"/>
+ INCY(5)
+
+ TEXTCONTROL(ReviewText, 12,
+`Here are the new environment values:')
+
+ <Control Id="LargeBox" Type="Text"
+ X="19" Width="340" FULLHEIGHT
+ Disabled="yes" Sunken="yes" Transparent="yes" TabSkip="no" />
+
+ INCY(5)
+
+ <!-- Show the properties for environment -->
+ WIX_DB_ENV_FEATURE_SHOW()
+
+ </Dialog>
+')
+
+m4_define(`DIALOG_READY', `
+ <Dialog Id="`$1'" DIALOGPROP TrackDiskSpace="yes">
+ NEXTBUTTON_GENERIC(Install,,
+ <Publish Event="NewDialog" Value="OutOfSpaceDlg">
+ <![CDATA[OutOfNoRbDiskSpace = 1]]></Publish>
+ <Publish Event="EndDialog" Value="Return">
+ <![CDATA[OutOfNoRbDiskSpace <> 1]]></Publish>
+
+<!-- Note: we set the name of the instenv now because we do not know
+ the installed pathname at the beginning of the execution -->
+
+ <Publish Property="InstEnvironmentProgram"
+ Value="[INSTALLDIR]\installutil\bin\instenv.exe">
+ <![CDATA[1]]></Publish>
+ )
+
+ TOPSTRIPE(44, `Ready', `The installer is ready to begin.')
+ BOTTOMSTRIPE()
+ CANCELBUTTON()
+ BACKBUTTON(`$2')
+
+ TEXTCONTROL(ReviewText, 24,
+`If you want to review or change any of your installation settings, click Back to the Feature Selection. Click Cancel to exit the installer.')
+
+ <Control Id="LargeBox" Type="Text"
+ X="19" Width="340" FULLHEIGHT
+ Disabled="yes" Sunken="yes" Transparent="yes" TabSkip="no" />
+
+ INCY(5)
+
+ <Control Id="DestinationText" Type="Text"
+ X="23" Width="316" PARTIALHEIGHT(11, 4)
+ TabSkip="no" Text="Destination Folder:" />
+
+ <Control Id="DestinationValue" Type="Text"
+ X="37" Width="316" PARTIALHEIGHT(13, 8)
+ TabSkip="no" Text="[INSTALLDIR]" />
+
+ <Control Id="FeatureListText" Type="Text"
+ X="23" Width="316" PARTIALHEIGHT(13, 4)
+ TabSkip="no" Text="Features to be installed:" />
+
+ <Control Id="FeatureListValue" Type="Text"
+ X="37" Width="316" PARTIALHEIGHT(30, 8)
+ TabSkip="no" Text="Shortcuts[FeatureList]" />
+
+ <Control Id="EnvironmentText" Type="Text"
+ X="23" Width="316" PARTIALHEIGHT(15, 0)
+ TabSkip="no" Text="Environment Variables:" />
+
+ <Control Id="EnvironmentValue" Type="Text"
+ X="37" Width="316" PARTIALHEIGHT(20, 0)
+ TabSkip="no" Text="[DoInstallEnvironment]" />
+
+ </Dialog>
+
+')
+
+m4_define(`DIALOG_PROGRESS', `
+ <Dialog Id="`$1'" DIALOGPROP Modeless="yes">
+ BOTTOMSTRIPE()
+ BACKBUTTON_DISABLED()
+ CANCELBUTTON()
+ NEXTBUTTON_DISABLED()
+
+ TOPSTRIPE(44, `Installer Progress', `Installing [ProductName].')
+
+ <Control Id="ActionText" Type="Text"
+ X="59" Y="100" Width="275" Height="12">
+ <Subscribe Event="ActionText" Attribute="Text" />
+ </Control>
+
+ <Control Id="ActionProgress95" Type="ProgressBar"
+ X="59" Y="113" Width="275" Height="12"
+ ProgressBlocks="yes" Text="Progress done">
+ <Subscribe Event="InstallFiles" Attribute="Progress" />
+ <Subscribe Event="MoveFiles" Attribute="Progress" />
+ <Subscribe Event="RemoveFiles" Attribute="Progress" />
+ <Subscribe Event="RemoveRegistryValues" Attribute="Progress" />
+ <Subscribe Event="WriteIniValues" Attribute="Progress" />
+ <Subscribe Event="WriteRegistryValues" Attribute="Progress" />
+ <Subscribe Event="UnmoveFiles" Attribute="Progress" />
+ <Subscribe Event="AdminInstallFinalize" Attribute="Progress" />
+ <Subscribe Event="SetProgress" Attribute="Progress" />
+ </Control>
+ </Dialog>
+')
+
+<!--
+ - Takes two extra parameters (in addition to the usual dialog parms)
+ - 4th: a short product name, like "Berkeley DB"
+ - 5th: a description of where to find online info, like "on www.xyz.com"
+ -->
+m4_define(`DIALOG_SUCCESS', `
+ <Dialog Id="`$1'" DIALOGPROP>
+ BOTTOMSTRIPE()
+ NEXTBUTTON_GENERIC(Finish, Cancel="yes",
+ <Publish Event="EndDialog" Value="Exit">
+ <![CDATA[1]]></Publish>
+ )
+ CANCELBUTTON_GENERIC(Cancel, Disabled="yes", )
+ BACKBUTTON_DISABLED()
+
+ TOPSTRIPE(44, `Installed', `[ProductName] is now installed.')
+
+ TEXTCONTROL(InstallSuccessText, 80,
+`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.
+
+Information about this product can also be found $5.
+
+Thank you for installing [ProductName].')
+
+ <Control Id="Image" Type="Bitmap" Text="OracleLogo"
+ X="0" Width="DIALOG_WIDTH" FULLHEIGHT TabSkip="no" />
+
+ </Dialog>
+')
+
+
+m4_define(`DIALOG_ADMIN_INTERRUPTED', `
+ <Dialog Id="`$1'" DIALOGPROP>
+ TOPSTRIPE(44, `Interrupted',
+`The installer was interrupted before [ProductName] could be completely installed.')
+
+ BOTTOMSTRIPE()
+ NEXTBUTTON_GENERIC(Finish, Cancel="yes",
+ <Publish Event="EndDialog" Value="Exit">
+ <![CDATA[1]]></Publish>
+ <Condition Action="default">
+ <![CDATA[NOT UpdateStarted]]></Condition>
+ )
+ CANCELBUTTON_GENERIC(Cancel, Disabled="yes",
+ <Publish Property="Suspend" Value="1"><![CDATA[1]]></Publish>
+ <Publish Event="EndDialog" Value="`$2'"><![CDATA[1]]></Publish>
+ <Condition Action="disable"><![CDATA[NOT UpdateStarted]]></Condition>
+ <Condition Action="enable"><![CDATA[UpdateStarted]]></Condition>
+ )
+ BACKBUTTON_GENERIC(Back, Disabled="yes",
+ <Publish Property="Suspend" Value="{}"><![CDATA[1]]></Publish>
+ <Publish Event="EndDialog" Value="`$2'"><![CDATA[1]]></Publish>
+ <Condition Action="disable"><![CDATA[NOT UpdateStarted]]></Condition>
+ <Condition Action="enable"><![CDATA[UpdateStarted]]></Condition>
+ <Condition Action="default"><![CDATA[UpdateStarted]]></Condition>
+ )
+
+ <Control Id="NotModifiedText" Type="Text"
+ X="20" Y="_YPOS" Width="228" Height="50" Transparent="yes">
+ <Text>Your system has not been modified. To complete the installation later, please run the installer again.</Text>
+ <Condition Action="hide"><![CDATA[UpdateStarted]]></Condition>
+ <Condition Action="show"><![CDATA[NOT UpdateStarted]]></Condition>
+ </Control>
+
+ <Control Id="YesModifiedText" Type="Text"
+ X="20" Y="_YPOS" Width="228" Height="50" Transparent="yes">
+ <Text>The product may be partially installed. Any installed elements will be removed when you exit.</Text>
+ <Condition Action="hide"><![CDATA[NOT UpdateStarted]]></Condition>
+ <Condition Action="show"><![CDATA[UpdateStarted]]></Condition>
+ </Control>
+ INCY(30)
+
+ TEXTCONTROL(FinishText, 25, `Click Finish to exit the install.')
+
+ <Control Id="Image" Type="Bitmap"
+ X="0" Width="DIALOG_WIDTH" PARTIALHEIGHT(168) Text="OracleLogo" />
+ </Dialog>
+')
+
+m4_define(`DIALOG_ADMIN_CANCEL', `
+
+ <Dialog Id="`$1'" Width="280" Height="90"
+ Title="[ProductName] - Installer" NoMinimize="yes">
+
+ SETY(20)
+ TEXTCONTROL(CancelText, 24,
+`Are you sure you want to cancel [ProductName] installation?')
+
+ <Control Id="YesButton" Type="PushButton"
+ X="60" Y="60" Width="66" Height="17" Text="&amp;Yes">
+ <Publish Event="EndDialog" Value="Exit"><![CDATA[1]]></Publish>
+ </Control>
+
+ <Control Id="NoButton" Type="PushButton"
+ X="130" Y="60" Width="66" Height="17"
+ Default="yes" Cancel="yes" Text="&amp;No">
+ <Publish Event="EndDialog" Value="Return">
+ <![CDATA[1]]></Publish>
+ </Control>
+
+ </Dialog>
+')
+
+m4_define(`DIALOG_ADMIN_NOSPACE', `
+ <Dialog Id="`$1'" DIALOGPROP>
+ TOPSTRIPE(44, `Out of Disk Space',
+`The disk does not have enough space for the selected features.')
+ BOTTOMSTRIPE()
+
+ CANCELBUTTON_GENERIC(OK, Default="yes" Cancel="yes",
+ <Publish Event="NewDialog" Value="`$2'">
+ <![CDATA[ACTION <> "ADMIN"]]></Publish>
+ )
+
+ TEXTCONTROL(NoSpaceText, 43,
+`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.')
+
+ <Control Id="VolumeCostListControl" Type="VolumeCostList"
+ X="23" Width="310" FULLHEIGHT
+ Sunken="yes" Fixed="yes" Remote="yes">
+ <Text>{120}{70}{70}{70}{70}</Text>
+ </Control>
+ </Dialog>
+')
diff --git a/db-4.8.30/dist/winmsi/environment.in b/db-4.8.30/dist/winmsi/environment.in
new file mode 100644
index 0000000..4188c95
--- /dev/null
+++ b/db-4.8.30/dist/winmsi/environment.in
@@ -0,0 +1,23 @@
+# $Id$
+# Lists environment variables needed to install particular
+# features in Windows. Feature names must be
+# listed in features.in . The meaning of each line is:
+# if a given FEATURE is selected, add to the environment VARIABLE
+# the given VALUE (relative to the root of the tree).
+# Options may be +first or +last to put it at the beginning or end
+# of the variable. The items are processed in the order given here,
+# so an entry with +first will no longer be first if another line
+# with +first follows it.
+
+# Note: columns below must be separated by tabs.
+
+# feature variable value options
+
+DCoreAPI PATH /bin\\debug +first
+CoreAPI PATH /bin +first
+
+# The debug versions go last, they are preferred if they are installed.
+JavaEx CLASSPATH /jar\\dbexamples.jar +last
+JavaAPI CLASSPATH /jar\\db.jar +last
+DJavaEx CLASSPATH /jar\\debug\\dbexamples.jar +last
+DJavaAPI CLASSPATH /jar\\debug\\db.jar +last
diff --git a/db-4.8.30/dist/winmsi/features.in b/db-4.8.30/dist/winmsi/features.in
new file mode 100644
index 0000000..ad7b1a1
--- /dev/null
+++ b/db-4.8.30/dist/winmsi/features.in
@@ -0,0 +1,35 @@
+# $Id$
+# Lists features that can be installed on Windows,
+# and their dependencies.
+
+# Note: columns below must be separated by tabs.
+#
+# Feature: the feature identifier. If it is dependent on another feature,
+# that is specified via Dependent/Featurename
+# Short name: the name as it shows in the installer's tree display
+# Description: the description that shows when the item is selected
+#
+# Options are one or more of:
+# +default: the feature is installed by default
+# +required: the feature cannot be deselected (implies default)
+# +invisible: the feature is not shown to the user (implies required)
+#
+
+# feature short name description options
+
+CsharpAPI "C sharp" ".NET C sharp API libraries"
+CoreAPI "Core Features" "C/C++ API and required binaries" +required
+CoreAPI/DCoreAPI "Debug Core Features" ""
+CoreTools "Tools and Utilities" "Compiled tools for DB maintenance" +default
+CoreEx "C/C++ Examples" "C and C++ compiled examples (requires debug libraries to function)" +default
+
+JavaAPI "Java" "Java API JAR and JNI native libraries"
+JavaAPI/JavaEx "Java Examples" "Java examples JAR"
+JavaAPI/DJavaAPI "Debug Java" ""
+JavaAPI/DJavaAPI/DJavaEx "Debug Java Examples" ""
+PerlAPI "Perl" "Perl API .pm and .pod files"
+StlAPI "DB STL" "DB C++ STL API"
+TclAPI "Tcl" "Tcl API binaries"
+TclAPI/DTclAPI "Debug Tcl" ""
+Docs "Documentation" "Documentation for all products"
+Sources "Source files" "Source files for all products" +default
diff --git a/db-4.8.30/dist/winmsi/files.in b/db-4.8.30/dist/winmsi/files.in
new file mode 100644
index 0000000..15d0b48
--- /dev/null
+++ b/db-4.8.30/dist/winmsi/files.in
@@ -0,0 +1,100 @@
+# $Id$
+# Lists files needed to install particular
+# features in Windows. Feature names must be
+# listed in features.in .
+#
+
+# Note: columns below must be separated by tabs.
+# ${PRODUCT_MAJMIN} is a macro for "43" (for BDB 4.3.x)
+
+# feature source file targdir shortname
+
+CoreAPI build_windows/Win32/Release/libdb${PRODUCT_MAJMIN}.dll /bin/
+DCoreAPI build_windows/Win32/Debug/libdb${PRODUCT_MAJMIN}d.dll /bin/debug/
+DCoreAPI build_windows/Win32/Debug/libdb${PRODUCT_MAJMIN}d.pdb /bin/debug/
+CoreAPI build_windows/Win32/Release/libdb${PRODUCT_MAJMIN}.lib /lib/
+DCoreAPI build_windows/Win32/Debug/libdb${PRODUCT_MAJMIN}d.lib /lib/
+CoreAPI build_windows/Win32/Release/msvcm${PRODUCT_MSVC_VERSION}.dll /bin/
+DCoreAPI build_windows/Win32/Debug/msvcm${PRODUCT_MSVC_VERSION}.dll /bin/debug/
+CoreAPI build_windows/Win32/Release/msvcr${PRODUCT_MSVC_VERSION}.dll /bin/
+DCoreAPI build_windows/Win32/Debug/msvcr${PRODUCT_MSVC_VERSION}.dll /bin/debug/
+CoreAPI build_windows/Win32/Release/msvcp${PRODUCT_MSVC_VERSION}.dll /bin/
+DCoreAPI build_windows/Win32/Debug/msvcp${PRODUCT_MSVC_VERSION}.dll /bin/debug/
+CoreAPI build_windows/Win32/Release/Microsoft.VC${PRODUCT_MSVC_VERSION}.CRT.manifest /bin/
+DCoreAPI build_windows/Win32/Debug/Microsoft.VC${PRODUCT_MSVC_VERSION}.CRT.manifest /bin/debug/
+
+# After the build process, we create an installed_include directory
+# housing all the needed include files, for user convenience
+CoreAPI installed_include/ /include/
+
+CoreAPI ${PRODUCT_SHARED_WINMSIDIR}/images/webicon.ico /installutil/
+CoreAPI ${PRODUCT_STAGE}/dbvars.bat /
+
+# C Sharp API files.
+CsharpAPI build_windows/Win32/Release/libdb_csharp${PRODUCT_MAJMIN}.dll /bin/ dbcn${PRODUCT_MAJMIN}.dll
+CsharpAPI build_windows/Win32/Debug/libdb_csharp${PRODUCT_MAJMIN}d.dll /bin/debug/ dbc${PRODUCT_MAJMIN}d.dll
+CsharpAPI build_windows/Win32/Debug/libdb_csharp${PRODUCT_MAJMIN}d.pdb /bin/debug/
+CsharpAPI build_windows/AnyCPU/Release/libdb_dotnet${PRODUCT_MAJMIN}.dll /bin/ dbc${PRODUCT_MAJMIN}.dll
+CsharpAPI build_windows/AnyCPU/Debug/libdb_dotnet${PRODUCT_MAJMIN}.dll /bin/debug/ dbc${PRODUCT_MAJMIN}d.dll
+CsharpAPI build_windows/AnyCPU/Debug/libdb_dotnet${PRODUCT_MAJMIN}.pdb /bin/debug/
+
+# We don't include the .lib files for Java, nobody needs to
+# link C/C++ against the java library
+JavaAPI build_windows/Win32/Release/libdb_java${PRODUCT_MAJMIN}.dll /bin/ dbj${PRODUCT_MAJMIN}.dll
+DJavaAPI build_windows/Win32/Debug/libdb_java${PRODUCT_MAJMIN}d.dll /bin/debug/ dbj${PRODUCT_MAJMIN}d.dll
+DJavaAPI build_windows/Win32/Debug/libdb_java${PRODUCT_MAJMIN}d.pdb /bin/debug/
+JavaAPI build_windows/Win32/Release/db.jar /jar/
+DJavaAPI build_windows/Win32/Debug/db.jar /jar/debug/
+
+JavaEx build_windows/Win32/Release/dbexamples.jar /jar/ dbexam~1.jar
+DJavaEx build_windows/Win32/Debug/dbexamples.jar /jar/debug/ dbexam~1.jar
+
+# STL API files.
+StlAPI build_windows/Win32/Release/libdb_stl${PRODUCT_MAJMIN}.dll /bin/ dbs${PRODUCT_MAJMIN}.dll
+StlAPI build_windows/Win32/Debug/libdb_stl${PRODUCT_MAJMIN}d.dll /bin/debug/ dbs${PRODUCT_MAJMIN}d.dll
+StlAPI build_windows/Win32/Debug/libdb_stl${PRODUCT_MAJMIN}d.pdb /bin/debug/
+
+# We don't include the .lib files for Tcl, nobody needs to
+# link C/C++ against the Tcl library
+DTclAPI build_windows/Win32/Debug/libdb_tcl${PRODUCT_MAJMIN}d.dll /bin/debug/ dbt${PRODUCT_MAJMIN}d.dll
+DTclAPI build_windows/Win32/Debug/libdb_tcl${PRODUCT_MAJMIN}d.pdb /bin/debug/
+TclAPI build_windows/Win32/Release/libdb_tcl${PRODUCT_MAJMIN}.dll /bin/ dbt${PRODUCT_MAJMIN}.dll
+
+PerlAPI perl/BerkeleyDB/blib/ /lib/perl/
+
+CoreTools build_windows/Win32/Release/db_archive.exe /bin/ db_arc~1.exe
+CoreTools build_windows/Win32/Release/db_checkpoint.exe /bin/ db_che~1.exe
+CoreTools build_windows/Win32/Release/db_deadlock.exe /bin/ db_dea~1.exe
+CoreTools build_windows/Win32/Release/db_dump.exe /bin/ db_dump.exe
+CoreTools build_windows/Win32/Release/db_hotbackup.exe /bin/ db_hot~1.exe
+CoreTools build_windows/Win32/Release/db_load.exe /bin/ db_load.exe
+CoreTools build_windows/Win32/Release/db_printlog.exe /bin/ db_pri~1.exe
+CoreTools build_windows/Win32/Release/db_recover.exe /bin/ db_rec~1.exe
+CoreTools build_windows/Win32/Release/db_sql.exe /bin/ db_sql.exe
+CoreTools build_windows/Win32/Release/db_stat.exe /bin/ db_sta~1.exe
+CoreTools build_windows/Win32/Release/db_upgrade.exe /bin/ db_upg~1.exe
+CoreTools build_windows/Win32/Release/db_verify.exe /bin/ db_ver~1.exe
+
+CoreEx build_windows/Win32/Release/ex_access.exe /bin/ ex_acc~1.exe
+CoreEx build_windows/Win32/Release/ex_btrec.exe /bin/ ex_btr~1.exe
+CoreEx build_windows/Win32/Release/ex_env.exe /bin/ ex_env.exe
+CoreEx build_windows/Win32/Release/ex_lock.exe /bin/ ex_loc~1.exe
+CoreEx build_windows/Win32/Release/ex_mpool.exe /bin/ ex_mpo~1.exe
+CoreEx build_windows/Win32/Release/ex_rep_base.exe /bin/ ex_rep~1.exe
+CoreEx build_windows/Win32/Release/ex_rep_mgr.exe /bin/ ex_rep~2.exe
+CoreEx build_windows/Win32/Release/ex_tpcb.exe /bin/ ex_tpcb.exe
+
+CoreEx build_windows/Win32/Release/excxx_access.exe /bin/ excxx_ac.exe
+CoreEx build_windows/Win32/Release/excxx_btrec.exe /bin/ excxx_bt.exe
+CoreEx build_windows/Win32/Release/excxx_env.exe /bin/ excxx_en.exe
+CoreEx build_windows/Win32/Release/excxx_lock.exe /bin/ excxx_lk.exe
+CoreEx build_windows/Win32/Release/excxx_mpool.exe /bin/ excxx_mp.exe
+CoreEx build_windows/Win32/Release/excxx_tpcb.exe /bin/ excxx_tp.exe
+
+CoreEx build_windows/Win32/Release/exstl_access.exe /bin/ exstl_ac.exe
+CoreEx build_windows/Win32/Release/exstl_repquote.exe /bin/ exstl_re.exe
+CoreEx build_windows/Win32/Release/exstl_tpcb.exe /bin/ exstl_tp.exe
+
+Docs ${PRODUCT_STAGE}/docs/ /docs/
+
+Sources ${PRODUCT_STAGE}/Sources/ /db-${PRODUCT_VERSION}/
diff --git a/db-4.8.30/dist/winmsi/images/caticon.ibd b/db-4.8.30/dist/winmsi/images/caticon.ibd
new file mode 100644
index 0000000..e8b17bf
--- /dev/null
+++ b/db-4.8.30/dist/winmsi/images/caticon.ibd
Binary files differ
diff --git a/db-4.8.30/dist/winmsi/images/foldernew.ibd b/db-4.8.30/dist/winmsi/images/foldernew.ibd
new file mode 100644
index 0000000..1082413
--- /dev/null
+++ b/db-4.8.30/dist/winmsi/images/foldernew.ibd
Binary files differ
diff --git a/db-4.8.30/dist/winmsi/images/folderup.ibd b/db-4.8.30/dist/winmsi/images/folderup.ibd
new file mode 100644
index 0000000..f1d3696
--- /dev/null
+++ b/db-4.8.30/dist/winmsi/images/folderup.ibd
Binary files differ
diff --git a/db-4.8.30/dist/winmsi/images/oracle.jpg b/db-4.8.30/dist/winmsi/images/oracle.jpg
new file mode 100644
index 0000000..bfa618e
--- /dev/null
+++ b/db-4.8.30/dist/winmsi/images/oracle.jpg
Binary files differ
diff --git a/db-4.8.30/dist/winmsi/images/topstripe.ibd b/db-4.8.30/dist/winmsi/images/topstripe.ibd
new file mode 100644
index 0000000..be72f90
--- /dev/null
+++ b/db-4.8.30/dist/winmsi/images/topstripe.ibd
Binary files differ
diff --git a/db-4.8.30/dist/winmsi/images/webicon.ico b/db-4.8.30/dist/winmsi/images/webicon.ico
new file mode 100644
index 0000000..d2b225a
--- /dev/null
+++ b/db-4.8.30/dist/winmsi/images/webicon.ico
Binary files differ
diff --git a/db-4.8.30/dist/winmsi/links.in b/db-4.8.30/dist/winmsi/links.in
new file mode 100644
index 0000000..7fce06d
--- /dev/null
+++ b/db-4.8.30/dist/winmsi/links.in
@@ -0,0 +1,17 @@
+# $Id$
+# Lists links to Web sites to be installed on Windows.
+# If the URL starts with file: it is assumed to be a local file,
+# relative to the installation directory.
+
+# Note: columns below must be separated by tabs.
+
+# shortname name URL
+
+oraclecp "Command Prompt" "cmd:dbvars.bat"
+oraclewb "Oracle Website" "http://www.oracle.com"
+oracletn "Oracle Technology Network" "http://forums.oracle.com/forums/category.jspa?categoryID=18"
+oraclech "Change Log for Berkeley DB WIX_DB_VERSION" "http://www.sleepycat.com/update/WIX_DB_VERSION/if.WIX_DB_VERSION.html"
+oraclenw "Berkeley DB Newsgroup" "http://groups-beta.google.com/group/comp.databases.berkeley-db"
+oraclesu "Support for Berkeley DB" "https://metalink.oracle.com/"
+oracleon "Online Documentation" "http://dev.sleepycat.com/documentation/bdb.html"
+oracleld "On disk Documentation" "file:docs/index.html"
diff --git a/db-4.8.30/dist/winmsi/s_winmsi.fcn b/db-4.8.30/dist/winmsi/s_winmsi.fcn
new file mode 100644
index 0000000..9dcacf3
--- /dev/null
+++ b/db-4.8.30/dist/winmsi/s_winmsi.fcn
@@ -0,0 +1,1473 @@
+# $Id$
+#
+# The common functions used by the s_winmsi scripts (both
+# for core DB and DB/XML).
+#
+# This script uses several bash extensions that are convenient
+# since we "know" it will always run under Cygwin: shell functions,
+# 'return', declaration of 'local' variables, $(command) syntax,
+# ${#X} (counting chars), ${X#regexp} (searching) $((expr)) (arithmetic)
+#
+# These functions use 'global' variables:
+# ERRORLOG - a filename
+# PRODUCT_NAME - e.g. "Berkeley DB"
+# PRODUCT_VERSION - e.g. "4.1.25", derived from dist/RELEASE
+# PRODUCT_MAJOR - e.g. "4", (for release 4.1.25) from dist/RELEASE
+# PRODUCT_MINOR - e.g. "1", (for release 4.1.25) from dist/RELEASE
+# PRODUCT_PATCH - e.g. "25", (for release 4.1.25) from dist/RELEASE
+# PRODUCT_MAJMIN - e.g. "41", (for release 4.1.25) from dist/RELEASE
+# PRODUCT_MSVC_VERSION - e.g. "71" for Visual Studio 7, "80" for VS 8
+# PRODUCT_STAGE - the staging directory for temp files and builds
+# PRODUCT_LICENSEDIR - the tree containing LICENSE and README
+# PRODUCT_SUB_BLDDIR - top of the subproduct build e.g. "dbxml-2.0.1/dbxml"
+# PRODUCT_BLDDIR - top of the build tree e.g. "dbxml-2.0.1"
+# PRODUCT_SRCDIR - the dir we unzip to e.g. "dbxml-2.0.1"
+# PRODUCT_DBBUILDDIR - where build_unix dir is for Berkeley DB (for Perl)
+# PRODUCT_SHARED_WINMSIDIR - where the master winmsi directory is
+# PRODUCT_IMAGEDIR - where the images are (usually winmsi/images)
+# PRODUCT_ZIP_FILEFMT - what zip file looks like e.g. "db-X.Y.Z.NC.zip"
+# PRODUCT_MSI_FILEFMT - what msi file looks like e.g. "db-X.Y.Z.NC.msi"
+#
+# Some of these may seem redundant, but there are options to take
+# an already built tree from a different place than where we'll unzip
+# to and take our sources from, for example. This allows a lot of flexibility
+# for development and debugging (especially when these trees can be huge).
+
+# This is the magic tag that creates a new unique GUID in Wix.
+# GUIDs are needed on every <Component ... > entry to ensure
+# that the component can be uninstalled.
+GENGUID='Guid="GUID_CREATE_UNIQUE()"'
+PERSISTGUID='Guid="WIX_DB_PERSISTENT_GUID()"'
+
+# MakeRtf()
+# Standard input is plain text, standard output is RTF.
+#
+MakeRtf() {
+ temp1=/tmp/sbm$$a
+ cat > $temp1
+
+
+# Courier is a good font, but the lines with all caps
+# overflows our current dialog size:
+# {\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Courier New;}}
+# \viewkind4\uc1\pard\lang1033\f0\fs16
+#
+# Using Small fonts works:
+# {\rtf1\ansi\deff0{\fonttbl{\f0\fswiss\fprq2\fcharset0 Small Fonts;}}
+# {\colortbl ;\red0\green0\blue0;}
+# \viewkind4\uc1\pard\cf1\lang1033\f0\fs14
+
+# Arial is the best compromise:
+ sed -e 's/^ *//' << 'EndOfRTFHeader'
+ {\rtf1\ansi\deff0{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}}
+ {\colortbl ;\red0\green0\blue0;}
+ \viewkind4\uc1\pard\cf1\lang1033\f0\fs16
+EndOfRTFHeader
+
+# Embedded '<' and '>' can cause problems for Wix
+ sed -e 's:$:\\par:' -e 's:<: \\lquote :' -e 's:>: \\rquote :' < $temp1
+ echo -n '}'
+ rm -f $temp1
+}
+
+# NextId()
+# Get the next available unique id, a simple integer counter.
+# We use a file, rather than a shell variable to track the
+# number, because this is called from subshells at various
+# points, and they cannot affect the variables in the parent shell.
+#
+ComponentID=component.id
+NextId()
+{
+ local id=`cat $ComponentID 2>/dev/null`
+ if [ "$id" = '' ]; then
+ id=0
+ fi
+ id=$(($id + 1))
+ echo "$id" > $ComponentID
+ echo "$id"
+}
+
+# CleanFileName(FILENAME)
+# Removes any strange characters in file names,
+# returning the new name on standard output.
+CleanFileName()
+{
+ echo "$1" | sed -e 's/[-%@!]//g'
+}
+
+# GetShortName(FILENAME)
+# Get a Windows short name for the file,
+# to fit into the 8.3 name space.
+# This is not a great algorithm, but it works.
+# The fact is, the names must be unique, but on
+# Win2000 and WinXP, we'll never see them.
+
+ShortID=short.id
+GetShortName()
+{
+ local name=`echo "$1" | tr '[a-z]' '[A-Z]'`
+
+ # See if the name fits into 8.3. If so,
+ # return it right away.
+ #
+ case "$name" in
+ ?????????*.* ) ;;
+ *.????* ) ;;
+ *.*.* ) ;;
+ *[-%@!]* ) ;;
+ *.* ) echo "$name"
+ return
+ ;;
+ * )
+ if [ "${#1}" -le 8 ]; then
+ echo "$name"
+ return
+ fi
+ ;;
+ esac
+
+ # From NAMEISLONG.EXTLONG, build a name
+ # like NAME~ZZZ.EXT, where ZZZ is a unique (hex)
+ # number we build. This is
+
+ local id=`cat $ShortID 2>/dev/null`
+ if [ "$id" = '' ]; then
+ id=0
+ fi
+ id=$(($id + 1))
+ echo "$id" > $ShortID
+ if [ "$id" -ge 4096 ]; then
+ echo "BADBADBAD.TXT" # return something that will give an error
+ Error "ShortId overflow"
+ exit 1
+ fi
+
+ # Convert the id to hex (I ran out of space using decimal)
+ # This is too slow: id=`echo 16 o $id p | dc`
+ id=`printf "%x" $id`
+
+ # Collect and clean up the part of the name before, and after, the dot
+ local before=`CleanFileName "$name" | sed -e 's/^\([^.]*\)[.].*$/\1/'`
+ local after=`CleanFileName "$name" | sed -e 's/^[^.]*[.]\(.*\)$/\1/'`
+
+ # Make sure the before part fits in 5 chars (not 8, since
+ # we need a few for the unique number).
+ if [ "${#before}" -gt 5 ]; then
+ before=`echo "$before" | sed -e 's/^\(.....\).*/\1/'`
+ fi
+ if [ "${#after}" -gt 3 ]; then
+ after=`echo "$after" | sed -e 's/^\(...\).*/\1/'`
+ fi
+ echo "${before}~${id}.${after}"
+}
+
+# Progress([OPTION,]STRING...)
+# Show a major processing step via echo to stdout and to the error log.
+# An OPTION is "-minor", indicating no big banner.
+#
+Progress()
+{
+ if [ "$1" = -minor ]; then
+ shift
+ else
+ echo "" >> $ERRORLOG
+ echo "============================" >> $ERRORLOG
+ fi
+ echo "$@" >> $ERRORLOG
+ echo "$@" >&15
+}
+
+# Error(STRING...)
+# Show an error in a standard way.
+#
+Error()
+{
+ echo "" >> $ERRORLOG
+ echo "****************** FAIL ******************" >> $ERRORLOG
+ echo "ERROR: $@" >> $ERRORLOG
+ echo "ERROR: $@" >&15
+ echo "See $ERRORLOG for details" >&15
+ return 1
+}
+
+# RequireFileInPath(NAME, PATHVAL, FILE)
+# Look for FILE in the path that has value PATHVAL.
+# The path's name is NAME if it needs to be shown.
+#
+RequireFileInPath()
+{
+ local type="$1"
+ local origpath="$2"
+ local file="$3"
+ local upath="$origpath"
+ if [ "$1" != PATH ]; then
+ upath=`cygpath -up "$origpath"`
+ fi
+
+ SAVEIFS="$IFS"
+ IFS=":"
+ found=no
+ for dir in $upath; do
+ if [ -f "$dir/$file" ]; then
+ IFS="$SAVEIFS"
+ return
+ fi
+ done
+ IFS="$SAVEIFS"
+ Error "File $file not found in $type path: $origpath"
+ exit 1
+}
+
+# Rand4X()
+# Return 4 random hex digits on output
+#
+Rand4X() {
+ # The sed command pads the front with 0's as needed
+ (echo 'obase=16'; echo $RANDOM ) | bc |
+ sed -e 's/^/0000/' -e 's/^.*\(....\)$/\1/'
+
+}
+
+# RunM4()
+# Run M4, making appropriate substitutions.
+# This function uses GLOBAL variables: PRODUCT_VERSION (e.g. "4.1.25")
+# and PRODUCT_LICENSEDIR, which is where certain text files are found
+#
+RunM4() {
+
+ # Given a version number, like 2.3.45, we want to
+ # create a 8 character name for the directory like db2_3_45.
+ # This name is under a "Oracle" directory,
+ # so it only needs to be unique within the universe of BDB versions.
+ # TODO: instead of using a version number like $DB_VERSION,
+ # maybe use $DB_VERSION_UNIQUE_NAME which looks like "_2003"
+
+ local DB_8CHAR_VERSION=`echo $PRODUCT_VERSION | sed -e 's/[.]/_/g'`
+ if [ ${#DB_8CHAR_VERSION} -le 6 ]; then
+ DB_8CHAR_VERSION="db$DB_8CHAR_VERSION"
+ elif [ ${#DB_8CHAR_VERSION} -le 7 ]; then
+ DB_8CHAR_VERSION="d$DB_8CHAR_VERSION"
+ else
+ Error "Version number too large for simple version number algorithm"
+ exit 1
+ fi
+
+ # Remove leading ./ from PRODUCT_LICENSEDIR if present.
+ local licensedir=`cygpath -w "$PRODUCT_LICENSEDIR"`
+
+ # Create a GUID prefix of the form: ????????-????-????-????-????
+ # This leaves 8 digits of GUID to be manipulated by m4.
+ local GUID_PREFIX="`Rand4X``Rand4X`-`Rand4X`-`Rand4X`-`Rand4X`-`Rand4X`"
+
+ # -P requires that all m4 macros, like define, eval, etc.
+ # are prefixed, like m4_define, m4_eval, etc. This avoids
+ # various name conflicts with input files.
+ # TODO: rename DB_SRCDIR as DB_LICENSEDIR
+ m4 -P \
+ -DWIX_DB_VERSION="$PRODUCT_VERSION" \
+ -DWIX_DB_8CHAR_VERSION="$DB_8CHAR_VERSION" \
+ -DWIX_DB_GUID_PREFIX="$GUID_PREFIX" \
+ -DWIX_DB_PRODUCT_NAME="$PRODUCT_NAME" \
+ -DWIX_DB_SRCDIR="$licensedir" \
+ -DWIX_DB_TOP="`cygpath -w $PRODUCT_BLDDIR`" \
+ -DWIX_DB_SHARED_WINMSIDIR="$PRODUCT_SHARED_WINMSIDIR" \
+ -DWIX_DB_IMAGEDIR="`cygpath -w $PRODUCT_IMAGEDIR`" \
+ -DWIX_DB_FEATURE_STRUCTURE="m4_include(features.wixinc)" \
+ -DWIX_DB_DIRECTORY_STRUCTURE="m4_include(directory.wixinc)" \
+ -DWIX_DB_LINKS="m4_include(links.wixinc)" \
+ -DWIX_DB_LICENSE_RTF="m4_include(license.rtf)" \
+ -DWIX_DB_ENV_FEATURE_PROPS="m4_include(envprops.wixinc)" \
+ -DWIX_DB_ENV_FEATURE_SET="m4_include(envset.wixinc)" \
+ -DWIX_DB_ENV_FEATURE_SHOW="m4_include(envshow.wixinc)"
+}
+
+# RunTallow(DIR, OPTIONS)
+# Run Tallow, a tool from the WiX distribution
+RunTallow() {
+ local dir="$1"
+ shift
+
+ Id1=`NextId`
+ Id2=`NextId`
+ Id3=`NextId`
+
+ # Tallow is a tool that walks a tree, producing
+ # a WiX directory heirarchy naming the files.
+ # The IDs it produces are not unique (between tallow
+ # runs), so we must make them so here. Thus "directory78"
+ # becomes "MyFeatureName.123.78" where 123 is an id from NextId.
+ # Secondly, instead of using the tallow output as a separately
+ # compiled fragment, we want to include it directly, so
+ # we need to strip out some extraneous XML entries at the top
+ # and bottom of its output.
+ #
+ # Another thing we do is when we see <Directory></Directory>
+ # pairs, we call m4 macros WIX_DB_{BEGIN,END}_SUBDIR because
+ # we need to track the current directory to generate 'persistent'
+ # GUIDs. See the discussion about GUIDs in dbwix.m4 .
+ #
+ # !!! For stripping out the extraneous XML, we rely heavily
+ # !!! on the output format, so this is likely to be fragile
+ # !!! between versions of tallow. Fortunately, it should fail hard.
+ #
+ echo "=============" >> tallow.log
+ echo tallow -nologo -d `cygpath -w "$dir"` "$@" >> tallow.log
+ echo " <!-- TALLOW output begins here -->"
+ tallow -nologo -d `cygpath -w "$dir"` "$@" > tallow.out || exit 1
+ cat tallow.out >> tallow.log
+ echo "-------------" >> tallow.log
+
+ sed -e '1,/<DirectoryRef/d' -e '/<\/DirectoryRef/,$d' \
+ -e "s/Id=\"directory/Id=\"$feature.$Id1./" \
+ -e "s/Id=\"component/Id=\"$feature.$Id2./" \
+ -e "s/Id=\"file/Id=\"$feature.$Id3./" \
+ -e '/^ <Directory/d' \
+ -e '/^ <\/Directory/d' \
+ -e '/<Directory/s/Name=\"\([^"]*\)"/Name="\1" WIX_DB_BEGIN_SUBDIR(\1) /' \
+ -e '/<\/Directory>/s/$/ WIX_DB_END_SUBDIR()/' \
+ -e "/<Component/s/>/ $PERSISTGUID>/" \
+ < tallow.out > tallow.postsed || exit 1
+
+ echo 'WIX_DB_SET_CURFILE()'
+ echo 'WIX_DB_CLEAR_SUBDIR()'
+ cat tallow.postsed
+ echo 'WIX_DB_CLEAR_SUBDIR()'
+
+ cat tallow.postsed >> tallow.log
+ echo " <!-- TALLOW output ends here -->"
+}
+
+# ProcessFeatures(INFILES, INFEATURES, INENV, OUTDIRECTORIES, OUTFEATURES,
+# OUTSET)
+# Use the files.in and features.in files as
+# input to create two output files, one containing a WiX XML
+# fragment showing directories and needed files,
+# and another containing a WiX XML fragment showing
+# the features in a dependency tree.
+#
+# This creates the heart of the installer flexibility.
+#
+ProcessFeatures() {
+ InFiles="infiles.tmp"; CleanInputFile "$1" "$InFiles" 3 4
+ InFeatures="infeatures.tmp"; CleanInputFile "$2" "$InFeatures" 3 4
+ InEnv="inenv.tmp"; CleanInputFile "$3" "$InEnv" 3 4
+ OutDirs="$4"
+ OutFeatures="$5"
+ OutSet="$6"
+
+ rm -f $OutDirs; touch $OutDirs
+ rm -f $OutFeatures; touch $OutFeatures
+
+ # Initialize the feature list.
+ # This will be expanded (per feature) in ProcessOneFeature
+ #
+ XmlLevel=4
+ Xecho "<Publish Property=\"FeatureList\" Value=\"[NULL]\">" >> $OutSet
+ Xecho " <![CDATA[1]]></Publish>" >> $OutSet
+
+ Dirs=`cut -f 3 < $InFiles | sort | uniq`
+ Prevdir="/"
+ ProcessDirTransition "$Prevdir" "/" >> $OutDirs
+
+ for Dir in $Dirs; do
+ ProcessDirTransition "$Prevdir" "$Dir" >> $OutDirs
+ ProcessOneDirectory "$Dir" < $InFiles >> $OutDirs || exit 1
+ Prevdir="$Dir"
+ done
+ ProcessDirTransition "$Prevdir" "/" >> $OutDirs
+
+ cat $InEnv | (
+ read line
+ while [ "$line" != '' ]; do
+ local FeatureName=`echo "$line" | cut -f 1`
+ local EnvVariable=`echo "$line" | cut -f 2`
+ local EnvValue=`echo "$line" | cut -f 3`
+ local EnvOption=`echo "$line" | cut -f 4`
+ ProcessOneEnv "$FeatureName" "$EnvVariable" "$EnvValue" "$EnvOption" "$OutDirs" "$OutSet"
+ read line
+ done
+ return 0
+ ) || Error "Error processing environment" || exit 1
+
+ cat $InFeatures | (
+ read line
+ while [ "$line" != '' ]; do
+ local FeaturePath=`echo "$line" | cut -f 1`
+ local ShortName=`echo "$line" | cut -f 2 | StripDoubleQuotes`
+ local Description=`echo "$line" | cut -f 3 | StripDoubleQuotes`
+ local FeatureOptions=`echo "$line" | cut -f 4 | StripDoubleQuotes`
+ ProcessOneFeature "$FeaturePath" "$ShortName" "$Description" "$FeatureOptions" "$OutDirs" "$OutFeatures" "$OutSet"
+ read line
+ done
+ return 0
+ ) || Error "Error processing features" || exit 1
+
+# (PBR)
+# This test code didn't work. My hope was that I could force INSTALLLEVEL
+# to 4 and this would then enable the debug features.
+# Xecho "<Publish Property=\"INSTALLLEVEL\" Value=\"4\" />" >> $OutSet
+# Xecho "<Publish Event=\"SetInstallLevel\" Value=\"4\" />" >> $OutSet
+
+}
+
+# ProcessLinks(INLINKS, OUTFEATURES)
+# Process the INLINKS file, and produce XML on stdout.
+# Each line of the input file requires the creation
+# of a '.URL' file in the installation, and a Shortcut
+# in the Windows menu to point to that.
+# Also add the components generated to a feature, put in OUTFEATURES.
+#
+# TODO: We ought to have a Features column in the links.in file,
+# otherwise, the local doc link is always installed.
+#
+ProcessLinks() {
+ # Set a var to a carriage return without actually putting one in this file
+ local CR=`echo A | tr A '\015'`
+ local InLinks="infiles.tmp"; CleanInputFile "$1" "$InLinks" 3 4
+ local here_win=`cygpath -w $(pwd)`
+ # TODO: maybe get a real modification time, but not sure why we need it.
+ local MODTIMEHEX="0000000007DCC301DE"
+ XmlLevel=6
+ local OutFeatures="$2"
+
+ Xecho + "<Feature Id=\"LinksFeature\" Title=\"Links\"" >> $OutFeatures
+ Xecho " Description=\"Links\" Display=\"hidden\"" >> $OutFeatures
+ Xecho " Level=\"1\" AllowAdvertise=\"no\"" >> $OutFeatures
+ Xecho " ConfigurableDirectory=\"INSTALLUTIL\"" >> $$OUTFeatures
+ Xecho " Absent=\"disallow\">" >> $OutFeatures
+
+ Xecho "<DirectoryRef Id=\"INSTALLUTIL\">"
+ Xecho " <Directory Id=\"INSTALLURL\" Name=\"url\">"
+ Xecho "WIX_DB_SET_CURDIR(/installutil/url)"
+ cat $InLinks | (
+ read line
+ while [ "$line" != '' ]; do
+ local Shortname=`echo "$line" | cut -f 1 | StripDoubleQuotes`
+ local Name=`echo "$line" | cut -f 2 | StripDoubleQuotes`
+ local Url=`echo "$line" | cut -f 3 | StripDoubleQuotes`
+ read line
+
+ # We register the name .bdbsc extension to get the proper icon
+ local UrlName="$Shortname.bdbsc"
+ local UrlShortName="$Shortname.d1b"
+ local TargetFile="[INSTALLDIR]\\installutil\\url\\$UrlName"
+ local CreateUrlFile=true
+ local CommandShortcut=false
+ local Program=""
+ case "$Url" in
+ file:* ) CreateUrlFile=false
+ TargetFile=`echo $Url | sed -e 's/file://'`
+ TargetFile="[INSTALLDIR]"`cygpath -w $TargetFile`;;
+ cmd:* ) CreateUrlFile=false
+ UrlName="$Shortname.bat"
+ UrlShortName="$Shortname.bat"
+ TargetFile="[INSTALLDIR]\\installutil\\url\\$UrlName"
+ Program=`echo $Url | sed -e 's/cmd://'`
+ CommandShortcut=true;;
+ esac
+
+ Xecho "WIX_DB_SET_CURFILE($Shortname)"
+ Xecho + "<Component Id=\"Links.$Shortname\""
+ Xecho " $PERSISTGUID"
+ Xecho " SharedDllRefCount=\"yes\" Location=\"either\">"
+
+ if $CreateUrlFile; then
+ echo "[Default]$CR" > $UrlName
+ echo "BASEURL=$Url$CR" | RunM4 >> $UrlName || exit 1
+ echo "[InternetShortcut]$CR" >> $UrlName
+ echo "URL=$Url$CR" | RunM4 >> $UrlName || exit 1
+ echo "Modified=$MODTIMEHEX$CR" >> $UrlName
+ # TODO: we could have an Entry for IconFile=oracleweb.ico IconIndex=1?
+ echo ''
+ Xecho "<File Id=\"File.$Shortname\" "
+ Xecho " LongName=\"$UrlName\" Name=\"$UrlShortName\""
+ Xecho " Compressed=\"yes\" DiskId=\"1\""
+ Xecho " src=\"$here_win\\$UrlName\" />"
+ fi
+
+ if $CommandShortcut; then
+ echo "@echo off" > $UrlName
+ echo "set DBROOTDIR=" >> $UrlName
+ echo "for /F \"tokens=3 delims= \" %%A in ('REG QUERY \"HKLM\\SOFTWARE\\Oracle\\$PRODUCT_NAME\\$PRODUCT_VERSION\" /v RootDirectory') do set DBROOTDIR=%%A" >> $UrlName
+ echo "if ERRORLEVEL 2 goto MISSING" >> $UrlName
+ echo "if not defined DBROOTDIR goto MISSING" >> $UrlName
+ echo "set FN=\"%DBROOTDIR%$Program\"" >> $UrlName
+ echo "if not exist %FN% goto NOTFOUND" >> $UrlName
+ echo "cmd /k \"%DBROOTDIR%$Program\"$CR" >> $UrlName
+ echo "goto END" >> $UrlName
+ echo ":NOTFOUND" >> $UrlName
+ echo "echo" >> $UrlName
+ echo "echo Error: The program does not appear to be installed." >> $UrlName
+ echo "echo" >> $UrlName
+ echo "cmd /k" >> $UrlName
+ echo "goto END" >> $UrlName
+ echo ":MISSING" >> $UrlName
+ echo "echo" >> $UrlName
+ echo "echo NOTE:" >> $UrlName
+ echo "echo The $PRODUCT_NAME version could not be determined." >> $UrlName
+ echo "echo If you are running on Windows 2000, make sure the" >> $UrlName
+ echo "echo REG.EXE program is installed from the Tools disk" >> $UrlName
+ echo "echo" >> $UrlName
+ echo "cmd /k" >> $UrlName
+ echo ":END" >> $UrlName
+
+ Xecho "<File Id=\"File.$Shortname\" "
+ Xecho " LongName=\"$UrlName\" Name=\"$UrlShortName\""
+ Xecho " Compressed=\"yes\" DiskId=\"1\""
+ Xecho " src=\"$here_win\\$UrlName\" />"
+
+ Xecho "<Shortcut Id=\"Short.$Shortname\" Directory=\"BerkeleyDbMenu\""
+ Xecho " Name=\"$Shortname\" LongName=\"$Name\""
+ Xecho " WorkingDirectory=\"INSTALLDIR\""
+ Xecho " Target='$TargetFile'"
+ Xecho " Show=\"normal\" />"
+ else
+ Xecho "<Shortcut Id=\"Short.$Shortname\" Directory=\"BerkeleyDbMenu\""
+ Xecho " Name=\"$Shortname\" LongName=\"$Name\""
+ Xecho " Target='$TargetFile'"
+ Xecho " Show=\"normal\" />"
+ fi
+
+
+ Xecho - "</Component>"
+
+ Xecho "<ComponentRef Id=\"Links.$Shortname\" />" >> $OutFeatures
+ done
+ return 0
+ ) || Error "Error processing links" || exit 1
+
+ Xecho "</Directory>"
+ Xecho "</DirectoryRef>"
+ Xecho - "</Feature>" >> $OutFeatures
+}
+
+# ProcessOneDirectory(DIRECTORYNAME)
+# Called by ProcessFeatures.
+# Argument is the directory name to process
+# Standard input is cleaned up files.in (dirname is 3rd column)
+# Standard output will be WiX XML Component/File entries
+#
+ProcessOneDirectory()
+{
+ Dir="$1"
+ grep " ${Dir} " | (
+ read line
+ while [ "$line" != '' ]; do
+ local feature=`echo "$line" | cut -f 1`
+ local srcfile=`echo "$line" | cut -f 2`
+ local targetdir=`echo "$line" | cut -f 3`
+ local shortname=`echo "$line" | cut -f 4`
+
+ ProcessOneDirectoryFile "$feature" "$srcfile" "$targetdir" "$shortname" || exit 1
+ read line
+ done
+ return 0
+ ) || Error "Error processing directory $Dir" || exit 1
+}
+
+# ProcessOneDirectoryFile(DIRECTORYNAME)
+# Called by ProcessOneDirectory to process a single file in a directory.
+# Standard output will be a single WiX XML Component/File entries
+#
+ProcessOneDirectoryFile()
+{
+ local feature="$1"
+ local srcfile="$2"
+ local targetdir="$3"
+ local shortname="$4"
+ local base=`basename $srcfile`
+
+ #echo "processing file $srcfile in $feature to directory $targetdir..." >&2
+
+ # Prepend the WIX_DB_TOP unless the source file is absolute
+
+ local root=
+ local checkfile=
+ local wsrcfile=
+
+ case "$srcfile" in
+ /* ) root=""
+ wsrcfile=`cygpath -w $srcfile`
+ checkfile="$srcfile"
+ ;;
+ * ) root="$PRODUCT_BLDDIR/"
+ wsrcfile="WIX_DB_TOP()\\`cygpath -w $srcfile`"
+ checkfile="$PRODUCT_BLDDIR/$srcfile"
+ ;;
+ esac
+
+ # If srcfile ends in / then we'll use tallow to walk the directory
+ case "$srcfile" in
+ */ ) if [ ! -d "$root$srcfile" ]; then
+ Error "$root$srcfile: not a directory"
+ exit 1
+ fi
+ Progress -minor " expanding $root$srcfile..."
+ RunTallow "$root$srcfile"
+ return 0
+ ;;
+ *'*'* )
+ local dirname=`dirname "$root$srcfile"`
+ RunTallow "$dirname" -df "$base"
+ return 0
+ ;;
+ esac
+
+ if [ "$shortname" = '' ]; then
+ shortname=`GetShortName "$base"`
+ fi
+ ID=`NextId`
+
+ if [ ! -r "$checkfile" ]; then
+ Error "$srcfile: file in feature $feature does not exist"
+ Error " curdir=`pwd`, pathname=$checkfile"
+ exit 1
+ fi
+
+ Xecho "WIX_DB_SET_CURFILE(${base})"
+ Xecho + "<Component Id=\"$feature.$ID\" Location=\"either\" $PERSISTGUID>"
+ Xecho "<File Id=\"${feature}.${ID}\" Name=\"${shortname}\" LongName=\"${base}\" Compressed=\"yes\" KeyPath=\"yes\" DiskId=\"1\" src=\"${wsrcfile}\" />"
+ Xecho - "</Component>"
+ return 0
+}
+
+# ProcessOneFeature(FEATUREPATH, SHORTNAME, DESCRIPTION, OPTS, INDIRECTORYFILE,
+# OUTFEATURE, OUTSET)
+# Called by ProcessFeatures to process a line in the features.in file.
+# The first three arguments are the values of the first three columns:
+# the feature dependency path (e.g. "Java/JavaExamples"), the short
+# name, and a descriptive name. The last argument is the directory
+# file that lists the components. We use the last name of the feature
+# path (e.g. JavaExamples) to locate all components (really directories)
+# named accordingly, so they can be listed as needed parts of the Feature.
+# Standard output will be WiX XML Feature entries.
+#
+ProcessOneFeature() {
+ local featurename="$1"
+ local shortname="$2"
+ local opts="$4"
+ local dirfile="$5"
+ local outfeature="$6"
+ local outset="$7"
+
+ XmlLevel=4
+ local featcount=0
+ local featurestring=""
+ if [ $(SlashCount $featurename) -gt 0 ]; then
+ local parent=`echo $featurename | sed -e 's:/[^/]*$::' -e 's:.*/::'`
+ featurename=`echo $featurename | sed -e 's:^.*/::'`
+ featcount=1
+ Xecho "<FeatureRef Id=\"$parent\">" >> $outfeature
+ fi
+
+
+ # TODO: how to get +default to work?
+ # have tried messing with level="0" (doesn't show it)
+ # InstallDefault=\"source\" (doesn't make a difference)
+ #
+ local leveldebug="Level=\"4\""
+ local levelparam="Level=\"1\""
+ local leveldisable="Level=\"0\""
+ local defparam="InstallDefault=\"source\""
+ local displayparam="Display=\"expand\""
+ local params="AllowAdvertise=\"no\""
+ local regfeature=""
+
+ local descparam=""
+ if [ "$3" != '' ]; then
+ descparam="Description=\"$3\""
+ fi
+
+ local opt
+ local reqtext=""
+ local isdebugFeature=false
+ for opt in $opts; do
+ case "$opt" in
+ +default ) ;;
+ +required ) params="$params Absent=\"disallow\""
+ reqtext=" (required)";;
+ +invisible ) displayparam="Display=\"hidden\""
+ params="$params Absent=\"disallow\"";;
+ +debug ) isdebugFeature=true;;
+
+ * ) Error "features.in: Bad option $opt"
+ exit 1;;
+ esac
+ done
+
+
+# (PBR)
+# I tried to get debugging features to work but I could not. The last thing I
+# tried was to set either ADDSOURCE or INSTALLLEVEL. Neither of these solutions
+# will cause the feature conditions to rerun. The only thing I've found to do
+# that is to rerun CostFinalize. The problem with this is it will re-enable all
+# the options again. I'm keeping the basic framework for +debug support
+ if "$isdebugFeature"; then
+ regfeature="${featurename:1}"
+ echo "regfeature = $regfeature"
+
+ Xecho + "<Feature Id=\"$featurename\" Title=\"$shortname$reqtext\" $descparam $params $displayparam $leveldebug $defparam>" >> $outfeature
+ else
+ Xecho + "<Feature Id=\"$featurename\" Title=\"$shortname$reqtext\" $descparam $params $displayparam $levelparam $defparam>" >> $outfeature
+ fi
+
+
+ grep 'Component.*Id="'$featurename'[.0-9]*"' "$dirfile" | sed -e 's/\(Id="[^"]*"\).*/\1 \/>/' -e 's/Component /ComponentRef /' >> $outfeature
+
+ # Create a separate subfeature for any environment variables
+ # associated with the main feature.
+ # The <Condition> stuff is the magic that enables/disables
+ # setting the environment variables depending on the check box property.
+
+ Xecho + "<Feature Id=\"env.$featurename\" Title=\"env vars\" $params Display=\"hidden\" $levelparam $defparam>" >> $outfeature
+
+ Xecho "<Condition $leveldisable><![CDATA[EnvironmentSetCheck<>1]]></Condition>" >> $outfeature
+ Xecho "<Condition $levelparam><![CDATA[EnvironmentSetCheck=1]]></Condition>" >> $outfeature
+ grep 'Component.*Id="env\.'$featurename'[.0-9]*"' "$dirfile" | sed -e 's/\(Id="[^"]*"\).*/\1 \/>/' -e 's/Component /ComponentRef /' >> $outfeature
+
+ Xecho - "</Feature>" >> $outfeature
+ Xecho - "</Feature>" >> $outfeature
+
+ while [ "$featcount" -gt 0 ]; do
+ Xecho - "</FeatureRef>" >> $outfeature
+ featcount=$(($featcount - 1))
+ done
+
+ # Append the name to the feature list if it is to be installed.
+ # This publish fragment gets 'executed' when leaving the
+ # dialog to select features. Note that we have to quote
+ # the comma for m4 (`,') since this appears in a macro usage.
+ #
+
+# (PBR)
+# This code sets ADDSOURCE to show which debug options to include. This does not work
+ # If this is a debug feature, only turn on the value if the parent is on
+ if "$isdebugFeature"; then
+ regfeature="${featurename:1}"
+
+# Xecho "<Publish Property=\"ADDSOURCE\" Value=\"[ADDSOURCE]\`,'\">" >> $outset
+# Xecho " <![CDATA[&${regfeature} = 3 AND DebugCheck=\"yes\" AND ADDSOURCE <> NULL]]></Publish>" >> $outset
+
+# Xecho "<Publish Property=\"ADDSOURCE\" Value=\"[ADDSOURCE]${featurename}\">" >> $outset
+# Xecho " <![CDATA[&${regfeature} = 3 AND DebugCheck=\"yes\"]]></Publish>" >> $outset
+
+ Xecho "<Publish Property=\"FeatureList\" Value=\"[FeatureList]\`,' ${shortname}\">" >> $outset
+ Xecho " <![CDATA[&${regfeature} = 3 AND DebugCheck=\"yes\"]]></Publish>" >> $outset
+
+ else
+ Xecho "<Publish Property=\"FeatureList\" Value=\"[FeatureList]\`,' ${shortname}\">" >> $outset
+ Xecho " <![CDATA[&${featurename} = 3]]></Publish>" >> $outset
+ fi
+}
+
+# ProcessOneEnv(FEATURE, ENVNAME, ENVVALUE, OPTS, OUTDIRS, OUTSET)
+# Called by ProcessFeatures to process a line in the environment.in file.
+# The four arguments are the values of the four columns.
+# The output will be into two files:
+# OUTDIRS: WiX XML Component entries, that contain environment values.
+# This controls the actual setting of the variables.
+# OUTSET: WiX XML to set the installer variables if an env variable
+# is set or a feature selected.
+#
+ProcessOneEnv() {
+ local feature="$1"
+ local envname="$2"
+ local envvalue="$3"
+ local opts="$4"
+ local outdirs="$5"
+ local outset="$6"
+
+ # Make the path uniform.
+ # echo "c:\Program Files\...\/Lib/Hello" | sed -e 's:\\/:\\:' -e 's:/:\\:g`
+ # This produces c:\Program Files\...\Lib\Hello
+ case "$envvalue" in
+ /* ) envvalue=`echo "$envvalue" | sed -e 's:^/::'`
+ esac
+
+ local path="[INSTALLDIR]$envvalue"
+
+ local opt
+ part="last"
+ for opt in $opts; do
+ case "$opt" in
+ +first ) part="first";;
+ +last ) part="last";;
+ * ) Error "environment.in: Bad option $opt"
+ exit 1;;
+ esac
+ done
+
+ # Generate the OUTDIRS fragment
+ # This looks like:
+ #
+ # <Component Id="env.CoreAPI.43" Guid="4B75755F-1129-292C-3434-238410000247">
+ # <Environment Id="env.44" Name="+-LIB" Action="set"
+ # Permanent="no" Part="first" Value="[INSTALLDIR]Lib" />
+ # </Component>
+ #
+ # Having a unique guid makes uninstall work.
+ # Note: We really want these installed as System rather than
+ # User vars (using the System="yes" tag), but only if user
+ # installs for *all* users. There is no convenient way to
+ # do that, so we leave them as default (User variables).
+
+
+ XmlLevel=4
+ local Id=`NextId`
+ Xecho "WIX_DB_SET_CURFILE(${envname})" >> $outdirs
+ Xecho + "<Component Id=\"env.$feature.$Id\" $PERSISTGUID>" >> $outdirs
+ Id=`NextId`
+
+ Xecho "<Environment Id=\"env.$Id\" Name=\"+-$envname\" Action=\"set\"" >> $outdirs
+ Xecho " Permanent=\"no\" Part=\"$part\" Value=\"$path\" />" >> $outdirs
+
+ Xecho "</Component>" >> $outdirs
+
+ # Generate the OUTSET fragment
+ # This looks like:
+ #
+ # <Publish Property="CLASSPATHValue" Value="[INSTALLDIR]Lib/db.jar;[CLASSPATHValue]">
+ # <![CDATA[&JavaAPI = 3]]></Publish>
+ # <Publish Property="CLASSPATHEscValue" Value="[INSTALLDIR]Lib/db.jar;[CLASSPATHEscValue]">
+ # <![CDATA[&JavaAPI = 3]]></Publish>
+ #
+ # This is equivalent to pseudocode:
+ # if (InstallFeature(JavaAPI)) {
+ # Prepend CLASSPATHValue with "Lib/db.jar;"
+ # Prepend CLASSPATHEscValue with "Lib/db.jar;"
+ # }
+ #
+ XmlLevel=4
+ Xecho "<Publish Property=\"${envname}Value\" Value=\"[INSTALLDIR]${envvalue};[${envname}Value]\">" >> $outset
+ Xecho " <![CDATA[&${feature} = 3]]></Publish>" >> $outset
+
+ Xecho "<Publish Property=\"${envname}EscValue\" Value=\"[INSTALLDIR]${envvalue};[${envname}EscValue]\">" >> $outset
+ Xecho " <![CDATA[&${feature} = 3]]></Publish>" >> $outset
+
+
+}
+
+# CreateProperty(ID, VALUE)
+# Generate a <Property...> tag on the stdout
+CreateProperty() {
+ Xecho "<Property Id=\"$1\" Hidden=\"yes\"><![CDATA[$2]]></Property>"
+}
+
+# ProcessTagProperties(OUTPROPS)
+# Generate some identification tags as properties.
+# This will let us look at an installer and figure out
+# when it was built, etc.
+ProcessTagProperties() {
+ local outprops="$1"
+ local insdate=`date`
+ XmlLevel=4
+
+ CreateProperty _DB_MSI_INSTALLER_DATE "$insdate" >> $outprops
+ CreateProperty _DB_MSI_PRODUCT_NAME "$PRODUCT_NAME" >> $outprops
+ CreateProperty _DB_MSI_PRODUCT_VERSION "$PRODUCT_VERSION" >> $outprops
+ CreateProperty ARPCOMMENTS "Installer for $PRODUCT_NAME $PRODUCT_VERSION built on $insdate" >> $outprops
+}
+
+# ProcessEnv(INENVFILE, INBATFILE, OUTPROPS, OUTSET, OUTSHOW)
+# We generate some Property magic to show the user what is set.
+#
+ProcessEnv() {
+ InEnv="inenv.tmp"; CleanInputFile "$1" "$InEnv" 3 4
+ inbat="$2"
+ outprops="$3"
+ outset="$4"
+ outshow="$5"
+
+ # Get a list of the environment variables
+ local envvar
+ local envvars=`cut -f 2 < $InEnv | sort | uniq`
+
+ # For each environment var, create lines that declare
+ # a pair of properties in the envprops.wixinc file like:
+ #
+ # <Property Id="CLASSPATHValue" Hidden="yes"></Property>
+ # <Property Id="CLASSPATHEscValue" Hidden="yes"></Property>
+ #
+ # And create lines in the envset.wixinc file like:
+ #
+ # <Publish Property="CLASSPATHValue" Value="%CLASSPATH%">
+ # <![CDATA[1]]></Publish>
+ # <Publish Property="CLASSPATHEscValue" Value="\\%CLASSPATH\\%">
+ # <![CDATA[1]]></Publish>
+ #
+ # More will be added to that file later.
+ # Then, create lines in the envshow.wixinc file like:
+ #
+ # <Control Id="CLASSPATHText" Type="Text"
+ # X="23" Width="316" PARTIALHEIGHT(10, 2)
+ # TabSkip="no" Text="CLASSPATH:" />
+ #
+ # <Control Id="CLASSPATHValueText" Type="Text"
+ # X="37" Width="316" PARTIALHEIGHT(20, 7)
+ # TabSkip="no" Text="[CLASSPATHValue]" />
+
+ for envvar in $envvars; do
+ XmlLevel=4
+ CreateProperty "${envvar}Value" "" >> $outprops
+ CreateProperty "${envvar}EscValue" "" >> $outprops
+
+ XmlLevel=4
+ Xecho "<Publish Property=\"${envvar}Value\" Value=\"%${envvar}%\">" >> $outset
+ Xecho " <![CDATA[1]]></Publish>" >> $outset
+ Xecho "<Publish Property=\"${envvar}EscValue\" Value=\"\\%${envvar}\\%\">" >> $outset
+ Xecho " <![CDATA[1]]></Publish>" >> $outset
+
+ XmlLevel=4
+ Xecho "<Control Id=\"${envvar}Text\" Type=\"Text\"" >> $outshow
+ Xecho " X=\"23\" Width=\"316\" PARTIALHEIGHT(10, 2)" >> $outshow
+ Xecho " TabSkip=\"no\" Text=\"${envvar}:\" />" >> $outshow
+
+ Xecho "<Control Id=\"${envvar}ValueText\" Type=\"Text\"" >> $outshow
+ Xecho " X=\"37\" Width=\"316\" PARTIALHEIGHT(20, 7)" >> $outshow
+ Xecho " TabSkip=\"no\" Text=\"[${envvar}Value]\" />" >> $outshow
+
+ done
+
+ # Create the dbvars.bat file from the .bat template file
+ # TODO: the bat template file currently knows the variables
+ # and their values, it should get them from the environment.in
+
+ RunM4 <"$inbat" >"$PRODUCT_STAGE/dbvars.bat" || Error "m4 failed" || exit 1
+}
+
+
+# CleanInputFile(INFILENAME, OUTFILENAME, MINELEMENTS, MAXELEMENTS)
+# A filter to preprocess and validate input files.
+# We end up without comment lines, a single tab between elements,
+# and a trailing tab.
+# Also some selected shell variables are expanded for convenience.
+# We verify that each line has the number of elements that fall within
+# the given min and max.
+#
+CleanInputFile() {
+ sed \
+ -e 's/#.*//' \
+ -e 's/ * / /g' \
+ -e 's/ */ /g' \
+ -e '/^[ ]*$/d' \
+ -e 's/$/ /' \
+ -e 's/ */ /g' \
+ -e 's:\${PRODUCT_VERSION}:'"${PRODUCT_VERSION}":g \
+ -e 's:\${PRODUCT_MAJOR}:'"${PRODUCT_MAJOR}":g \
+ -e 's:\${PRODUCT_MINOR}:'"${PRODUCT_MINOR}":g \
+ -e 's:\${PRODUCT_PATCH}:'"${PRODUCT_PATCH}":g \
+ -e 's:\${PRODUCT_MAJMIN}:'"${PRODUCT_MAJMIN}":g \
+ -e 's:\${PRODUCT_MSVC_VERSION}:'"${PRODUCT_MSVC_VERSION}":g \
+ -e 's:\${PRODUCT_STAGE}:'"${PRODUCT_STAGE}":g \
+ -e 's:\${PRODUCT_SHARED_WINMSIDIR}:'"${PRODUCT_SHARED_WINMSIDIR}":g \
+ -e 's/^[\r \t]*$//' \
+ < "$1" > "$2"
+
+ # count tabs on each line
+ sed -e 's/[^\t]//g' -e 's/[\t]/x/g' < "$2" | (
+ read line
+ linecount=1
+ while [ "$line" != '' ]; do
+ chars=`echo "$line" | wc -c`
+ chars=$(($chars - 1)) # Remove newline
+ if [ "$chars" -lt "$3" -o "$chars" -gt "$4" ]; then
+ Error "$1: Input file error on or after line $linecount"
+ fi
+ read line
+ linecount=$(($linecount + 1))
+ done
+ )
+}
+
+# StripDoubleQuotes()
+# In some input files, we allow double quotes around
+# multi-word strings for readability. We strip them
+# here from standard input and write to standard output.
+# We only expect them at the beginning and end.
+#
+StripDoubleQuotes() {
+ sed -e 's/^"//' -e 's/"$//'
+}
+
+# IndentXml(PLUSMINUS_ARG)
+# A global variable $XmlLevel is kept for the indent level.
+# Every call creates blank output that matches the indent level.
+# In addition, with a '-' argument, the indent level
+# decrements by one before printing.
+# With a '+', the indent level increments after printing.
+# This is generally just used by Xecho
+#
+XmlLevel=0
+IndentXml() {
+ if [ "$1" = '-' -a $XmlLevel != 0 ]; then
+ XmlLevel=$(($XmlLevel - 1))
+ fi
+ local idx=0
+ while [ "$idx" != "$XmlLevel" ]; do
+ echo -n ' '
+ idx=$(($idx + 1))
+ done
+ if [ "$1" = '+' ]; then
+ XmlLevel=$(($XmlLevel + 1))
+ fi
+}
+
+# Xecho [ - | + ] ...
+# echoes arguments (like) echo, except that the output
+# is indented for XML first. If +, the indentation changes
+# after printing, if -, the indentation changes before printing.
+#
+Xecho()
+{
+ local xarg=
+ if [ "$1" = '-' -o "$1" = '+' ]; then
+ xarg="$1"
+ shift
+ fi
+ IndentXml $xarg
+ echo "$@"
+}
+
+# SlashCount(PATH)
+# Returns the number of slashes in its argument
+# Note, we are relying on some advanced
+# features of bash shell substitution
+#
+SlashCount()
+{
+ local allslash=`echo "$1" | sed -e 's:[^/]*::g'`
+ echo "${#allslash}"
+}
+
+# ProcessDirTransition(PREVDIR, NEXTDIR)
+# Used by ProcessFeatures to create the parts
+# of an WiX <Directory> heirarchy (on stdout) needed to
+# transition from directory PREVDIR to NEXTDIR.
+# This may include any needed </Directory> entries as well.
+# For example, ProcessDirTransition /Bin/Stuff /Bin/Foo/Bar
+# produces:
+# </Directory> ...to go up one from 'Stuff'
+# <Directory Foo>
+# <Directory Bar>
+#
+ProcessDirTransition() {
+ local p="$1"
+ local n="$2"
+ if [ "$p" = '' ]; then p=/; fi
+ if [ "$n" = '' ]; then n=/; fi
+ local nextdir="$2"
+
+ # The number of slashes in $p is the current directory level.
+ XmlLevel=$(($(SlashCount $p) + 4))
+
+ while [ "$p" != / ]; do
+ if [ "${n#${p}}" != "$n" ]; then
+ break
+ fi
+
+ # go up one level, and keep $p terminated with a /
+ p=`dirname $p`
+ case "$p" in
+ */ ) ;;
+ * ) p=$p/;;
+ esac
+ Xecho - "</Directory>"
+ done
+ n=${n#${p}}
+ while [ "$n" != '' ]; do
+ local dirname=`echo $n | sed -e 's:/.*::'`
+ local cleanname=`CleanFileName "$dirname"`
+ local shortname=`GetShortName "$cleanname"`
+ local dirid=`NextId`
+
+ local larg=""
+ if [ "${shortname}" != "${dirname}" ]; then
+ larg="LongName=\"${dirname}\""
+ fi
+ Xecho + "<Directory Id=\"${cleanname}Dir.$dirid\" Name=\"${shortname}\" $larg>"
+
+ n=`echo $n | sed -e 's:^[^/]*/::'`
+ done
+
+ Xecho "WIX_DB_SET_CURDIR($nextdir)" # Tell the m4 macro what the current dir is
+}
+
+# SetupErrorLog()
+# Given the global variable ERRORLOG for the name of the
+# error output file, do any setup required to make that happen.
+#
+SetupErrorLog() {
+
+ # Before we start to use ERRORLOG, we get a full pathname,
+ # since the caller may change directories at times.
+ case "$ERRORLOG" in
+ /* ) ;;
+ *) ERRORLOG=`pwd`"/$ERRORLOG" ;;
+ esac
+
+ rm -f $ERRORLOG
+
+ # File descriptor tricks.
+ # Duplicate current stderr to 15, as we'll occasionally
+ # need to report progress to it. Then, redirect all
+ # stderr from now on to the ERRORLOG.
+ #
+ exec 15>&2
+ exec 2>>$ERRORLOG
+}
+
+# RequireCygwin
+# Cygwin does not install certain needed components by default.
+# Check to make sure that everything needed by the script
+# and functions is here.
+#
+RequireCygwin() {
+ Progress -minor "checking for Cygwin..."
+ RequireFileInPath PATH "$PATH" m4
+ RequireFileInPath PATH "$PATH" gcc
+ RequireFileInPath PATH "$PATH" make
+ RequireFileInPath PATH "$PATH" unzip
+ RequireFileInPath PATH "$PATH" bc
+ RequireFileInPath PATH "$PATH" openssl # needed for MD5 hashing
+}
+
+# RequireJava()
+# A java SDK (with include files) must be installed
+#
+RequireJava() {
+ Progress -minor "checking for Java..."
+ RequireFileInPath INCLUDE "$INCLUDE" jni.h
+ RequireFileInPath INCLUDE "$INCLUDE" jni_md.h
+ RequireFileInPath PATH "$PATH" jar.exe
+ RequireFileInPath PATH "$PATH" javac.exe
+}
+
+# RequireTcl()
+# A Tcl SDK (with compatible .lib files) must be installed
+#
+RequireTcl() {
+ Progress -minor "checking for Tcl..."
+ RequireFileInPath INCLUDE "$INCLUDE" tcl.h
+ RequireFileInPath LIB "$LIB" tcl84g.lib
+ RequireFileInPath LIB "$LIB" tcl84.lib
+}
+
+# RequireWix()
+# WiX must be installed
+#
+RequireWix() {
+ Progress -minor "checking for WiX..."
+ RequireFileInPath PATH "$PATH" candle.exe
+ RequireFileInPath PATH "$PATH" light.exe
+ RequireFileInPath PATH "$PATH" tallow.exe
+}
+
+# RequirePerl()
+# Perl must be installed
+#
+RequirePerl() {
+ Progress -minor "checking for Perl..."
+ RequireFileInPath PATH "$PATH" perl.exe
+}
+
+# RequirePython()
+# Python (and include files) must be installed
+#
+RequirePython() {
+ Progress -minor "checking for Python..."
+ RequireFileInPath INCLUDE "$INCLUDE" Python.h
+ RequireFileInPath PATH "$PATH" python.exe
+}
+
+# CreateDbPerl()
+# Build Perl interface (for Berkeley DB only).
+#
+CreateDbPerl() {
+
+ # First build Berkeley DB using cygwin, as that version is
+ # needed for the Perl build
+ local here=`pwd`
+ Progress "building using Cygwin tools (needed for perl)"
+ cd "${PRODUCT_DBBUILDDIR}"
+ insdir="${PRODUCT_STAGE}/install_unix"
+ ../dist/configure --prefix="$insdir" >>$ERRORLOG || exit 1
+ make install >>$ERRORLOG || exit 1
+
+ Progress "building perl"
+ cd ../perl/BerkeleyDB
+ BERKELEYDB_INCLUDE="$insdir/include" BERKELEYDB_LIB="$insdir/lib" \
+ perl Makefile.PL >>$ERRORLOG || exit 1
+ make >>$ERRORLOG
+ cd $here
+}
+
+# CreateWindowsSystem()
+# Copy Windows system files
+#
+CreateWindowsSystem() {
+ local here=`pwd`
+ Progress "Copy Windows system files..."
+ cd "${PRODUCT_SUB_BLDDIR}"
+
+ if [ $PRODUCT_MSVC_VERSION = "80" ]; then
+ cp -f "$MSVC_ROOT_DIR/VC/redist/x86/Microsoft.VC80.CRT/msvcm80.dll" build_windows/Win32/Release/ || exit 1
+ cp -f "$MSVC_ROOT_DIR/VC/redist/x86/Microsoft.VC80.CRT/msvcp80.dll" build_windows/Win32/Release/ || exit 1
+ cp -f "$MSVC_ROOT_DIR/VC/redist/x86/Microsoft.VC80.CRT/msvcr80.dll" build_windows/Win32/Release/ || exit 1
+ cp -f "$MSVC_ROOT_DIR/VC/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest" build_windows/Win32/Release/ || exit 1
+ cp -f "$MSVC_ROOT_DIR/VC/redist/x86/Microsoft.VC80.CRT/msvcm80.dll" build_windows/Win32/Debug/ || exit 1
+ cp -f "$MSVC_ROOT_DIR/VC/redist/x86/Microsoft.VC80.CRT/msvcp80.dll" build_windows/Win32/Debug/ || exit 1
+ cp -f "$MSVC_ROOT_DIR/VC/redist/x86/Microsoft.VC80.CRT/msvcr80.dll" build_windows/Win32/Debug/ || exit 1
+ cp -f "$MSVC_ROOT_DIR/VC/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest" build_windows/Win32/Debug/ || exit 1
+ else
+ cp -f $SYSTEMROOT/system32/msvcr$PRODUCT_MSVC_VERSION.dll build_windows/Win32/Release/ || exit 1
+ cp -f $SYSTEMROOT/system32/msvcp$PRODUCT_MSVC_VERSION.dll build_windows/Win32/Release/ || exit 1
+ cp -f $SYSTEMROOT/system32/msvcr$PRODUCT_MSVC_VERSION.dll build_windows/Win32/Debug/ || exit 1
+ cp -f $SYSTEMROOT/system32/msvcp$PRODUCT_MSVC_VERSION.dll build_windows/Win32/Debug/ || exit 1
+ fi
+ cd $here
+}
+
+# CreateInclude(DIR, FILES)
+# Create an include directory populated with the files given
+#
+CreateInclude() {
+
+ local incdir="$1"
+ shift
+
+ Progress "creating the "$incdir" directory..."
+ rm -rf "$incdir"
+ mkdir "$incdir" || exit 1
+ cp -r "$@" "$incdir"
+}
+
+# CreateWindowsBuild()
+# Do the windows build as defined by the winbuild.bat file
+#
+CreateWindowsBuild() {
+ local here=`pwd`
+ Progress "building using Windows tools..."
+ cd "${PRODUCT_SUB_BLDDIR}" || exit 1
+
+ # Before starting, copy any installer tools here.
+ # This makes building these tools straightforward
+ # and the results are left in the build directory.
+ #
+ cp -r ${PRODUCT_SHARED_WINMSIDIR}/instenv .
+
+ # We create a wbuild.bat file, which is essentially
+ # identical, except it has the carriage returns added.
+ # This allows us to use our favorite editors on winbuild.bat .
+ #
+ sed -e 's/$//' < ${PRODUCT_STAGE}/../winbuild.bat | tr '\001' '\015' > wbuild.bat
+ rm -f winbld.out winbld.err
+ touch winbld.out winbld.err
+ echo "Build output and errors are collected in" >> $ERRORLOG
+ echo " winbld.{out,err} until the build has completed." >> $ERRORLOG
+ cmd.exe /x /c call wbuild.bat
+ status=$?
+ cat winbld.out >> $ERRORLOG
+ if [ -s winbld.err -o "$status" != 0 ]; then
+ cat winbld.err >> $ERRORLOG
+ Error "Errors during windows build"
+ exit 1
+ fi
+ cd $here
+}
+
+# CreateSources(SOURCESDIR,DOCDIR...)
+# Create the sources directory, ignoring things in the docdirs
+#
+CreateSources() {
+ local sources="$1"
+
+ Progress "creating the Sources directory in $sources..."
+ rm -rf "$sources" "$sources/../docs/"
+ unzip -q -u ../../$OPT_INFILE -d tmp_dir || exit 1
+ mv ./tmp_dir/${dbver}/docs "$sources/../" || exit 1
+ mv ./tmp_dir/${dbver} "$sources" || exit 1
+}
+
+# Usage()
+# Show the usage for this script.
+#
+Usage()
+{
+ echo "Usage: s_winmsi [ options ]" >&2
+ echo "Options: " >&2
+ echo " -input file use file rather than ${PRODUCT_ZIP_FILEFMT}" >&2
+ echo " where X.Y.Z is defined by ../RELEASE" >&2
+ echo " -output file use file rather than ${PRODUCT_MSI_FILEFMT}" >&2
+ echo " where X.Y.Z is defined by ../RELEASE" >&2
+ echo " -usebuild DIR use DIR for exes, DLLs, etc. " >&2
+ echo " rather than building from scratch" >&2
+ echo " -preserve preserve the winmsi/msi_staging directory" >&2
+ echo " -skipgen skip generating m4 include files" >&2
+}
+
+# SetupOptions()
+# Parse command line options and set global variables as indicated below.
+#
+SetupOptions() {
+ OPT_USEBUILD=
+ OPT_PRESERVE=false
+ OPT_CONTINUE=false
+ OPT_INFILE=
+ OPT_OUTFILE=
+ OPT_SKIPGEN=false
+ while [ "$#" -gt 0 ]; do
+ arg="$1"; shift
+ case "$arg" in
+ -usebuild ) OPT_USEBUILD="$1"; shift ;;
+ -skipgen ) OPT_SKIPGEN=true ;;
+ -preserve ) OPT_PRESERVE=true;;
+ -continue ) OPT_CONTINUE=true;;
+ -input ) OPT_INFILE="$1"; shift ;;
+ -output ) OPT_OUTFILE="$1"; shift ;;
+ * )
+ echo "ERROR: Unknown argument '$arg' to s_winmsi" >&2
+ Usage
+ exit 1
+ ;;
+ esac
+ done
+ if [ "$OPT_INFILE" = '' -o ! -f "$OPT_INFILE" ]; then
+ echo "$OPT_INFILE: not found"
+ exit 1
+ fi
+}
+
+# CreateStage()
+# Create the staging area
+#
+CreateStage() {
+ Progress "creating staging area..."
+ if [ "$PRODUCT_STAGE" = '' ]; then
+ Error "PRODUCT_STAGE not set"
+ exit 1
+ fi
+ if ! $OPT_PRESERVE; then
+ trap 'rm -rf ${PRODUCT_STAGE} ; exit 0' 0 1 2 3 13 15
+ fi
+ if ! $OPT_CONTINUE; then
+ rm -rf ${PRODUCT_STAGE} || exit 1
+ else
+ # Cleanup files that would break :)
+ rm -f ${PRODUCT_STAGE}/*wxs || exit 1
+ rm -f ${PRODUCT_STAGE}/*wixinc || exit 1
+ rm -f ${PRODUCT_STAGE}/*tmp || exit 1
+ rm -f ${PRODUCT_STAGE}/*bdbsc || exit 1
+ rm -f ${PRODUCT_STAGE}/tallow* || exit 1
+ fi
+ if [ ! -d ${PRODUCT_STAGE} ]; then
+ mkdir ${PRODUCT_STAGE} || exit 1
+ fi
+
+ cd ${PRODUCT_STAGE}
+
+ Progress "extracting $OPT_INFILE..."
+ unzip -q -u ../../$OPT_INFILE || exit 1
+
+ if [ ! -d $PRODUCT_LICENSEDIR ]; then
+ Error "$OPT_INFILE: no top level $PRODUCT_LICENSEDIR directory"
+ exit 1
+ fi
+
+ # TODO: In the 4.8.12 package this file was not writable, it needs to
+ # be for the build. Make it so. Remove me.
+ chmod 664 ${PRODUCT_SRCDIR}/csharp/doc/libdb_dotnet${PRODUCT_MAJMIN}.XML
+}
+
+# CreateLicenseRtf(LICENSEIN, LICENSERTF)
+# From a text LICENSE file, create the equivalent in .rtf format.
+#
+CreateLicenseRtf() {
+ local licensein="$1"
+ local licensertf="$2"
+
+ if [ ! -f "$licensein" ]; then
+ Error "License file $licensein: does not exist"
+ exit 1
+ fi
+ Progress "creating ${licensertf}..."
+
+ # Build a list of references to components ids (i.e. directories)
+ # that are listed in the .wxs file. This is needed to refer to
+ # all of the source (sadly it appears there is no better way!)
+ #
+ if ! grep '^=-=-=-=' $licensein > /dev/null; then
+ Error "LICENSE has changed format, this script must be adapted"
+ exit 1
+ fi
+
+ sed -e '1,/^=-=-=-=-=/d' < $licensein | MakeRtf > $licensertf
+}
+
+
+# CreateMsi(INFILE,WXSFILE,MSIFILE)
+# Do the final creation of the output .MSI file.
+# It is assumed that all *.wixinc files are now in place.
+# INFILE is an absolute name of the m4 input WiX file.
+# WXSFILE is a short (basename) of the postprocessed WiX file,
+# after macro expansion, it will be left in staging directory.
+# MSIFILE is a short (basename) of the output .MSI name
+#
+CreateMsi() {
+ local infile="$1"
+ local wxs="$2"
+ local msifile="$3"
+ local o=`echo "$wxs" | sed -e 's/[.]wxs$//' -e 's/$/.wixobj/'`
+ local tmpfile="dbcore.wxs.tmp"
+
+ rm -f $o $wxs
+
+ # Preprocess the ${PROD}wix.in file, adding the things we need
+ #
+ Progress "Running m4 to create $wxs..."
+ RunM4 < "$infile" > "$PRODUCT_STAGE/$wxs" || Error "m4 failed" || exit 1
+ # Remove any stray "PUT-GUID-HERE" tags.
+ # They are added by some recent versions of WiX, including 2.0.5805.0
+ # The scripts already insert valid GUIDs.
+ sed -e 's/ Guid="PUT-GUID-HERE" / /' < "$wxs" > "$tmpfile"
+ rm -f "$wxs"
+ mv "$tmpfile" "$wxs"
+
+ local here=`pwd`
+ cd "$PRODUCT_STAGE"
+ rm -f "$o" "$msifile"
+ Progress "compiling $wxs..."
+ candle -w0 $wxs >> $ERRORLOG || Error "candle (compiler) failed" || exit 1
+
+ Progress "linking .msi file..."
+ light -o "$msifile" $o >> $ERRORLOG || Error "light (linker) failed" || exit 1
+ (rm -f "../../$msifile" && mv "$msifile" ../..) >> $ERRORLOG || exit 1
+ cd $here
+}
+
+# CreateWixIncludeFiles()
+# Do all processing of input files to produce
+# the include files that we need to process the Wix input file.
+#
+CreateWixIncludeFiles() {
+ local here=`pwd`
+ cd "$PRODUCT_STAGE"
+ # Touch all the wix include files in case any end up empty.
+ touch directory.wixinc features.wixinc envprops.wixinc \
+ envset.wixinc envshow.wixinc links.wixinc
+
+ Progress "tagging the installer..."
+ ProcessTagProperties envprops.wixinc
+
+ Progress "processing environment..."
+ ProcessEnv ../environment.in ../dbvarsbat.in envprops.wixinc envset.wixinc envshow.wixinc
+
+ Progress "processing features and files..."
+ ProcessFeatures ../files.in ../features.in ../environment.in \
+ directory.wixinc features.wixinc \
+ envset.wixinc
+
+ Progress "processing links..."
+ ProcessLinks ../links.in features.wixinc > links.wixinc
+ cd $here
+}
diff --git a/db-4.8.30/dist/winmsi/winbuild.bat b/db-4.8.30/dist/winmsi/winbuild.bat
new file mode 100644
index 0000000..8b48bf3
--- /dev/null
+++ b/db-4.8.30/dist/winmsi/winbuild.bat
@@ -0,0 +1,97 @@
+@echo off
+:: $Id$
+:: Helper script to build Berkeley DB libraries and executables
+:: using MSDEV
+::
+
+cd build_windows
+
+:: One of these calls should find the desired batch file
+
+call :TryBat "c:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat" && goto BATFOUND0
+
+call :TryBat "c:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat" && goto BATFOUND1
+
+call :TryBat "c:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\vsvars32.bat" && goto BATFOUND2
+
+call :TryBat "c:\Program Files\Microsoft Visual Studio.NET\Common7\Tools\vsvars32.bat" && goto BATFOUND3
+
+goto BATNOTFOUND
+
+:BATFOUND0
+echo Using Visual Studio 2005
+goto BATFOUND
+
+:BATFOUND1
+echo Using Visual Studio .NET 2003
+goto BATFOUND
+
+:BATFOUND2
+echo Using Visual Studio .NET
+echo *********** CHECK: Make sure the binaries are built with the same system libraries that are shipped.
+goto BATFOUND
+
+:BATFOUND3
+echo Using Visual Studio.NET
+echo *********** CHECK: Make sure the binaries are built with the same system libraries that are shipped.
+goto BATFOUND
+
+:BATFOUND
+
+::intenv is used to set environment variables but this isn't used anymore
+::devenv /useenv /build Release /project instenv ..\instenv\instenv.sln >> ..\winbld.out 2>&1
+::if not %errorlevel% == 0 goto ERROR
+
+echo Building Berkeley DB
+devenv /useenv /build "Debug" Berkeley_DB.sln >> ..\winbld.out 2>&1
+if not %errorlevel% == 0 goto ERROR
+devenv /useenv /build "Release" Berkeley_DB.sln >> ..\winbld.out 2>&1
+if not %errorlevel% == 0 goto ERROR
+devenv /useenv /build "Debug" /project db_java Berkeley_DB.sln >> ..\winbld.out 2>&1
+if not %errorlevel% == 0 goto ERROR
+devenv /useenv /build "Release" /project db_java Berkeley_DB.sln >> ..\winbld.out 2>&1
+if not %errorlevel% == 0 goto ERROR
+devenv /useenv /build "Debug" /project db_tcl Berkeley_DB.sln >> ..\winbld.out 2>&1
+if not %errorlevel% == 0 goto ERROR
+devenv /useenv /build "Release" /project db_tcl Berkeley_DB.sln >> ..\winbld.out 2>&1
+if not %errorlevel% == 0 goto ERROR
+echo Building Berkeley DB CSharp API
+devenv /useenv /build "Debug" BDB_dotNet.sln >> ..\winbld.out 2>&1
+if not %errorlevel% == 0 goto ERROR
+devenv /useenv /build "Release" BDB_dotNet.sln >> ..\winbld.out 2>&1
+if not %errorlevel% == 0 goto ERROR
+
+
+goto END
+
+
+:ERROR
+echo *********** ERROR: during win_build.bat *************
+echo *********** ERROR: during win_build.bat ************* >> ..\winbld.err
+exit 1
+goto END
+
+:NSTOP
+echo *********** ERROR: win_build.bat stop requested *************
+echo *********** ERROR: win_built.bat stop requested ************* >> ..\winbld.err
+exit 2
+goto END
+
+:BATNOTFOUND
+echo *********** ERROR: VC Config batch file not found *************
+echo *********** ERROR: VC Config batch file not found ************* >> ..\winbld.err
+exit 3
+goto END
+
+:: TryBat(BATPATH)
+:: If the BATPATH exists, use it and return 0,
+:: otherwise, return 1.
+
+:TryBat
+:: Filename = %1
+if not exist %1 exit /b 1
+call %1
+exit /b 0
+goto :EOF
+
+:END