Requirements
------------
1. WiX toolkit v3.0.2420 (http://wix.sourceforge.net)
2. Perl (tested with ActiveState perl 5.8.3)
3. Visual Studio 2005, including Visual C++ and MSBuild
4. Installed tree of postgresql
5. PostgreSQL source tree, configured for MSVC build
6. MIT Kerberos for Windows (from http://web.mit.edu/kerberos/dist/index.html#KFW2.6.5)
Directory layout
----------------
bmp/ Contains bitmap images used in the installer
ca/ Source for custom action DLL
inst/ Utility files installed by the installer that are
not included in postgresql.
package/Contains files included in ZIPs but not in the MSI
txt/ Contains textfiles used in the installer
util/ Contains utility scripts used during build
wxi/ Contains WiX include files (autogenerated)
wxs/ Contains WiX source files
Build preparations
------------------
1. Edit settings.projinc if necessary.
2. Build and install PostgreSQL. The standard options are
(FIXME: equivalent in MSVC build should be put here?)
Building the installer
----------------------
The installer is built using msbuild. From a visual studio commandprompt,
just run:
msbuild
For location-specific targets, look in the local .proj files. A common
target is the clean one. To clean up the tree, simply run:
msbuild /t:clean
in the root, or in a subdirectory.
Installing Kerberos
-------------------
1. Download the source code.
2. Compile and build src\athena\auth\krb5 using VC++ v6 (to avoid additional runtime dependencies
that VC++ 7 and above introduce). This will build comerr32.dll and krb5_32.dll (and others that
aren't required).
3. Convert LIBs (comerr32.lib and krb5_32.lib) from .LIB to .a for MingW:
This should be run from a command prompt rather than Msys as some versions of reimp don't seem to
like msys very much!
4. Install the headers in /mingw/include/krb5 (NOT /mingw/include as there will probably be naming conflicts),
the .a libraries in /mingw/lib, and the DLLs in /mingw/bin.
Building a release
==================
1) Open a Visual Studio command prompt and CD into the BuildTrees directory:
3) Unpack the tarball (this may need to be done using an Msys console):
tar -jxvf postgresql-X.X.X.tar.bz2
4) CD into the msvc directory in the tarball, and copy in the config.pl and
buildenv.bat files required:
cd postgresql-X.X.X/src/tools/msvc
copy c:\pgBuild\BuildEnv.pl.
copy c:\pgBuild\config.pl .
5) Build the release:
build
6) Check we have a good build (you may need to manually run the buildenv.bat
script first):
buildenv
vcregress check
7) Delete any existing installed release from the staging directory (through
Explorer) and then install the release:
install c:\pgBuild\pginst-8.3\pgsql
8) Update the bundled code (pgAdmin, plDebugger, plJava, StackBuilder) in the
installation staging directory.
9) cvs update the pgInstaller tree, and CD into the source directory. Clean
the tree:
cd c:\pgbuild\BuildTrees\pginst
msbuild /t:clean
10) Edit settings.projinc and check the version number. The PGVER setting
includes suffixes such as -beta4, but only the first two digits of the
version number. This is normally only changed during beta/rc and *never*
between minor versions.
11) Regenerate GUIDs if this is a pre-release, or the first of a series (eg.
8.3.0). Essentially, if PGVER is changed (thus changing the installation
directory, the GUIDs should be changed.
12) Check the contents of package/README.txt, package/setup.bat,
package/upgrade.bat, and correct any version numbers as required.
13) cvs commit any changes made.
14) Build the PostgreSQL docs. At present this must be done partially on a
Unix box:
cd postgresql-X.X.X
./configure
cd doc/src/sgml
make htmlhelp
15) Copy *.hh?, *.html and *.css to a temporary directory on the Windows
build machine.
16) Load the htmlhelp project file into HTML Help Workshop, and on both the
Contents and Index tabs, select an entry, and press the Up (or Down)
button to swap it with a sibling. Then, press the opposite button to
return it to it's original position. Finally, press the Save button. This
forces HTML Help Workshop to reformat the files, without which the
compiler may crash.
17) Build htmlhelp.chm, and copy it into pgsql/doc directory under the staging
directory.
18) In the Visual Studio Command Prompt window, run msbuild in the pginst
directory:
msbuild
19) Test the resulting build in both upgrade and install mode.
20) Tag CVS with a tag in the format REL-X_X_X[-BETAX]
21) GPG sign the zip files using detached signatures.
22) Upload the zip files and signatures to the distribution site and verify the
signatures.