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