| Description: |
When using Makefile.vc to build Tk, package require Tk fails in a tclsh. I have built Tcl 8.5a6 and Tk 8.5a6 thus:
Build Tcl
nmake -f Makefile.vc OPTS=threads INSTALLDIR=c:\tcl
nmake -f Makefile.vc OPTS=threads INSTALLDIR=c:\tcl install
build Tk
nmake -f Makefile.vc OPTS=threads INSTALLDIR=c:\tcl TCLDIR=..\..\tcl
nmake -f Makefile.vc OPTS=threads INSTALLDIR=c:\tcl TCLDIR=..\..\tcl install
tclsh85t
% package require Tk
can't find package Tk
%
After building like this the generated pkgIndex.tcl contains no patchlevel because of the undefined TCL_PATCHLEVEL in the Makefile.vc:
if {![package vsatisfies [package provide Tcl] 8.5]} { return }
if {[package vcompare [package provide Tcl] 8.5] != 0} { return }
package ifneeded Tk 8.5 [list load [file join $dir .. .. bin tk85t.dll] Tk]
Everything loads correctly if TCL_PATCHLEVEL is set to a6 when building Tk. This results in the following pkgIndex.tcl
if {![package vsatisfies [package provide Tcl] 8.5]} { return }
if {[package vcompare [package provide Tcl] 8.5a6] != 0} { return }
package ifneeded Tk 8.5a6 [list load [file join $dir .. .. bin tk85t.dll] Tk]
After which, Tk loads succesfully from tclsh:
> tclsh85t
% package require Tk
8.5a6
%
|