|
From: <ai...@us...> - 2014-01-13 03:22:41
|
Revision: 12937
http://sourceforge.net/p/plplot/code/12937
Author: airwin
Date: 2014-01-13 03:22:38 +0000 (Mon, 13 Jan 2014)
Log Message:
-----------
Update the TEA-based approach for accessing Pltcl under tclsh on
Windows platforms. I have dropped the old Windows method which was
completely broken and replaced it with a method which slightly adapts
the Unix way of accessing PLtcl by using the known different locations
for the dll's in the Windows case.
Tested by Alan W. Irwin <ai...@us...> on
MinGW/MSYS/Wine by running the tclsh demo given by
examples/tcl/README.tcldemos by hand for a few examples and also by
running the test_tclsh_standard_examples target.
Modified Paths:
--------------
trunk/bindings/tcl/pkgIndex.tcl.in
Modified: trunk/bindings/tcl/pkgIndex.tcl.in
===================================================================
--- trunk/bindings/tcl/pkgIndex.tcl.in 2014-01-13 03:13:30 UTC (rev 12936)
+++ trunk/bindings/tcl/pkgIndex.tcl.in 2014-01-13 03:22:38 UTC (rev 12937)
@@ -32,48 +32,48 @@
#puts "loading Pltcl, dir: $dir"
set pllibrary $dir
+ set thisDir [pwd]
+ # Find absolute path of $dir
+ cd $dir
+ set pkgIndexDir [pwd]
+ cd $thisDir
+ set buildDir "@BUILD_DIR@"
+ set bLen [string length $buildDir]
+ # If pkgIndexDir is in the build tree...
if {$tcl_platform(platform) == "unix"} {
- set thisDir [pwd]
- # Find absolute path of $dir
- cd $dir
- set pkgIndexDir [pwd]
- cd $thisDir
- set buildDir "@BUILD_DIR@"
- set bLen [string length $buildDir]
- # If pkgIndexDir is in the build tree...
if {![string compare -length $bLen $buildDir $pkgIndexDir]} then {
- set searchdirs "."} else {
- set searchdirs [list "@LIB_HARDDIR@"]}
- #puts $searchdirs
- # prefer double precision version
- set dlnames [list "@DLNAME_LIBPLPLOTTCLTKD@" "@DLNAME_LIBPLPLOTTCLTK@"]
- set file ""
- foreach reldir $searchdirs {
- foreach dlname $dlnames {
- set driver [file join $dir $reldir $dlname]
- #puts "looking for driver file: $driver"
- if [file exists $driver] {
- set file $driver
- break
- }
- }
- if { $file != "" } { break }
+ set searchdirs "."
+ } else {
+ set searchdirs [list "@LIB_HARDDIR@"]
}
- if { $file == "" } {
- error "load_pkg_Pltcl: could not find loadable driver"
- }
-
} else {
- # This is probably broken, someone should fix it.
- if {[info exists tcl_platform(debug)]} {
- set file [file join $dir plplot510d[info sharedlibextension]]
+ if {![string compare -length $bLen $buildDir $pkgIndexDir]} then {
+ set searchdirs "../../dll"
} else {
- set file [file join $dir plplot510[info sharedlibextension]]
+ set searchdirs [list "@LIB_HARDDIR@../bin"]
}
}
+ #puts $searchdirs
+ # prefer double precision version
+ set dlnames [list "@DLNAME_LIBPLPLOTTCLTKD@" "@DLNAME_LIBPLPLOTTCLTK@"]
+ set file ""
+ foreach reldir $searchdirs {
+ foreach dlname $dlnames {
+ set driver [file join $dir $reldir $dlname]
+ #puts "looking for driver file: $driver"
+ if [file exists $driver] {
+ set file $driver
+ break
+ }
+ }
+ if { $file != "" } { break }
+ }
+ if { $file == "" } {
+ error "load_pkg_Pltcl: could not find loadable driver"
+ }
load $file Pltcl
-# put core tcl scripts in path
+ # put core tcl scripts in path
lappend auto_path $dir/tcl
rename load_pkg_Pltcl {}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|