| 1 | #!/bin/bash - |
| 2 | ############################################################ |
| 3 | # Build Windows Binary Distribution for BDB 11gR2 |
| 4 | # |
| 5 | # Assumes current dir is db/dist inside a clean, unzipped |
| 6 | # tree from a source distribution package |
| 7 | # |
| 8 | # Usage: bash s_winmsi [] |
| 9 | # |
| 10 | # Steps: |
| 11 | # 1. Build release and debug binaries (including java and php) |
| 12 | # 2. Build additional included languages (perl, python) |
| 13 | # 3. Build, or check .wxs file (uses Python) |
| 14 | # 4. Build .msi |
| 15 | # |
| 16 | # db-version.msi ends up in $PRODUCT_BLDDIR/wix |
| 17 | # |
| 18 | # Options: |
| 19 | # TBD -- add some |
| 20 | ############################################################ |
| 21 | |
| 22 | # |
| 23 | # Get utility functions |
| 24 | # |
| 25 | . winmsi/s_winmsi.fcn |
| 26 | |
| 27 | ERRORLOG=winmsi.log |
| 28 | SetupErrorLog |
| 29 | |
| 30 | # Do this before parsing options, we need the version number |
| 31 | . ./RELEASE |
| 32 | dbver=db-$DB_VERSION |
| 33 | |
| 34 | # Set variables used by functions to customize this installer |
| 35 | PRODUCT_NAME=`printf "Berkeley DB %d%sR%d" $DB_VERSION_FAMILY $DB_VERSION_LETTER $DB_VERSION_RELEASE` |
| 36 | PRODUCT_VERSION="$DB_VERSION" |
| 37 | PRODUCT_VERSION_MAJOR="$DB_VERSION_MAJOR" |
| 38 | PRODUCT_VERSION_MINOR="$DB_VERSION_MINOR" |
| 39 | PRODUCT_VERSION_PATCH="$DB_VERSION_PATCH" |
| 40 | PRODUCT_STAGE=`pwd`/.. |
| 41 | PRODUCT_LICENSEDIR="${PRODUCT_STAGE}" |
| 42 | PRODUCT_BLDDIR="${PRODUCT_STAGE}" |
| 43 | REG_KEY_NAME="Berkeley DB" |
| 44 | REG_KEY_VERSION="$PRODUCT_VERSION_MAJOR.$PRODUCT_VERSION_MINOR.$PRODUCT_VERSION_PATCH" |
| 45 | DIST_DIR=`pwd` |
| 46 | MSI_DIR=winmsi |
| 47 | |
| 48 | Progress "s_winmsi starting, errors to $ERRORLOG" |
| 49 | |
| 50 | SetProductDir |
| 51 | |
| 52 | Progress "Building from $PRODUCT_BLDDIR, $dbver is $PRODUCT_SUB_BLDDIR" |
| 53 | |
| 54 | RequireCygwin |
| 55 | RequireJava |
| 56 | RequireWix |
| 57 | RequirePython |
| 58 | RequireXQilla |
| 59 | |
| 60 | # |
| 61 | # Stage source files such as examples, etc *before* |
| 62 | # the build to avoid build artifacts. |
| 63 | # |
| 64 | StageSourceComponents |
| 65 | |
| 66 | # |
| 67 | # Build from source |
| 68 | # |
| 69 | BuildProduct |
| 70 | |
| 71 | # |
| 72 | # Stage runtime files in a directory tree that looks like |
| 73 | # bin, lib, include, etc |
| 74 | # |
| 75 | StageRuntimeComponents |
| 76 | |
| 77 | # |
| 78 | # Build the license file as rtf |
| 79 | # |
| 80 | CreateLicenseRtf ../LICENSE License.rtf |
| 81 | |
| 82 | # |
| 83 | # Build runtime .wxs files |
| 84 | # |
| 85 | CreateRuntimeComponents |
| 86 | |
| 87 | # |
| 88 | # Create the .msi |
| 89 | # |
| 90 | CreateMsi |
| 91 | |
| 92 | Progress "s_winmsi finished, $OPT_OUTFILE created." |
| 93 | exit 0 |
| 94 |