Starkit - Hard coded Path issue
ebeezee <[email protected]> Fri, 30 Sep 2011 08:10:12 -0700 (PDT)
| Newsgroups | gmane.comp.lang.tcl.starkit |
|---|---|
| Message-ID | <[email protected]> |
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.
--
You received this message because you are subscribed to the "starkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/starkit?hl=en