2003-09-29 20:18:35 +02:00
|
|
|
<!--
|
2003-11-29 20:52:15 +01:00
|
|
|
$PostgreSQL: pgsql/doc/src/sgml/install-win32.sgml,v 1.17 2003/11/29 19:51:37 pgsql Exp $
|
2003-09-29 20:18:35 +02:00
|
|
|
-->
|
|
|
|
|
2000-12-21 23:30:39 +01:00
|
|
|
<chapter id="install-win32">
|
|
|
|
<title>Installation on <productname>Windows</productname></title>
|
1999-01-07 03:59:45 +01:00
|
|
|
|
2001-05-13 00:51:36 +02:00
|
|
|
<indexterm>
|
|
|
|
<primary>installation</primary>
|
|
|
|
<secondary>on Windows</secondary>
|
|
|
|
</indexterm>
|
|
|
|
|
2000-12-21 23:30:39 +01:00
|
|
|
<para>
|
|
|
|
Although <productname>PostgreSQL</productname> is written for
|
|
|
|
Unix-like operating systems, the C client library
|
|
|
|
(<application>libpq</application>) and the interactive terminal
|
|
|
|
(<application>psql</application>) can be compiled natively under
|
|
|
|
Windows. The makefiles included in the source distribution are
|
|
|
|
written for <productname>Microsoft Visual C++</productname> and will
|
|
|
|
probably not work with other systems. It should be possible to
|
2001-09-10 01:52:12 +02:00
|
|
|
compile the libraries manually in other cases.
|
2000-12-21 23:30:39 +01:00
|
|
|
</para>
|
1999-01-07 03:59:45 +01:00
|
|
|
|
2000-12-21 23:30:39 +01:00
|
|
|
<tip>
|
|
|
|
<para>
|
2001-11-19 04:58:25 +01:00
|
|
|
If you are using Windows 98 or newer you can build and use all of
|
2000-12-21 23:30:39 +01:00
|
|
|
<productname>PostgreSQL</productname> <quote>the Unix way</quote>
|
|
|
|
if you install the <productname>Cygwin</productname> toolkit first.
|
|
|
|
In that case see <xref linkend="installation">.
|
|
|
|
</para>
|
|
|
|
</tip>
|
1999-01-07 03:59:45 +01:00
|
|
|
|
2000-12-21 23:30:39 +01:00
|
|
|
<para>
|
|
|
|
To build everything that you can on
|
|
|
|
<productname>Windows</productname>, change into the
|
|
|
|
<filename>src</filename> directory and type the command
|
|
|
|
<screen>
|
|
|
|
<userinput>nmake /f win32.mak</userinput>
|
|
|
|
</screen>
|
|
|
|
This assumes that you have <productname>Visual C++</productname> in
|
|
|
|
your path.
|
|
|
|
</para>
|
1999-01-07 03:59:45 +01:00
|
|
|
|
2000-12-21 23:30:39 +01:00
|
|
|
<para>
|
|
|
|
The following files will be built:
|
1999-01-07 03:59:45 +01:00
|
|
|
|
2000-12-21 23:30:39 +01:00
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><filename>interfaces\libpq\Release\libpq.dll</filename></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The dynamically linkable frontend library
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><filename>interfaces\libpq\Release\libpqdll.lib</filename></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-03-24 15:32:51 +01:00
|
|
|
Import library to link your programs to <filename>libpq.dll</filename>
|
2000-12-21 23:30:39 +01:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
1999-01-07 03:59:45 +01:00
|
|
|
|
2000-12-21 23:30:39 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term><filename>interfaces\libpq\Release\libpq.lib</filename></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Static library version of the frontend library
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
1999-01-07 03:59:45 +01:00
|
|
|
|
2000-12-21 23:30:39 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term><filename>bin\psql\Release\psql.exe</filename></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The <productname>PostgreSQL</productname> interactive terminal
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
1999-01-07 03:59:45 +01:00
|
|
|
|
2000-12-21 23:30:39 +01:00
|
|
|
<para>
|
|
|
|
The only file that really needs to be installed is the
|
|
|
|
<filename>libpq.dll</filename> library. This file should in most
|
|
|
|
cases be placed in the <filename>WINNT\SYSTEM32</filename> directory
|
|
|
|
(or in <filename>WINDOWS\SYSTEM</filename> on a Windows 95/98/ME
|
|
|
|
system). If this file is installed using a setup program, it should
|
|
|
|
be installed with version checking using the
|
|
|
|
<symbol>VERSIONINFO</symbol> resource included in the file, to
|
|
|
|
ensure that a newer version of the library is not overwritten.
|
|
|
|
</para>
|
1999-01-07 03:59:45 +01:00
|
|
|
|
2000-12-21 23:30:39 +01:00
|
|
|
<para>
|
2001-09-10 01:52:12 +02:00
|
|
|
If you plan to do development using <application>libpq</application> on this machine, you will
|
2000-12-21 23:30:39 +01:00
|
|
|
have to add the <filename>src\include</filename> and
|
|
|
|
<filename>src\interfaces\libpq</filename> subdirectories of the
|
|
|
|
source tree to the include path in your compilers settings.
|
|
|
|
</para>
|
1999-01-07 03:59:45 +01:00
|
|
|
|
2000-12-21 23:30:39 +01:00
|
|
|
<para>
|
2003-03-24 15:32:51 +01:00
|
|
|
To use the library, you must add the
|
2000-12-21 23:30:39 +01:00
|
|
|
<filename>libpqdll.lib</filename> file to your project. (In Visual
|
2001-11-28 21:49:10 +01:00
|
|
|
C++, just right-click on the project and choose to add it.)
|
2000-12-21 23:30:39 +01:00
|
|
|
</para>
|
1999-01-07 03:59:45 +01:00
|
|
|
|
2003-09-29 20:21:33 +02:00
|
|
|
<para>
|
2003-09-30 03:26:29 +02:00
|
|
|
<application>psql</application> is compiled as a <quote>console
|
2003-11-12 23:47:47 +01:00
|
|
|
application</>. As the Windows console windows use a different
|
2003-11-04 10:55:39 +01:00
|
|
|
encoding than the rest of the system, you must take special care
|
|
|
|
when using 8-bit characters at the <application>psql</application>
|
|
|
|
prompt. When <application>psql</application> detects a problematic
|
|
|
|
console code page, it will warn you at startup. To change the
|
|
|
|
console code page, two things are neccessary:
|
2003-09-29 20:21:33 +02:00
|
|
|
|
2003-09-30 03:26:29 +02:00
|
|
|
<itemizedlist>
|
2003-09-29 20:21:33 +02:00
|
|
|
<listitem>
|
2003-09-30 03:26:29 +02:00
|
|
|
<para>
|
2003-11-04 10:55:39 +01:00
|
|
|
Set the code page by entering <userinput>cmd.exe /c chcp
|
|
|
|
1252</userinput>. (1252 is a code page that is appropriate for
|
|
|
|
German; replace it with your value.) If you are using Cygwin,
|
|
|
|
you can put this command in <filename>/etc/profile</filename>.
|
2003-09-30 03:26:29 +02:00
|
|
|
</para>
|
2003-09-29 20:21:33 +02:00
|
|
|
</listitem>
|
2003-09-30 03:26:29 +02:00
|
|
|
|
2003-09-29 20:21:33 +02:00
|
|
|
<listitem>
|
2003-09-30 03:26:29 +02:00
|
|
|
<para>
|
2003-11-04 10:55:39 +01:00
|
|
|
Set the console font to <quote>Lucida Console</>, because the
|
|
|
|
raster font does not work with the ANSI code page.
|
2003-09-30 03:26:29 +02:00
|
|
|
</para>
|
2003-09-29 20:21:33 +02:00
|
|
|
</listitem>
|
2003-09-30 03:26:29 +02:00
|
|
|
</itemizedlist>
|
2003-09-29 20:21:33 +02:00
|
|
|
</para>
|
|
|
|
|
2000-12-21 23:30:39 +01:00
|
|
|
</chapter>
|
1999-01-07 03:59:45 +01:00
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
2000-03-31 05:27:42 +02:00
|
|
|
mode:sgml
|
1999-01-07 03:59:45 +01:00
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"./reference.ced"
|
|
|
|
sgml-exposed-tags:nil
|
2000-03-31 05:27:42 +02:00
|
|
|
sgml-local-catalogs:("/usr/lib/sgml/catalog")
|
1999-01-07 03:59:45 +01:00
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
-->
|