Attached are some minor cygwin path fixes for Scintilla

--
Reini Urban
http://phpwiki.org/  http://murbreak.at/
http://helsinki.at/  http://spacemovie.mur.at/
2006-07-01 12:14:59 [EMAIL PROTECTED]

        * fix cygwin path for LoadLibrary
        * remove -T in t/01_load.t to be able to run cygpath
        * print failing LoadLibrary path when the file is there. (chmod +x)

Index: Win32-GUI-Scintilla/Scintilla.PL
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Scintilla/Scintilla.PL,v
retrieving revision 1.2
diff -u -b -b -u -r1.2 Scintilla.PL
--- Win32-GUI-Scintilla/Scintilla.PL    11 Jun 2006 21:00:16 -0000      1.2
+++ Win32-GUI-Scintilla/Scintilla.PL    1 Jul 2006 10:14:21 -0000
@@ -59,12 +59,20 @@
 for my $path (@INC) {
     my $lexer_file = $path . '/auto/Win32/GUI/Scintilla/SciLexer.dll';
     if (-f $lexer_file) {
+       if ($^O eq 'cygwin') {
+           $lexer_file = `/usr/bin/cygpath -w $lexer_file`; # fails under -T
+           chop $lexer_file;
+       } else {
         $lexer_file =~ s|/|\\|g; # LoadLibrary doesn't like unix path 
seperators
+       }
         $SCILEXER_PATH = $lexer_file;
         last;
     }
 }
-my $SCINTILLA_DLL = Win32::GUI::LoadLibrary($SCILEXER_PATH) if $SCILEXER_PATH;
+my $SCINTILLA_DLL;
+if ($SCILEXER_PATH) {
+  $SCINTILLA_DLL = Win32::GUI::LoadLibrary($SCILEXER_PATH) || warn "Failed to 
load $SCILEXER_PATH";
+}
 $SCINTILLA_DLL = Win32::GUI::LoadLibrary('SciLexer') unless $SCINTILLA_DLL;
 die "Failed to load 'SciLexer.dll'" unless $SCINTILLA_DLL;
 
Index: Win32-GUI-Scintilla/t/01_load.t
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Scintilla/t/01_load.t,v
retrieving revision 1.1
diff -u -b -b -u -r1.1 01_load.t
--- Win32-GUI-Scintilla/t/01_load.t     11 Jun 2006 16:51:50 -0000      1.1
+++ Win32-GUI-Scintilla/t/01_load.t     1 Jul 2006 10:14:21 -0000
@@ -1,4 +1,4 @@
-#!perl -wT
+#!perl -w
 # Win32::GUI::Scintilla test suite
 # $Id: 01_load.t,v 1.1 2006/06/11 16:51:50 robertemay Exp $
 #

Reply via email to