Differences From Artifact [22b7e78c5d]:
- Executable file kitsh/buildsrc/kitsh-0.0/boot.tcl — part of check-in [9315fecb01] at 2010-09-26 04:37:13 on branch trunk — Added kitsh code (user: rkeene, size: 2556) [annotate] [blame] [check-ins using] [more...]
To Artifact [a3240f621e]:
- File
kitsh/buildsrc/kitsh-0.0/boot.tcl
— part of check-in
[096098536d]
at
2010-09-26 04:42:20
on branch trunk
— Updated to implement "vfs::mkcl" using Readkit
Updated local Readkit implementation to not attempt to replace Mk4tcl (user: rkeene, size: 2884) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
17 18 19 20 21 22 23 |
# the following code only gets executed once on startup
if {[info exists tcl_rcFileName]} {
load {} vfs
# lookup and emulate "source" of lib/vfs/{vfs*.tcl,mk4vfs.tcl}
# must use raw MetaKit calls because VFS is not yet in place
| | | | | > > | > | > > > > > > | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# the following code only gets executed once on startup
if {[info exists tcl_rcFileName]} {
load {} vfs
# lookup and emulate "source" of lib/vfs/{vfs*.tcl,mk4vfs.tcl}
# must use raw MetaKit calls because VFS is not yet in place
set d [${::tclkitMkNamespace}::select exe.dirs parent 0 name lib]
set d [${::tclkitMkNamespace}::select exe.dirs parent $d name vfs]
foreach x {vfsUtils vfslib mk4vfs} {
set n [${::tclkitMkNamespace}::select exe.dirs!$d.files name $x.tcl]
set s [${::tclkitMkNamespace}::get exe.dirs!$d.files!$n contents]
catch {set s [zlib decompress $s]}
uplevel #0 $s
}
# use on-the-fly decompression, if mk4vfs understands that
switch -- $::tclkitMkNamespace {
"mk" {
set mk4vfs::zstreamed 1
set vfsimpl "mk4"
}
"readkit" {
set mkcl_vfs::zstreamed 1
set vfsimpl "mkcl"
}
}
# mount the executable, i.e. make all runtime files available
vfs::filesystem mount $noe [list ::vfs::${vfsimpl}::handler exe]
# alter path to find encodings
if {[info tclversion] eq "8.4"} {
load {} pwb
librarypath [info library]
} else {
encoding dirs [list [file join [info library] encoding]] ;# TIP 258
|
| ︙ | ︙ | |||
61 62 63 64 65 66 67 |
set noe [info nameofexecutable]
# Resolve symlinks
set noe [file dirname [file normalize [file join $noe __dummy__]]]
set tcl_library [file join $noe lib tcl$tcl_version]
set tcl_libPath [list $tcl_library [file join $noe lib]]
| | | > > | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
set noe [info nameofexecutable]
# Resolve symlinks
set noe [file dirname [file normalize [file join $noe __dummy__]]]
set tcl_library [file join $noe lib tcl$tcl_version]
set tcl_libPath [list $tcl_library [file join $noe lib]]
vfs::filesystem mount $noe [list ::vfs::${vfsimpl}::handler exe]
}
# load config settings file if present
namespace eval ::vfs { variable tclkit_version 1 }
catch { uplevel #0 [list source [file join $noe config.tcl]] }
uplevel #0 [list source [file join $tcl_library init.tcl]]
# reset auto_path, so that init.tcl's search outside of tclkit is cancelled
set auto_path $tcl_libPath
unset ::tclkitMkNamespace
}
|