summaryrefslogtreecommitdiffstats
path: root/demo.tcl
diff options
context:
space:
mode:
authortreectrl <treectrl>2002-12-20 00:51:32 (GMT)
committertreectrl <treectrl>2002-12-20 00:51:32 (GMT)
commitf00c0e5416696124a8a99fda5917539ab1b6ceb4 (patch)
tree5bbb6875aa1e5fa866cfb9d4fbc50d26545e5114 /demo.tcl
parente29fde86c0bf508e502e0aef595b69e9f3f298b7 (diff)
downloadtktreectrl-f00c0e5416696124a8a99fda5917539ab1b6ceb4.zip
tktreectrl-f00c0e5416696124a8a99fda5917539ab1b6ceb4.tar.gz
tktreectrl-f00c0e5416696124a8a99fda5917539ab1b6ceb4.tar.bz2
Use glob to find which shared library to load.
Diffstat (limited to 'demo.tcl')
-rw-r--r--demo.tcl8
1 files changed, 6 insertions, 2 deletions
diff --git a/demo.tcl b/demo.tcl
index d9c0f77..4382a65 100644
--- a/demo.tcl
+++ b/demo.tcl
@@ -36,9 +36,13 @@ if {[catch {
}]} {
proc dbwin s {puts -nonewline $s}
}
-if {[file exists libtreectrl1.0[info sharedlibextension]} {
- load libtreectrl1.0[info sharedlibextension]
+
+# Try to load libtreectrl*.so on Unix
+set lib [glob -nocomplain libtreectrl*[info sharedlibextension]]
+if {$lib ne ""} {
+ load $lib
} else {
+ # My own windows build
load Build/treectrl[info sharedlibextension]
}