mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
vcbuild updates from Magnus:
* After Markos patch, now builds pgcrypto without zlib again * Updates README with xml info * xml requires xslt and iconv * disable unnecessary warning about __cdecl() * Add a buildenv.bat called from all other bat files to set up things like PATH for flex/bison. (Can't just set it before calling, doesn't always work when building from the GUI)
This commit is contained in:
parent
cf57ef4e50
commit
7f58ed1a10
@ -23,7 +23,7 @@ sub new {
|
|||||||
includes => '',
|
includes => '',
|
||||||
defines => ';',
|
defines => ';',
|
||||||
solution => $solution,
|
solution => $solution,
|
||||||
disablewarnings => '4018;4244',
|
disablewarnings => '4018;4244;4273',
|
||||||
};
|
};
|
||||||
|
|
||||||
bless $self;
|
bless $self;
|
||||||
|
@ -9,6 +9,11 @@ environment variables "leaking" through.
|
|||||||
|
|
||||||
First, edit config.pl to reflect what "configure options" you want set.
|
First, edit config.pl to reflect what "configure options" you want set.
|
||||||
|
|
||||||
|
If you need to modify the environment for calling external tools, such as
|
||||||
|
flex or bison, create a file called "buildenv.bat". This file will be called
|
||||||
|
by all scripts before anything is done, so the environment can be set up.
|
||||||
|
(for example, include SET PATH=%PATH%;c:\some\where\bison\bin)
|
||||||
|
|
||||||
Then, to build all of PostgreSQL in debug configuration, run the command
|
Then, to build all of PostgreSQL in debug configuration, run the command
|
||||||
build
|
build
|
||||||
from a Visual Studio Command Prompt (to get all environment
|
from a Visual Studio Command Prompt (to get all environment
|
||||||
@ -54,3 +59,7 @@ Get from http://web.mit.edu/Kerberos/dist/index.html
|
|||||||
|
|
||||||
zlib - required for compression support in pg_dump/pg_restore
|
zlib - required for compression support in pg_dump/pg_restore
|
||||||
Get from http://www.zlib.net
|
Get from http://www.zlib.net
|
||||||
|
|
||||||
|
libxml2 and libxslt - required for XML support
|
||||||
|
Get from http://www.zlatkovic.com/pub/libxml or build from source from
|
||||||
|
http://xmlsoft.org. Note that libxml2 requires iconv.
|
||||||
|
@ -14,6 +14,11 @@ sub new {
|
|||||||
strver => '',
|
strver => '',
|
||||||
};
|
};
|
||||||
bless $self;
|
bless $self;
|
||||||
|
if ($options->{xml}) {
|
||||||
|
if (!($options->{xslt} && $options->{iconv})) {
|
||||||
|
die "XML requires both XSLT and ICONV\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
return $self;
|
return $self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
@echo off
|
@echo off
|
||||||
SET STARTDIR=%CD%
|
SET STARTDIR=%CD%
|
||||||
|
if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
|
||||||
|
if exist buildenv.bat call buildenv.bat
|
||||||
|
|
||||||
perl mkvcbuild.pl
|
perl mkvcbuild.pl
|
||||||
if errorlevel 1 goto :eof
|
if errorlevel 1 goto :eof
|
||||||
|
@ -187,24 +187,21 @@ if (!$solution->{options}->{openssl}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Pgcrypto makefile too complex to parse....
|
# Pgcrypto makefile too complex to parse....
|
||||||
# Pgcrypto requires zlib
|
my $pgcrypto = $solution->AddProject('pgcrypto','dll','crypto');
|
||||||
if ($solution->{options}->{zlib}) {
|
$pgcrypto->AddFiles('contrib\pgcrypto','pgcrypto.c','px.c','px-hmac.c','px-crypt.c',
|
||||||
my $pgcrypto = $solution->AddProject('pgcrypto','dll','crypto');
|
|
||||||
$pgcrypto->AddFiles('contrib\pgcrypto','pgcrypto.c','px.c','px-hmac.c','px-crypt.c',
|
|
||||||
'crypt-gensalt.c','crypt-blowfish.c','crypt-des.c','crypt-md5.c','mbuf.c',
|
'crypt-gensalt.c','crypt-blowfish.c','crypt-des.c','crypt-md5.c','mbuf.c',
|
||||||
'pgp.c','pgp-armor.c','pgp-cfb.c','pgp-compress.c','pgp-decrypt.c','pgp-encrypt.c',
|
'pgp.c','pgp-armor.c','pgp-cfb.c','pgp-compress.c','pgp-decrypt.c','pgp-encrypt.c',
|
||||||
'pgp-info.c','pgp-mpi.c','pgp-pubdec.c','pgp-pubenc.c','pgp-pubkey.c','pgp-s2k.c',
|
'pgp-info.c','pgp-mpi.c','pgp-pubdec.c','pgp-pubenc.c','pgp-pubkey.c','pgp-s2k.c',
|
||||||
'pgp-pgsql.c');
|
'pgp-pgsql.c');
|
||||||
if ($solution->{options}->{openssl}) {
|
if ($solution->{options}->{openssl}) {
|
||||||
$pgcrypto->AddFiles('contrib\pgcrypto', 'openssl.c','pgp-mpi-openssl.c');
|
$pgcrypto->AddFiles('contrib\pgcrypto', 'openssl.c','pgp-mpi-openssl.c');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$pgcrypto->AddFiles('contrib\pgcrypto', 'md5.c','sha1.c','sha2.c','internal.c','internal-sha2.c',
|
$pgcrypto->AddFiles('contrib\pgcrypto', 'md5.c','sha1.c','sha2.c','internal.c','internal-sha2.c',
|
||||||
'blf.c','rijndael.c','fortuna.c','random.c','pgp-mpi-internal.c','imath.c');
|
'blf.c','rijndael.c','fortuna.c','random.c','pgp-mpi-internal.c','imath.c');
|
||||||
}
|
|
||||||
$pgcrypto->AddReference($postgres);
|
|
||||||
$pgcrypto->AddLibrary('wsock32.lib');
|
|
||||||
}
|
}
|
||||||
|
$pgcrypto->AddReference($postgres);
|
||||||
|
$pgcrypto->AddLibrary('wsock32.lib');
|
||||||
|
|
||||||
my $D;
|
my $D;
|
||||||
opendir($D, 'contrib') || croak "Could not opendir on contrib!\n";
|
opendir($D, 'contrib') || croak "Could not opendir on contrib!\n";
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
|
||||||
|
|
||||||
SET BV=
|
SET BV=
|
||||||
for /F "tokens=4 usebackq" %%f in (`bison -V`) do if "!BV!"=="" SET BV=%%f
|
for /F "tokens=4 usebackq" %%f in (`bison -V`) do if "!BV!"=="" SET BV=%%f
|
||||||
if "%BV%"=="" goto novarexp
|
if "%BV%"=="" goto novarexp
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
if exist src\tools\msvc\buildenv.bat call src\tools\msvc\buildenv.bat
|
||||||
|
|
||||||
flex -V > NUL
|
flex -V > NUL
|
||||||
if errorlevel 1 goto noflex
|
if errorlevel 1 goto noflex
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user