From 29ea6f595b748d3a9dd2416df665eaf8507afd82 Mon Sep 17 00:00:00 2001 From: Jean-Claude Wippler Date: Mon, 24 Feb 2003 12:04:29 +0000 Subject: [PATCH] tweak --- ChangeLog | 1 + library/pkgIndex.tcl | 2 +- library/pkgIndex.tcl.in | 2 +- library/starkit.tcl | 12 ++++++++---- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 221bdd2..db55a3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2003-02-24 Jean-Claude Wippler + * pkgIndex.tcl, pkgIndex.tcl.in: starkit rev bumped to 1.2 * starkit.tcl: more contexts, panic ok if "." already gone 2003-02-23 Jeff Hobbs diff --git a/library/pkgIndex.tcl b/library/pkgIndex.tcl index 5f719ec..638bc62 100644 --- a/library/pkgIndex.tcl +++ b/library/pkgIndex.tcl @@ -39,7 +39,7 @@ proc loadvfs {dll} { } package ifneeded vfs 1.2 [list loadvfs $dll] -package ifneeded starkit 1.1 [list source [file join $dir starkit.tcl]] +package ifneeded starkit 1.2 [list source [file join $dir starkit.tcl]] package ifneeded vfslib 1.3.1 [list source [file join $dir vfslib.tcl]] # Old diff --git a/library/pkgIndex.tcl.in b/library/pkgIndex.tcl.in index 7affa1f..12b16fe 100644 --- a/library/pkgIndex.tcl.in +++ b/library/pkgIndex.tcl.in @@ -26,7 +26,7 @@ proc loadvfs {dll} { } package ifneeded vfs 1.0 [list loadvfs $dll] -package ifneeded starkit 1.1 [list source [file join $dir starkit.tcl]] +package ifneeded starkit 1.2 [list source [file join $dir starkit.tcl]] package ifneeded vfslib 1.3.1 [list source [file join $dir vfslib.tcl]] # Old diff --git a/library/starkit.tcl b/library/starkit.tcl index 7265c99..6fa3194 100644 --- a/library/starkit.tcl +++ b/library/starkit.tcl @@ -1,7 +1,7 @@ # Starkit support, see http://www.equi4.com/starkit/ # by Jean-Claude Wippler, July 2002 -package provide starkit 1.1 +package provide starkit 1.2 # Starkit scripts can launched in a number of ways: # - wrapped or unwrapped @@ -42,10 +42,14 @@ namespace eval starkit { # called from the startup script of a starkit to init topdir and auto_path # returns how the script was launched: starkit, starpack, unwrapped, or - # sourced (Jan 2003: also tclhttpd or plugin) + # sourced (2003: also tclhttpd, plugin, or service) proc startup {} { global argv0 - variable topdir ;# the root directory (while the starkit is mounted) + + # 2003/02/11: new behavior, if starkit::topdir exists, don't disturb it + if {![info exists starkit::topdir]} { + variable topdir ;# the root directory (while the starkit is mounted) + } set script [file normalize [info script]] set topdir [file dirname $script] @@ -93,7 +97,7 @@ namespace eval starkit { # terminate with an error message, using most appropriate mechanism proc panic {msg} { if {[info commands wm] ne ""} { - wm withdraw . + catch { wm withdraw . } tk_messageBox -icon error -message $msg -title "Fatal error" } elseif {[info commands ::eventlog] ne ""} { eventlog error $msg -- 2.23.0