* [patch] package handling in main.tcl
@ 2002-12-03 14:26 Martin M. Hunt
0 siblings, 0 replies; only message in thread
From: Martin M. Hunt @ 2002-12-03 14:26 UTC (permalink / raw)
To: insight
[-- Attachment #1: Type: text/plain, Size: 137 bytes --]
2002-12-03 Martin M. Hunt <hunt@redhat.com>
* library/main.tcl: Require package "debug". Make
package loading a bit more robust.
[-- Attachment #2: p --]
[-- Type: text/x-patch, Size: 2438 bytes --]
Index: main.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/main.tcl,v
retrieving revision 1.10
diff -p -r1.10 main.tcl
*** main.tcl 14 Aug 2002 18:10:49 -0000 1.10
--- main.tcl 3 Dec 2002 22:23:57 -0000
*************** if {[info exists auto_path]} {
*** 53,86 ****
}
}
# Require the packages we need. Most are loaded already, but this will catch
# any odd errors... :
- package require Tcl 8.0
- package require Tk 8.0
- package require Itcl 3.0
- package require Itk 3.0
- package require Gdbtk 1.0
- package require combobox 1.0
! namespace import itcl::*
namespace import debug::*
! # Setup iwidgets path, if needed
if {[info exists IWIDGETS_LIBRARY]} {
lappend auto_path $IWIDGETS_LIBRARY
}
!
! if {[catch {package require Iwidgets 3.0} errMsg]} {
! set msg "Could not find the Iwidgets libraries.\n\nGot nameofexec: [info nameofexecutable]\nError(s) were: \n$errMsg"
!
if {![info exists ::env(GDBTK_TEST_RUNNING)] || $::env(GDBTK_TEST_RUNNING) == 0} {
! puts stderr $msg
! } else {
! tk_messageBox -title Error -message $msg -icon error -type ok
}
! exit
}
# Environment variables controlling debugging:
# GDBTK_TRACE
--- 53,89 ----
}
}
+
# Require the packages we need. Most are loaded already, but this will catch
# any odd errors... :
! foreach p {{Tcl 8.0} {Tk 8.0} {Itcl 3.0} {Itk 3.0} {Gdbtk 1.0} {combobox 1.0} {debug 1.0}} {
! if {[catch {package require [lindex $p 0] [lindex $p 1]} msg]} {
! if {![info exists ::env(GDBTK_TEST_RUNNING)] || $::env(GDBTK_TEST_RUNNING) == 0} {
! puts stderr "Error: $msg"
! catch {tk_messageBox -title Error -message $msg -icon error -type ok}
! }
! exit -1
! } else {
! #puts "Loaded [lindex $p 0] $msg"
! }
! }
+ namespace import itcl::*
namespace import debug::*
! # Finally, load Iwidgets
if {[info exists IWIDGETS_LIBRARY]} {
lappend auto_path $IWIDGETS_LIBRARY
}
! if {[catch {package require Iwidgets 3.0} msg]} {
if {![info exists ::env(GDBTK_TEST_RUNNING)] || $::env(GDBTK_TEST_RUNNING) == 0} {
! puts stderr "Error: $msg"
! catch {tk_messageBox -title Error -message $msg -icon error -type ok}
}
! exit -1
}
+
# Environment variables controlling debugging:
# GDBTK_TRACE
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-12-03 22:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-03 14:26 [patch] package handling in main.tcl Martin M. Hunt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).