diff options
author | mertz | 2003-09-23 09:34:01 +0000 |
---|---|---|
committer | mertz | 2003-09-23 09:34:01 +0000 |
commit | 30a6a8e9e927aac072c293f962652ea42e278151 (patch) | |
tree | 89bb4e3140f66f72a7ac9a8f8db8b6fd362d060f | |
parent | cc7a7619c1d992b56bedb906773909696126cdc9 (diff) | |
download | tkzinc-30a6a8e9e927aac072c293f962652ea42e278151.zip tkzinc-30a6a8e9e927aac072c293f962652ea42e278151.tar.gz tkzinc-30a6a8e9e927aac072c293f962652ea42e278151.tar.bz2 tkzinc-30a6a8e9e927aac072c293f962652ea42e278151.tar.xz |
zinc-demos should now find the demos even if an empty directory
named xxx/demos/zinc_lib exists somewhere
-rw-r--r-- | Perl/demos/zinc-demos | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Perl/demos/zinc-demos b/Perl/demos/zinc-demos index 6846526..dcb7604 100644 --- a/Perl/demos/zinc-demos +++ b/Perl/demos/zinc-demos @@ -47,7 +47,11 @@ $MW->configure(-menu => my $menubar = $MW->Menu); $MW->title('TkZinc Perl demonstrations'); $FONT = '-*-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*'; my $widget_lib = Tk->findINC('demos/widget_lib'); -my $zinc_lib = Tk->findINC('demos/zinc_lib'); +# the previous simple statement $zinc_lib = Tk->findINC('demos/zinc_lib'); +# found in some cases such old directory empty (e.g. after a previous package de-installation) +# So now, we look for a non-empty demos/zinc_lib directory (ie containing one of the demo!) +my $zinc_lib = Tk->findINC('demos/zinc_lib/tiger.pl'); +($zinc_lib) = $zinc_lib =~ /(.*)\//; my $wd = "$widget_lib/WidgetDemo.pm"; $WIDTRIB = Tk->findINC('demos/zinc_contrib_lib'); unless (Tk::tainting) { |