public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [PATCH/hack] Running from build dir again
@ 2001-09-19 11:09 Keith Seitz
  2001-09-19 12:03 ` Ian Roxborough
  0 siblings, 1 reply; 8+ messages in thread
From: Keith Seitz @ 2001-09-19 11:09 UTC (permalink / raw)
  To: Insight Maling List

Hi,

This gross hack allows insight to run from the build directory again.

Recent Tcl/Tk churn has broken this convenience, and, well, as hacky and
ugly as this is, it fixes it.

Keith

ChangeLog
2001-09-19  Keith Seitz  <keiths@redhat.com>

	* library/main.tcl: Append iwidgets library path, if needed.
	* generic/gdbtk.c (gdbtk_init): Add TCLLIBPATH to iwidgets
	package index.
	Define IWIDGETS_LIBRARY in interpreter so that we can add
	this path to the auto_path at the right time later.

Patch
Index: generic/gdbtk.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v
retrieving revision 1.21
diff -u -p -r1.21 gdbtk.c
--- generic/gdbtk.c	2001/09/10 19:21:47	1.21
+++ generic/gdbtk.c	2001/09/19 17:56:40
@@ -434,7 +434,18 @@ gdbtk_init (argv0)
 \
 	  if {![info exists env(GDBTK_LIBRARY)]} {\n\
 	      set env(GDBTK_LIBRARY) [file join $srcDir gdb gdbtk library]\n\
-	  }\n";
+	  }\n\
+\
+          # Append the directory with the itcl pkg index\n\
+          if {[info exists env(TCLLIBPATH)]} {\n\
+            append env(TCLLIBPATH) :[file joing $srcDir itcl]\n\
+          } else {\n\
+            set env(TCLLIBPATH) [file join $srcDir itcl]\n\
+          }\n\
+\
+          # We also need to append the iwidgets library path.\n\
+          # Unfortunately, there is no IWIDGETS_LIBRARY.\n\
+          set IWIDGETS_LIBRARY [file join $srcDir itcl iwidgets3.0.0 generic]\n";

       Tcl_Obj *commandObj;

Index: library/main.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/main.tcl,v
retrieving revision 1.4
diff -u -p -r1.4 main.tcl
--- library/main.tcl	2001/09/10 19:21:47	1.4
+++ library/main.tcl	2001/09/19 17:56:56
@@ -58,6 +58,11 @@ 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"


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH/hack] Running from build dir again
  2001-09-19 11:09 [PATCH/hack] Running from build dir again Keith Seitz
@ 2001-09-19 12:03 ` Ian Roxborough
  2001-09-19 12:08   ` Keith Seitz
  0 siblings, 1 reply; 8+ messages in thread
From: Ian Roxborough @ 2001-09-19 12:03 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Insight Maling List

Hi Keith,

I've been looking at this problem from the other end, i.e. fixing IWidgets to
not be so dumb.  But, after some effort I think your current solution/hack is
best.  The long term "clean" solution would seem to center around removing
IWidgets from Insight. (!?)  Otherwise it will involve fixing Iwidgets.

> This gross hack allows insight to run from the build directory again.

Atleast it's not as gross as the Tcl library loader hack...
 
> Recent Tcl/Tk churn has broken this convenience, and, well, as hacky and
> ugly as this is, it fixes it.

Yeah, IWidgets is a bit hacky, we could move the:
  append auto_path $IWIDGETS_LIBRARY
from main.tcl (in Insight) into iwidgets.tcl (IWidgets will always assume
that the scripts it wants is in a "./scripts" directory).

Other than that, there doesn't seem to be much that can be done,

Ian.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH/hack] Running from build dir again
  2001-09-19 12:03 ` Ian Roxborough
@ 2001-09-19 12:08   ` Keith Seitz
  2001-09-19 12:28     ` Ian Roxborough
  0 siblings, 1 reply; 8+ messages in thread
From: Keith Seitz @ 2001-09-19 12:08 UTC (permalink / raw)
  To: Ian Roxborough; +Cc: Insight Maling List

On Wed, 19 Sep 2001, Ian Roxborough wrote:

> I've been looking at this problem from the other end, i.e. fixing IWidgets to
> not be so dumb.  But, after some effort I think your current solution/hack is
> best.  The long term "clean" solution would seem to center around removing
> IWidgets from Insight. (!?)  Otherwise it will involve fixing Iwidgets.

After using the iwidgets, I would be inclined to agree with you. Iwidgets
leave me as warm and fuzzy as tix.

:-(
Keith





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH/hack] Running from build dir again
  2001-09-19 12:08   ` Keith Seitz
@ 2001-09-19 12:28     ` Ian Roxborough
  2001-09-20 10:57       ` Martin M. Hunt
  0 siblings, 1 reply; 8+ messages in thread
From: Ian Roxborough @ 2001-09-19 12:28 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Insight Maling List

Keith Seitz wrote:
> 
> On Wed, 19 Sep 2001, Ian Roxborough wrote:
> 
> > I've been looking at this problem from the other end, i.e. fixing IWidgets to
> > not be so dumb.  But, after some effort I think your current solution/hack is
> > best.  The long term "clean" solution would seem to center around removing
> > IWidgets from Insight. (!?)  Otherwise it will involve fixing Iwidgets.
> 
> After using the iwidgets, I would be inclined to agree with you. Iwidgets
> leave me as warm and fuzzy as tix.

BLT to replace to Tix, BWidgets to replace IWidgets?

Maybe we can replace Tix and IWidgets with BLT?

Reducing the number of GUI toolkits we depend on could be seen
as a good thing.

Ian.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH/hack] Running from build dir again
  2001-09-19 12:28     ` Ian Roxborough
@ 2001-09-20 10:57       ` Martin M. Hunt
  2001-09-20 11:01         ` Keith Seitz
  0 siblings, 1 reply; 8+ messages in thread
From: Martin M. Hunt @ 2001-09-20 10:57 UTC (permalink / raw)
  To: Ian Roxborough, Keith Seitz; +Cc: Insight Maling List

On the other hand, iwidgets are always distributed as part of the itcl 
distribution, so does it really involve much to leave them in and use the 
ones that work well?  Also, have you been using the latest ones or the 3-year 
old iwidgets in sources?

Martin

On Wednesday 19 September 2001 12:40 pm, Ian Roxborough wrote:
> Keith Seitz wrote:
> > On Wed, 19 Sep 2001, Ian Roxborough wrote:
> > > I've been looking at this problem from the other end, i.e. fixing
> > > IWidgets to not be so dumb.  But, after some effort I think your
> > > current solution/hack is best.  The long term "clean" solution would
> > > seem to center around removing IWidgets from Insight. (!?)  Otherwise
> > > it will involve fixing Iwidgets.
> >
> > After using the iwidgets, I would be inclined to agree with you. Iwidgets
> > leave me as warm and fuzzy as tix.
>
> BLT to replace to Tix, BWidgets to replace IWidgets?
>
> Maybe we can replace Tix and IWidgets with BLT?
>
> Reducing the number of GUI toolkits we depend on could be seen
> as a good thing.
>
> Ian.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH/hack] Running from build dir again
  2001-09-20 10:57       ` Martin M. Hunt
@ 2001-09-20 11:01         ` Keith Seitz
  2001-09-20 11:28           ` Ian Roxborough
  0 siblings, 1 reply; 8+ messages in thread
From: Keith Seitz @ 2001-09-20 11:01 UTC (permalink / raw)
  To: Martin M. Hunt; +Cc: Ian Roxborough, Insight Maling List

On Thu, 20 Sep 2001, Martin M. Hunt wrote:

> On the other hand, iwidgets are always distributed as part of the itcl
> distribution, so does it really involve much to leave them in and use the
> ones that work well?  Also, have you been using the latest ones or the 3-year
> old iwidgets in sources?

For the few widgets we're using, I actually have downloaded "the latest".
All I can guess is that no one uses them too much, because the one or two
I looked at suffered from some very fundamental design flaws.

I'm sitting on a patch or two. In general, though, I just do not find
these widgets that useful. THere are a whole bunch of weird interface
issues involved with them. (Like specifying a -command on a spinint and it
not changing the value displayed, because it expects you to do it. Weird.)

We should either not use them, or submit patches to make them more useful.
(The scrolledwindow thingy is worthless, and I don't think it is fixable.)

Keith


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH/hack] Running from build dir again
  2001-09-20 11:01         ` Keith Seitz
@ 2001-09-20 11:28           ` Ian Roxborough
  2001-09-20 11:31             ` Keith Seitz
  0 siblings, 1 reply; 8+ messages in thread
From: Ian Roxborough @ 2001-09-20 11:28 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Martin M. Hunt, Insight Maling List

Keith Seitz wrote:
> We should either not use them, or submit patches to make them more useful.
> (The scrolledwindow thingy is worthless, and I don't think it is fixable.)

I think we would get more value per hack if we concentrate on BLT, which
seems to be able to replace almost all of the tix and IWidget functionality
we use.

The added bonus of reducing the overall number of tool kits we need is
also appealing for me.

Ian.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH/hack] Running from build dir again
  2001-09-20 11:28           ` Ian Roxborough
@ 2001-09-20 11:31             ` Keith Seitz
  0 siblings, 0 replies; 8+ messages in thread
From: Keith Seitz @ 2001-09-20 11:31 UTC (permalink / raw)
  To: Ian Roxborough; +Cc: Martin M. Hunt, Insight Maling List

On Thu, 20 Sep 2001, Ian Roxborough wrote:

> Keith Seitz wrote:
> > We should either not use them, or submit patches to make them more useful.
> > (The scrolledwindow thingy is worthless, and I don't think it is fixable.)
>
> I think we would get more value per hack if we concentrate on BLT, which
> seems to be able to replace almost all of the tix and IWidget functionality
> we use.
>
> The added bonus of reducing the overall number of tool kits we need is
> also appealing for me.

You will definitely not get any arguments from me on this point!

Keith


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-09-20 11:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-19 11:09 [PATCH/hack] Running from build dir again Keith Seitz
2001-09-19 12:03 ` Ian Roxborough
2001-09-19 12:08   ` Keith Seitz
2001-09-19 12:28     ` Ian Roxborough
2001-09-20 10:57       ` Martin M. Hunt
2001-09-20 11:01         ` Keith Seitz
2001-09-20 11:28           ` Ian Roxborough
2001-09-20 11:31             ` Keith Seitz

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).