diff options
author | redman <redman> | 1999-05-21 00:04:29 (GMT) |
---|---|---|
committer | redman <redman> | 1999-05-21 00:04:29 (GMT) |
commit | 845370c4fff3bf83e88e5863085498cefdd63bf7 (patch) | |
tree | f62ca9d292023a43b0f299e99dd9cc1e5803c698 | |
parent | 837f4e2fcf1630669d522f9921f11c647b04b74b (diff) | |
download | tcl-845370c4fff3bf83e88e5863085498cefdd63bf7.zip tcl-845370c4fff3bf83e88e5863085498cefdd63bf7.tar.gz tcl-845370c4fff3bf83e88e5863085498cefdd63bf7.tar.bz2 |
Fix the init.tcl to include the bin directory and the ../lib given
the path to the executable.
-rw-r--r-- | library/init.tcl | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/library/init.tcl b/library/init.tcl index acd403d..8a0e499 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.29 1999/04/16 00:46:56 stanton Exp $ +# RCS: @(#) $Id: init.tcl,v 1.29.2.1 1999/05/21 00:04:29 redman Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -30,9 +30,12 @@ package require -exact Tcl 8.1 # The parent directory of tcl_library. Adding the parent # means that packages in peer directories will be found automatically. # +# Also add the directory where the executable is located, plus ../lib +# relative to that path. +# # tcl_pkgPath, which is set by the platform-specific initialization routines # On UNIX it is compiled in -# On Windows it comes from the registry +# On Windows, it is not used # On Macintosh it is "Tool Command Language" in the Extensions folder if {![info exists auto_path]} { @@ -49,6 +52,13 @@ if {[string compare [info library] {}]} { } } } +foreach __dir [list [file dirname [info nameofexecutable]] \ + [file join [file dirname [file dirname \ + [info nameofexecutable]]] lib]] { + if {[lsearch -exact $auto_path $__dir] < 0} { + lappend auto_path $__dir + } +} if {[info exist tcl_pkgPath]} { foreach __dir $tcl_pkgPath { if {[lsearch -exact $auto_path $__dir] < 0} { |