Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Starkit Help -hardcoded path issue

Status
Not open for further replies.

Ebeezee

Technical User
Sep 30, 2011
1
US
I am trying to create a starkit/starpack for a bunch of TCL scripts that someone else has written. Throughout their code the path is hard coded.

In the first file they do this....

**myapp.tcl**
global path
set path "C:/myapp"

source $path/common/gui.tcl

Then throughout their scripts they call source $path test/etc/etc.tcl all over the place.

When I create the starkit the hard coded paths do not work anymore (for obvious reasons).

How do I get the script to look within the VFS of the exe?

**main.tcl**

package require starkit
starkit::startup
package require app-myapp


I tried adding something like this(below) in main.tcl but it does not work. (should it be in myapp.tcl?)

set home [file dirname [info script]]
source [file join $path myapp.tcl]

I also tried the following in main.tcl (which also does not work)

if {[info exist starkit::startup]} {
set path [file join starkit::topdir ... app-myapp]
} else {
set path{C:\Myapp}
}
source [file join $path smartdiag.tcl]


Any help or resources would be appreciated it. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top