How to import open source Tcl packages into Cloverleaf

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf How to import open source Tcl packages into Cloverleaf

  • Creator
    Topic
  • #55541
    Mike Keys
    Participant

    I’ve grabbed a Tcl package from sourceforge and I want this to be available to Cloverleaf. I placed the package in $HCIROOT/tcl/lib/tcllib-1.16

    We are on 6.1.2.

Viewing 3 reply threads
  • Author
    Replies
    • #85676
      Charlie Bursell
      Participant

      Mike:

      Tcl searches the auto_path global list and one level deeper for packages.  Do something like:

      tcl>foreach p $auto_path {echo $p}

      C:/healthvision/cis5.8/integrator/tcl/lib/cloverleaf

      C:/healthvision/cis5.8/integrator/tcl/lib/tfc

      C:/healthvision/cis5.8/integrator/cbtest/tclprocs

      C:/healthvision/cis5.8/integrator/cbtest/tclprocs

      C:/healthvision/cis5.8/integrator/tclprocs

      C:healthvisioncis5.8integratortcllibtcl8.4

      C:/healthvision/cis5.8/integrator/tcl/lib

      C:/healthvision/cis5.8/integrator/lib

      C:healthvisioncis5.8integratortcllibtclx8.4

      C:/healthvision/cis5.8/integrator/tcl/lib/tcllib1.11.1

      And you will see your default auto_path.  So,if you package index is under tcllib-1.16 you could put the directory under $HCIROOT/tcl/lib and it will work.  That is where I have my TclLib package

      A trick you can use.  If you want your own packages and not available to others you could put the TclLib directory some other place like $HOME/mike then before calling any of the packages append to auto_path like:

        lappend ::auto_path /home/mike  (remember auto_path is a global)

    • #85677
      Mike Keys
      Participant

      Charlie,

      Thanks. I grabbed the latest version of pdf4tcl and when running a message against it found that it requires Tcl version 10.0. I had to go back a version that still supported Tcl 8.4/8.5 and the package works fine.

      It works fine living in the directory under  $HCIROOT/tcl/lib/tcllib-1.16

      Mike

    • #85678
      David Barr
      Participant

      TCL 10.0 doesn’t exist yet. The latest (alpha) version of TCL is 8.7.

      I think you should put new packages under $HCIROOT/tcl/lib. $HCIROOT/tcl/lib/tcllib-1.16 is only intended to keep Tcllib packages (https://wiki.tcl.tk/1246). PDF4TCL is not a Tcllib package.

    • #85679
      Mike Keys
      Participant

      David,

      o.k. thanks. Done and still works fine.

      Mike

Viewing 3 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10