Option to disable the charging of the setup fee while a package is suspended.
[freeside.git] / install / 5.005 / DBD-Pg-1.22-fixvercmp / README.win32
1
2 $Id: README.win32,v 1.1 2004-04-29 09:21:28 ivan Exp $
3
4
5 Here is a step-by-step procedure for getting DBD-Pg to work on Windows
6 NT. This Port has been done by Bob Kline <bkline@rksystems.com>. 
7
8
9 prerequisites:  (older versions might also work, but these are the 
10 --------------   versions I used)
11
12         o Windows NT4 SP4
13         o Visual Studio 6.0
14         o ActivePerl-5_6_0_613 with DBI-1.13
15         o postgresql-7.0.2
16         o DBD-Pg-0.95
17
18 Here we assume, that perl and postgresql have been installed in C:\. Now
19 perform the following steps:
20
21
22 1. compile libpq
23 ----------------
24
25 set POSTGRES_HOME=C:\postgresql-7.0.2
26 cd postgresql-7.0.2
27 mkdir lib
28 mkdir include
29 cd src
30 copy include\port\win32.h include\os.h
31 edit interfaces\libpq\fe-connect.c and add as first statement in connectDBStart() the following code:
32   #ifdef WIN32
33       static int WeHaveCalledWSAStartup;
34       if (!WeHaveCalledWSAStartup) {
35           WSADATA wsaData;
36           if (WSAStartup(MAKEWORD(1, 1), &wsaData)) {
37               printfPQExpBuffer(&conn->errorMessage, "WSAStartup failed: errno=%d\n", h_errno);
38               goto connect_errReturn;
39           }
40           WeHaveCalledWSAStartup = 1;
41       }
42   #endif
43 edit interfaces\libpq\win32.mak and change the flag /ML to /MD:   CPP_PROJ=/nologo /MD ...
44 nmake /f win32.mak
45 cd ..
46 copy src\interfaces\libpq\Release\libpq.lib  lib
47 copy src\interfaces\libpq\libpq-fe.h         include
48 copy src\include\postgres_ext.h              include
49 cd ..
50
51
52 2. build DBD-Pg
53 ---------------
54
55 cd DBD-Pg
56 perl Makefile.PL CAPI=TRUE
57 nmake
58 set the environment variable PGHOST to the name of the postgresql server: set PGHOST=myserver
59 add on the server a postgres user with the same name as the NT-User (eg Administrator)
60 make sure, that your pg_hba.conf on the server is configured, such that a connection from another host will be accepted
61 mkdir C:\tmp
62 nmake test   (expect to get errors concerning blobs)
63 nmake install