[starkit] Starkit - Hard coded Path issue

13 views
Skip to first unread message

ebeezee

unread,
Sep 30, 2011, 11:10:12 AM9/30/11
to sta...@googlegroups.com

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. :)

--
View this message in context: http://old.nabble.com/Starkit---Hard-coded-Path-issue-tp32569586p32569586.html
Sent from the Tcl Starkit mailing list archive at Nabble.com.

Reply all
Reply to author
Forward
0 new messages