|
2001-04-23
| ||
| 03:24 | • Ticket [218864ffff] tcl_pkgPath missing from tcl 8.1 status still Closed wit... artifact: bfcb25fe64 user: dgp | |
|
2000-10-26
| ||
| 08:30 | • Closed ticket [218864ffff]. artifact: 63cbe3e25c user: welch | |
| 01:06 | • New ticket [218864ffff]. artifact: 4c4f463751 user: nobody | |
tcl_pkgPath missing from tcl 8.1
Closed / Fixed218864ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:06:54
OriginalBugID: 2455 Bug
Version: 8.1.1
SubmitDate: '1999-07-28'
LastModified: '1999-08-08'
Severity: MED
Status: Released
Submitter: techsupp
ChangedBy: hobbs
RelatedBugIDs: 2317 2394 2041
OS: Windows 98
Machine: X86
FixedDate: '1999-08-04'
FixedInVersion: 8.2b2
ClosedDate: '2000-10-25'
Name:
Roy Nurmi
ReproducibleScript:
I have written a simple setup script for my extension package tclodbc.
The script originally written with tcl 8.0 relied on tcl variable
tcl_pkgPath. However, I have received numerous e-mails complaining that
the setuo script does not work with tcl 8.1.
After testing the tcl 8.1 I found, that for some reason tcl_pkgPath is
not set anymore. However, tcl_pkgPath is still documented in tcl81.hlp
help file!
First I made a quick workaround using variable tcl_libPath, but it seems
that it does not work but in some installations.
My question is, is the tcl_pkgPath dropped on purpose and if it is, what
would be the correct way to determine proper place to install an
extension package. Would it be something from auto_path, tcl_libPath or
something else?
I attach below the setup script to clarify the problem. The point is
simply that I would neet a way to determine automatically which would be
the correct place to put the extension software.
-- Roy Nurmi
ObservedBehavior:
#
# Simple install script for tclodbc package
# (c) Roy Nurmi 1998
#
proc output msg {
#use messagebox when run in wish, otherways puts msgs to stdout
if {[catch {tk_messageBox -message $msg}]} {puts $msg}
}
set tclodbc_version 2.1
set home [file dirname [info script]]
if {![info exists tcl_pkgPath]} {
# tcl_pkgPath not set, assume something from tcl_libPath
set tcl_pkgPath [lindex $tcl_libPath 0]/..
}
if {[file isdirectory [lindex $tcl_pkgPath 0]]} {
set pkgDir [lindex $tcl_pkgPath 0]/tclodbc$tclodbc_version
output "Installing tclodbc $tclodbc_version for tcl $tcl_version to
directory $pkgDir"
# create root directory
if {![file isdirectory $pkgDir]} {
file mkdir $pkgDir
}
# copy the right version of the dll
file copy -force [file join $home tcl${tcl_version}/tclodbc.dll]
$pkgDir/tclodbc.dll
# copy supporting tcl files
set tclfiles [glob -nocomplain $home/tclutils/*]
foreach i $tclfiles {
eval file copy -force $i $pkgDir
}
# create subdirectories
if {![file isdirectory [file join $pkgDir doc]]} {
file mkdir [file join $pkgDir doc]
}
if {![file isdirectory [file join $pkgDir samples]]} {
file mkdir [file join $pkgDir samples]
}
# copy documentation
set docs [glob -nocomplain $home/doc/*]
foreach i $docs {
eval file copy -force $i [file join $pkgDir doc]
}
# copy samples
set samples [glob -nocomplain $home/samples/*]
foreach i $samples {
eval file copy -force $i [file join $pkgDir samples]
}
# copy license file
file copy -force [file join $home license.txt] $pkgDir
output "Installation successful."
} else {
output "Can't install, check proper tcl installation first."
}
exit
It says specifically in init.tcl that tcl_pkgPath is not used on
Windows. This is a bug in the documentation (which just mentions
the variable without the caveats).
-- 08/04/1999 hobbs
welch Closed ticket [218864ffff].
[History diff]2000-10-26 08:30:14
dgp Ticket [218864ffff]: 3 changes
[History diff]2001-04-23 03:24:51
Log in (anonymous is fine) to add a comment.