On tor, 2011-04-07 at 16:20 -0400, Robert Haas wrote:
> It sure would be nice if someone would write a doc patch, or at least
> a wiki page, explaining all the permutations here... I get the
> impression it's not that hard to set up if you are reasonable
> comfortable working in a Windows environment, but it's pretty
> intimidating if you aren't.
Here's a patch I came up with that matches my experience, but evidently
there could be many others.
diff --git i/doc/src/sgml/install-windows.sgml w/doc/src/sgml/install-windows.sgml
index f6d38c1..d13a161 100644
--- i/doc/src/sgml/install-windows.sgml
+++ w/doc/src/sgml/install-windows.sgml
@@ -19,11 +19,11 @@
<para>
There are several different ways of building PostgreSQL on
<productname>Windows</productname>. The simplest way to build with
- Microsoft tools is to install a modern version of the
- <productname>Microsoft Platform SDK</productname> and use use the included
+ Microsoft tools is to install
+ <productname>Microsoft Visual C++ 2008 Express Edition</productname> and use use the included
compiler. It is also possible to build with the full
<productname>Microsoft Visual C++ 2005 or 2008</productname>. In some cases
- that requires the installation of the <productname>Platform SDK</productname>
+ that requires the installation of the <productname>Windows SDK</productname>
in addition to the compiler.
</para>
@@ -68,17 +68,21 @@
</para>
<sect1 id="install-windows-full">
- <title>Building with <productname>Visual C++</productname> or the
- <productname>Platform SDK</productname></title>
+ <title>Building with <productname>Visual C++</productname></title>
<para>
PostgreSQL can be built using the Visual C++ compiler suite from Microsoft.
These compilers can be either from <productname>Visual Studio</productname>,
- <productname>Visual Studio Express</productname> or recent versions of the
- <productname>Platform SDK</productname>. If you do not already have a
- <productname>Visual Studio</productname> environment set up, the easiest
- way us to use the compilers in the <productname>Platform SDK</productname>,
- which is a free download from Microsoft.
+ <productname>Visual Studio Express</productname> or the
+ <productname>Platform SDK</productname>. (The <productname>Platform
+ SDK</productname> approach is obsolescent. The SDK has been renamed
+ to <productname>Windows SDK</productname> and is included
+ in <productname>Visual Studio Express</productname>). If you do not
+ already have a
+ <productname>Visual Studio</productname> environment set up, the
+ easiest way us to use the <productname>Visual C++
+ Express</productname> component from <productname>Visual Studio
+ Express</productname>, which is a free download from Microsoft.
</para>
<para>
@@ -86,7 +90,9 @@
<productname>Visual Studio 2005</productname> and
<productname>Visual Studio 2008</productname>. When using the Platform SDK
only, or when building for 64-bit Windows, only
- <productname>Visual Studio 2008</productname> is supported.
+ <productname>Visual Studio 2008</productname> is
+ supported. <productname>Visual Studio 2010</productname> is not yet
+ supported and will not work.
</para>
<para>
@@ -94,13 +100,16 @@
are in the <filename>src/tools/msvc</filename> directory. When building,
make sure there are no tools from <productname>MinGW</productname> or
<productname>Cygwin</productname> present in your system PATH. Also, make
- sure you have all the required Visual C++ tools available in the PATH. In
- <productname>Visual Studio</productname>, start the
- <application>Visual Studio Command Prompt</application>. In the
+ sure you have all the required Visual C++ tools available in the PATH. The easiest way to accomplish that, when using
+ <productname>Visual Studio</productname>, is to start the
+ <application>Visual Studio Command Prompt</application> that is installed in the Start menu. When using the
<productname>Platform SDK</productname>, start the
<application>CMD shell</application> listed under the SDK on the Start Menu.
If you wish to build a 64-bit version, you must use the 64-bit version of
the command, and vice versa.
+ </para>
+
+ <para>
All commands should be run from the <filename>src\tools\msvc</filename>
directory.
</para>
@@ -140,18 +149,20 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
<variablelist>
<varlistentry>
- <term><productname>Microsoft Platform SDK</productname></term>
+ <term><productname>Microsoft Visual C++</productname></term>
<listitem><para>
- It is recommended that you upgrade to the latest available version
- of the <productname>Microsoft Platform SDK</productname>, available
- for download from <ulink url="http://www.microsoft.com/downloads/"></>.
+ It is recommended that you use <productname>Microsoft Visual
+ Studio 2008 Express</productname>, available for download
+ from <ulink url="http://www.microsoft.com/downloads/"></>, if
+ you don't already have another version installed.
</para>
<para>
- You must always include the
- <application>Windows Headers and Libraries</application> part of the SDK.
- If you install the <productname>Platform SDK</productname>
- including the <application>Visual C++ Compilers</application>,
- you don't need <productname>Visual Studio</productname> to build.
+ If you use an older version, you might also need to install
+ the <productname>Platform SDK</productname>. You must always
+ include the
+ <application>Windows Headers and Libraries</application> part of
+ the SDK. Recent versions of <productname>Visual Studio
+ (Express)</productname> contain the necessary SDK components.
</para></listitem>
</varlistentry>
@@ -176,9 +187,9 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
<variablelist>
<varlistentry>
- <term><productname>ActiveState TCL</productname></term>
+ <term><productname>ActiveState Tcl</productname></term>
<listitem><para>
- Required for building <application>PL/TCL</application> (Note: version
+ Required for building <application>PL/Tcl</application> (Note: version
8.4 is required, the free Standard Distribution is sufficient).
</para></listitem>
</varlistentry>
@@ -193,7 +204,18 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
Bison can be downloaded from <ulink url="http://gnuwin32.sourceforge.net"></>.
Flex can be downloaded from
<ulink url="http://www.postgresql.org/ftp/misc/winflex/"></>.
- </para></listitem>
+ </para>
+
+ <note>
+ <para>
+ The Bison distribution from GnuWin appears to have a bug that
+ causes Bison to malfunction when installed in a directory with
+ spaces in the name, such as the default location on English
+ installations <filename>C:\Program Files\GnuWin32</filename>.
+ Consider installing into <filename>C:\GnuWin32</filename> instead.
+ </para>
+ </note>
+ </listitem>
</varlistentry>
<varlistentry>
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers