home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 November / CPNL0711.ISO / beeld / teken / scribus-1.3.3.9-win32-install.exe / tcl / tix8.1 / pkgIndex.tcl < prev    next >
Text File  |  2004-08-31  |  1KB  |  36 lines

  1. # Tcl package index file, version 1.0
  2. # -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
  3. #
  4. #    $Id: pkgIndex.tcl,v 1.1.2.2 2002/12/15 04:21:54 idiscovery Exp $
  5. #
  6.  
  7. # The dll can be found in different places depending on how Tix is used
  8. # We look for it in 3 places and stop at the first one we find.
  9. set tail tix8184.dll
  10. # We look in the current directory (usually lib/tix8.1)
  11. set dirs .
  12. # We look in the same directory as the executable 
  13. # (which windows will do for a tix.exe anyway)
  14. lappend dirs [file dirname [info nameofexe]]
  15. # We look in the ../../bin directory (an installed Tcl)
  16. lappend dirs ../../bin
  17. # We look in the ../../DLLs directory (an installed Python)
  18. lappend dirs [file join [file dirname [info nameofexe]] DLLs]
  19. # If not, this pkgIndex.tcl will probably fail.
  20.  
  21.  
  22. set pwd [pwd]
  23. foreach elt $dirs {
  24.     if {[file isdir $elt] && \
  25.         [file isfile [file join $elt $tail]] && \
  26.         ![catch {cd $elt}]} {
  27.     set tail [file join [pwd] $tail]
  28.     break
  29.     }
  30. }
  31. cd $pwd
  32. package ifneeded Tix 8.1 [list load $tail Tix]
  33. unset dirs pwd elt tail
  34.  
  35. package ifneeded wm_default 1.0 [list source [file join $dir pref WmDefault.tcl]]
  36.