| byterock@cvs.perl.org 2005-10-27, 8:37 am |
| Author: byterock
Date: Fri Oct 7 06:41:42 2005
New Revision: 1566
Modified:
dbd-oracle/branches/pythian/Makefile.PL
dbd-oracle/branches/pythian/README.win32
Log:
This version works for windows intstant client 10g
Modified: dbd-oracle/branches/pythian/Makefile.PL
====================
====================
====================
==================
--- dbd-oracle/branches/pythian/Makefile.PL (original)
+++ dbd-oracle/branches/pythian/Makefile.PL Fri Oct 7 06:41:42 2005
@@ -12,6 +12,12 @@
## I attempted to hardcode libclntsh.so.10.1 for clntsh but this does not
## not work. It seems that others are getting this same form of error as well
## i.e. The compiler does not recognize .10.1 as a lib
+##
+## John Scoles (TPG)
+## October 07 2005
+## Changes made
+## Adding in a few changes suggested by Andy Hassall <andy@andyh.co.uk>
+## that will enable the compile to work for Windows version of the IC
# vim: ts=8:sw=4
@@ -87,6 +93,7 @@ my %mk_target_rules;
# Options (rarely needed)
# to turn off an option prefix with 'no', ie 'perl Makefile.PL -nob'
+#$::opt_ic10 = 1; # Build for Oracle 10g instantclient
$::opt_b = 1; # try to use Oracle's own 'build' rule
$::opt_r = ''; # With -b above, use this names build rule (eg -r=build64)
$::opt_m = 0; # path to proc.mk or oracle.mk file to read
@@ -145,15 +152,18 @@ die qq{ The $ORACLE_ENV environment var
ABORTED!
} unless $OH;
+print "os=$os\n";
die qq{ The $ORACLE_ENV environment variable value ($OH) is not valid.
It must be set to hold the path to an Oracle installation directory
on this machine (or a machine with a compatible architecture)
See the README.clients file for more information.
ABORTED!
-} unless (($os eq 'VMS') ? -d $OH :(-e "$OH/libclntsh.so.10.1" ) ? 1 : -d "$OH/lib/.");
+} unless (($os eq 'VMS') ? -d $OH : (-e "$OH/libclntsh.so.10.1" || -e "$OH/oci.dll") ? 1 : -d "$OH/lib/.");
+
-#the (-e "$OH/libclntsh.so.10.1" ) supports the 10 instantclient
+#the (-e "$OH/libclntsh.so.10.1" ) supports the 10g Instant Client on UNIX and Linux
+#The -e "$OH/oci.dll" supports the 10g Instant Client on Windows.
die qq{ The $ORACLE_ENV environment variable value ($OH) is not valid.
It must be set to hold the path to an Oracle installation directory
@@ -163,6 +173,7 @@ die qq{ The $ORACLE_ENV environment var
} unless ( -d $OH );
+
print "Using Oracle in $OH\n";
# $client_version => Major.Minor, $client_version_full
=> Major.Minor.X.Y.Z
@@ -230,6 +241,9 @@ elsif (($os eq 'MSWin32') or ($os =~ /cy
$OCIDIR = $_ if /^OCI\d*$/i && $OCIDIR lt $_;
$File::Find::prune = 1 if -d $_ && $_ !~ /^\./;
}, $OH );
+
+ $OCIDIR = 'sdk' if !$OCIDIR && -d "$OH/sdk"; # Instant Client SDK
+
die "OCI directory not found, please install OCI in $OH" if ! $OCIDIR;
print "Using OCI directory '$OCIDIR'\n";
@@ -1385,9 +1399,10 @@ sub get_client_version {
my $client_version_full
= '';
- my $sqlplus_exe = ($os eq 'Win32') ? "sqlplus.exe" : "sqlplus";
+ my $sqlplus_exe = ($os eq 'Win32' || $os eq 'MSWin32') ? "sqlplus.exe" : "sqlplus";
local $ENV{PATH} = join $Config{path_sep}, $ENV{PATH}, "$OH/bin", $OH;
local $ENV{SQLPATH} = ""; # avoid $SQLPATH/login.sql causing sqlplus to hang
+ print "path=$ENV{PATH}\n";
if (find_bin($sqlplus_e
xe)) {
# Try to use the _SQLPLUS_RELEASE predefined variable from sqlplus
# Documented in the SQL*Plus reference guide:
Modified: dbd-oracle/branches/pythian/README.win32
====================
====================
====================
==================
--- dbd-oracle/branches/pythian/README.win32 (original)
+++ dbd-oracle/branches/pythian/README.win32 Fri Oct 7 06:41:42 2005
@@ -4,6 +4,40 @@ PPM package manager to install a pre-bui
If you built Perl with gcc, read README.wingcc as well as this file.
--- other information, some of which is out of date ---
+
+10/07/05 --John Scoles
+Andy Hassall <andy@andyh.co.uk> Kindly added some changes to the Makefile.PL
+so it will work for the Instant Client 10g on Windows OSs. Below is how he set
+up his environment and the steps he preformed to get it to compile.
+
+ Setting environment for using Microsoft Visual Studio .NET 2003 tools.
+ (If you have another version of Visual Studio or Visual C++ installed and wish
+ to use its tools from the command line, run vcvars32.bat for that version.)
+
+ C:\Documents and Settings\andyh>d:
+
+ D:\>cd cygwin\home\andyh\sr
c\pythian
+
+ D:\cygwin\home\andyh
\src\pythian>set ORACLE_HOME=d:\lib\i
nstantclient_10_2
+
+ D:\cygwin\home\andyh
\src\pythian>set NLS_LANG=.WE8ISO8859P15
+
+ D:\cygwin\home\andyh
\src\pythian>set PATH=d:\lib\instantc
lient_10_2;D:\Progra
m F
+ iles\Microsoft Visual Studio .NET 2003\Common7\IDE;D:\
Program Files\Microsoft Vi
+ sual Studio .NET 2003\VC7\BIN;D:\Prog
ram Files\Microsoft Visual Studio .NET 2003
+ \Common7\Tools;D:\Pr
ogram Files\Microsoft Visual Studio .NET 2003\Common7\Tools\
+ bin\prerelease;D:\Pr
ogram Files\Microsoft Visual Studio .NET 2003\Common7\Tools\
+ bin;D:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\bin;C:\WINNT\Mic
+ rosoft.NET\Framework\v1.1. 4322;d:\Perl\bin\;C:
\WINNT\system32;C:\W
INNT;C:\WINNT\
+ System32\Wbem;D:\Pro
gram Files\Microsoft SDK\Bin;D:\Program Files\Microsoft SDK\
+ Bin\WinNT
+
+ D:\cygwin\home\andyh
\src\pythian>set ORACLE_USERID=test/test@test102
+
+ D:\cygwin\home\andyh
\src\pythian>perl Makefile.PL
+
+
+
4/27/04 -- Jeff Urlwin
Do not untar this distribution in a directory with spaces. This will not work.
|