is used with mk4vfs. This commit disabled zstreamed for 8.6 so we
will never call this tclvfs function for 8.6 tclkits.
The tclvfs pkgIndex code has been moved from files/ into setupvfs.tcl
to make it easier to handle new versions of tclvfs.
Makefile.vc gets some post-build sanity checking to ensure we do not
produce useless tclkits.
git-svn-id: svn://svn.equi4.com/kitgen/trunk@4468
9e558909-932a-0410-a563-
af77432da1eb
$(BUILD)\winMain.obj $(BUILD)\tclkit.res
!if $V < 86
+CFLAGS=$(CFLAGS) -DKIT_INCLUDES_ZLIB=1
CLIOBJS = $(CLIOBJS) $(BUILD)\zlib.obj
GUIOBJS = $(GUIOBJS) $(BUILD)\zlib.obj
!endif
kit-cli.exe -init- ../../setupvfs.tcl $(KITOPTS) $@ cli
$@ <<
puts "version : Tcl [info patchlevel] $$tcl_platform(osVersion) $$tcl_platform(machine)"
-foreach pkg {starkit rechan registry dde} {package require $$pkg}
+set ext {starkit rechan registry dde}
+foreach lib [info loaded] {if {[lindex $$lib 1] eq "zlib"} {lappend ext zlib}}
+foreach pkg $$ext {package require $$pkg}
+set f [open [info nameofexecutable]/boot.tcl r]
+list [seek $$f 0 end] [tell $$f] [close $$f]
interp create slave
-slave eval {
- foreach pkg {starkit rechan registry dde} {package require $$pkg}
-}
+slave eval [list foreach pkg $$ext {package require $$pkg}]
<<
kitsh.exe -init- ../../setupvfs.tcl $(KITOPTS) $@ cli
$@ <<
puts "version : Tcl [info patchlevel] $$tcl_platform(osVersion) $$tcl_platform(machine)"
-foreach pkg {starkit rechan registry dde} {package require $$pkg}
+set ext {starkit rechan registry dde Mk4tcl Itcl}
+foreach lib [info loaded] {if {[lindex $$lib 1] eq "zlib"} {lappend ext zlib}}
+foreach pkg $$ext {package require $$pkg}
+set f [open [info nameofexecutable]/boot.tcl r]
+list [seek $$f 0 end] [tell $$f] [close $$f]
interp create slave
-slave eval {
- foreach pkg {starkit rechan registry dde} {package require $$pkg}
-}
+slave eval [list foreach pkg $$ext {package require $$pkg}]
<<
tclkit.exe: kitsh.exe kit.exe tidy
}
# use on-the-fly decompression, if mk4vfs understands that
- set mk4vfs::zstreamed 1
+ # Note: 8.6 core zlib does not support this for mk4vfs
+ if {![package vsatisfies [package require Tcl] 8.6]} {
+ set mk4vfs::zstreamed 1
+ }
} else {
set driver mkcl
+++ /dev/null
-package ifneeded vfs 1.3 [list load {} vfs]
-package ifneeded starkit 1.3.2 [list source [file join $dir starkit.tcl]]
-package ifneeded vfslib 1.3.1 [list source [file join $dir vfslib.tcl]]
-package ifneeded vfs::mk4 1.10.1 [list source [file join $dir mk4vfs.tcl]]
-package ifneeded vfs::zip 1.0.1 [list source [file join $dir zipvfs.tcl]]
-#compat
-package ifneeded mk4vfs 1.10.1 [list source [file join $dir mk4vfscompat.tcl]]
+++ /dev/null
-package ifneeded vfs 1.4 [list load {} vfs]
-package ifneeded starkit 1.3.3 [list source [file join $dir starkit.tcl]]
-package ifneeded vfslib 1.4 [list source [file join $dir vfslib.tcl]]
-package ifneeded vfs::mk4 1.10.1 [list source [file join $dir mk4vfs.tcl]]
-package ifneeded vfs::zip 1.0.2 [list source [file join $dir zipvfs.tcl]]
-package ifneeded vfs::tar 0.91 [list source [file join $dir tarvfs.tcl]]
-
lib/tk8@/unsupported.tcl
lib/tk8@/xmfbox.tcl
}
-# handle files no longer present
-foreach f { lib/tk8@/prolog.ps } {
+# handle new or deleted files
+foreach f { lib/tk8@/prolog.ps lib/tk8@/icons.tcl } {
set fx [string map $versmap $f]
if {[file exists build/$fx]} {
lappend guifiles $f
if {$::debugOpt} {
puts " $n ==> \$vfs/$f"
}
+ } elseif {[string match "lib/vfs*/pkgIndex.tcl" $f]} {
+ set n [mk_tclvfs_index build/$f]
+ if {$::debugOpt} {puts " $n ==> \$vfs/$f" }
} else {
set n build/files/$f
if {[file exists $n]} {
return $n
}
+# We use a modified tclvfs pkgIndex with a reduced set of vfs' and force
+# the use of vfslib.tcl for utility functions.
+proc mk_tclvfs_index {src} {
+ global versmap
+ set fin [open $src r]
+ set fout [open ${src}.tclkit w]
+ puts $fout [string map $versmap \
+ "package ifneeded vfs [package provide vfs] \[list load {} vfs\]"]
+ while {[gets $fin line] != -1} {
+ foreach pkg {starkit vfslib vfs::mk4 vfs::zip vfs::tar mk4vfs} {
+ if {[string match "package ifneeded $pkg *" $line]} {
+ puts $fout $line
+ }
+ }
+ }
+ close $fin
+ close $fout
+ return ${src}.tclkit
+}
+
# copy file to m2m-mounted vfs
proc vfscopy {argv} {
global vfs versmap
}
}
+# Create a pkgIndex file for a statick package 'pkg'. If the version
+# is not provided then it is detected when creating the vfs.
proc staticpkg {pkg {ver {}} {init {}}} {
global vfs
if {$ver eq {}} {
}
# Create package index files for the static extensions.
-# verq registry dde and vfs are handled above or using files/*
+# vlerq registry dde and vfs are handled above or using files/*
set exts {rechan}
if {![package vsatisfies [package provide Tcl] 8.6]} { lappend exts zlib }
if {[package vcompare [package provide Tcl] 8.4] == 0} { lappend exts pwb }
foreach ext $exts {
staticpkg $ext
}
-
+if {!$lite} { staticpkg Mk4tcl }
if {[lsearch [info loaded] {{} Itcl}] != -1} {
catch {load {} Itcl}
lappend versmap itcl3@ itcl[package provide Itcl]