Re: starpack & starkit source tcl files

From: Jean-Claude Wippler (jcw_at_equi4.com)
Date: 02/17/04


Date: 17 Feb 2004 07:17:57 -0800

colder@myself.com (c. older) wrote...
> Am trying to create a starpack on linux-x86 but can't seem to get the
> files sourced properly. I have no problems on windows, but the tclkit
> is a few versions older.

Which one is it - why not update from http://www.equi4.com/pub/tk/ ?

> ---- in main.tcl -----
>
> package require starkit
> starkit::startup
> set env(BASEDIR) [file join $starkit::topdir]
> source [file join $env(BASEDIR) bin flshcopy.tcl]

Why not simply:
    source [file join $starkit::topdir bin flshcopy.tcl]

[...]
> if {! [info exists env(BASEDIR)] } {
> set env(BASEDIR) [pwd]
> }
>
> set _src_files { ftp_procs.tcl scrnsprt.tcl flshutil.tcl }
>
> puts "\nenv(BASEDIR) : $env(BASEDIR)"
> puts "starkit::topdir : $starkit::topdir"
> puts "pwd : [pwd]"
> puts "auto_path : $auto_path\n"
> C.Older
> foreach _file $_src_files {
> set _file [file join $env(BASEDIR) bin $_file]
> source $_file

Why not simply:
     source [file join $starkit::topdir bin $_file]

Your troubles seem to te caused by your assumption that "[pwd]"
returns a path which has anything to do with the location of your
scripts.

Not true. Create a script with "puts [pwd]" in it, go to a completely
different directory and then run that script, using its full path,
e.g. "tclsh /path/to/my/demo/script.tcl".

If you insist, try replacing all your [pwd]'s with "[file dirname
[info script]]" - although that too is not full proof when called from
inside proc's...

-jcw



Relevant Pages

  • http::geturl in starkit/starpack
    ... When wrapping the script below into a starkit or a starpack, ... When downloading large files, the scripts hangs after ... When running the script without wrapping, ...
    (comp.lang.tcl)
  • Executing script in Windows XP in the background.
    ... I recently wrote a script that emails me if any of my x-10 sensors is tripped. ... I like the starpack version as it is smaller and for some reason it looks easier for me to work on starkit. ... What I want is once I hit that exe file or my x-10 sensor launch it, for the script to execute in the background. ... Right now I can see the a black screen open and the script execute. ...
    (comp.lang.tcl)
  • Re: loading oratcl from starkit
    ... I'm having some problems loading oratcl from a starkit. ... The script fail when it try to load the oratcl44.dll, ... the dll were not copied into c:\temp. ...
    (comp.lang.tcl)
  • Re: no Tcl installed on target machine - how execute?
    ... >> This script should be executed by the receiver. ... >> I do not know if Tcl is installed oh his machine. ... >An option is to build a starkit with TclKit. ... >file system with your tclsh interpreter included. ...
    (comp.lang.tcl)
  • Re: starkit question
    ... :# act of creating starkit ... That means that once you press the button, the script ... cleaning up after itself as well as this sample kit does. ...
    (comp.lang.tcl)