In 8.5 we need to set tcl_library correctly for slave interpreters.
authorPat Thoyts <patthoyts@users.sourceforge.net>
Fri, 30 Mar 2007 21:43:07 +0000 (21:43 +0000)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Fri, 30 Mar 2007 21:43:07 +0000 (21:43 +0000)
git-svn-id: svn://svn.equi4.com/kitgen/trunk@1339 9e558909-932a-0410-a563-af77432da1eb

kitInit.c

index 931bce705b117a3880357e40d97c717d0d1b4475..3dd1a8fdf3611e5a99acb3dfab6f5166d9e0f580 100644 (file)
--- a/kitInit.c
+++ b/kitInit.c
@@ -109,6 +109,12 @@ static char appInitCmd[] =
 static char preInitCmd[] =
 "proc tclKitPreInit {} {\n"
     "rename tclKitPreInit {}\n"
+    /* In 8.5 we need to set these paths for child interps */
+    "global tcl_library tcl_libPath tcl_version\n"
+    "set noe [info nameofexecutable]\n"
+    "set tcl_library [file join $noe lib tcl$tcl_version]\n"
+    "set tcl_libPath [list $tcl_library [file join $noe lib]]\n"
+    "set tcl_pkgPath [list $tcl_library [file join $noe lib]]\n"
 /*
  * XXX: We should consider adding mk4tcl, pwb, rechan, zlib, vfs, Thread
  * XXX: and Tk as pre-defined packages here as well.