Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Scintilla
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19400/Win32-GUI-Scintilla
Modified Files:
Scintilla.PL
Log Message:
Fix LoadLibrary and Scintilla with Cygwin paths
Index: Scintilla.PL
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Scintilla/Scintilla.PL,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Scintilla.PL 11 Jun 2006 21:00:16 -0000 1.2
--- Scintilla.PL 16 Jul 2006 13:02:30 -0000 1.3
***************
*** 56,71 ****
# Load Scintilla DLL from somewhere on @INC or standard LoadLibrary search
! my $SCILEXER_PATH;
for my $path (@INC) {
my $lexer_file = $path . '/auto/Win32/GUI/Scintilla/SciLexer.dll';
if (-f $lexer_file) {
! $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;
! $SCINTILLA_DLL = Win32::GUI::LoadLibrary('SciLexer') unless $SCINTILLA_DLL;
! die "Failed to load 'SciLexer.dll'" unless $SCINTILLA_DLL;
Win32::GUI::Scintilla::_Initialise();
--- 56,79 ----
# Load Scintilla DLL from somewhere on @INC or standard LoadLibrary search
! my ($SCILEXER_FILE,$SCILEXER_DLL);
for my $path (@INC) {
my $lexer_file = $path . '/auto/Win32/GUI/Scintilla/SciLexer.dll';
if (-f $lexer_file) {
! $SCILEXER_FILE = $lexer_file;
last;
}
}
!
! if ($SCILEXER_FILE) {
! $SCILEXER_DLL = Win32::GUI::LoadLibrary($SCILEXER_FILE);
! warn qq(Failed to load SciLexer.dll from "$SCILEXER_FILE") unless $SCILEXER_DLL;
! }
!
! unless ($SCILEXER_DLL) {
! warn qq(Final attempt to find SciLexer.dll in PATH);
! $SCILEXER_DLL = Win32::GUI::LoadLibrary('SciLexer');
! }
!
! die qq(Failed to load 'SciLexer.dll') unless $SCILEXER_DLL;
Win32::GUI::Scintilla::_Initialise();
***************
*** 74,78 ****
# Free Scintilla DLL
Win32::GUI::Scintilla::_UnInitialise();
! #Win32::GUI::FreeLibrary($SCINTILLA_DLL);
#The above line causes some scripts to crash - such as test2.pl in the samples when running under 5.8.7
}
--- 82,86 ----
# Free Scintilla DLL
Win32::GUI::Scintilla::_UnInitialise();
! #Win32::GUI::FreeLibrary($SCILEXER_DLL);
#The above line causes some scripts to crash - such as test2.pl in the samples when running under 5.8.7
}
|