summaryrefslogtreecommitdiffstats
path: root/library/init.tcl
diff options
context:
space:
mode:
authorstanton <stanton>1999-05-22 01:20:10 (GMT)
committerstanton <stanton>1999-05-22 01:20:10 (GMT)
commitac39508cf97576cd9747c5630c4a13d794663b4a (patch)
tree4b7c61e6c670f227cf4d603907157fb6246d2d50 /library/init.tcl
parent21bd132482f68735f5a4381934f56ee911904e87 (diff)
downloadtcl-ac39508cf97576cd9747c5630c4a13d794663b4a.zip
tcl-ac39508cf97576cd9747c5630c4a13d794663b4a.tar.gz
tcl-ac39508cf97576cd9747c5630c4a13d794663b4a.tar.bz2
Merged changes from scriptics-tclpro-1-3-b2 branch
Diffstat (limited to 'library/init.tcl')
-rw-r--r--library/init.tcl14
1 files changed, 12 insertions, 2 deletions
diff --git a/library/init.tcl b/library/init.tcl
index acd403d..c52c98d 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.30 1999/05/22 01:20:13 stanton 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} {