I am using ActiveTcl8.5 on Linux machine. My application contains
multiple .tcl files. I also use smtp, mime packages. Everything
works fine in my home directory. However when I try to create a
starpack nothing works. I have "package require smtp 1.4.5" on top of
my script. When I try to run the starpack I get an error: "can't find
package smtp 1.4.5". Here's the structure of myapp.vfs directory:
myapp.vfs/:
lib/
app-myapp/
Compress.tcl
Email.tcl
myapp.tcl
mime/
mime-1.5.4.tm
smtp/
smtp-1.4.5.tm
main.tcl
Could you please guide me what I am doing wrong? If you have a
similar sample that works too. Thanks
Most likely, you have not added the vfs lib directory to the tm search
path. Your main.tcl should have a line that looks something like -
::tcl::tm::path add [file join $starkit::topdir lib]
If it does have such a line and still does not work, please post your
main.tcl
/Ashok
>
> Hi,
>
> I am using ActiveTcl8.5 on Linux machine. My application contains
> multiple .tcl files. I also use smtp, mime packages. Everything
> works fine in my home directory. However when I try to create a
> starpack nothing works. I have "package require smtp 1.4.5" on top of
> my script. When I try to run the starpack I get an error: "can't find
> package smtp 1.4.5". Here's the structure of myapp.vfs directory:
>
> myapp.vfs/:
> lib/
> app-myapp/
> Compress.tcl
> Email.tcl
> myapp.tcl
> mime/
> mime-1.5.4.tm
What is a '.tm' file?
What should be here is just what is in the mime directory under
tcllib-xxx under the tcl8.5 directory. I have Tcl 8.4 installed on my
CentOS 5.5 system (installed from CentOS's tcl-<mumble>.rpms), so in my
case it would be:
mime.tcl
pkgIndex.tcl
smtp.tcl
> smtp/
> smtp-1.4.5.tm
> main.tcl
>
> Could you please guide me what I am doing wrong? If you have a
> similar sample that works too. Thanks
Have a look at my Model Railroad System package (URL in my sig). I
build a whole slew of starpacks, some pure Tcl (with libraries of Tcl
code) and some with C/C++ extension libraries and most with stuff from
Tcllib (BWidget, snit, etc.). I use a set of tclkits as 'helper'
programs during the build process. All of that is included in the
source archive.
(Yes, it is Tcl/Tk 8.4 based at present, but the principle is much the
same.)
>
--
Robert Heller -- 978-544-6933
Deepwoods Software -- Download the Model Railroad System
http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows
hel...@deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/
Isn't main.tcl created automatically (on the fly) when you do "sdx
qwrap myapp.tcl"? Are you suggesting editing it when I do "sdx unwrap
myapp.kit"? Here's the content of the main.tcl created by sdx
command:
package require starkit
starkit::startup
package require app-OEVLetters
I believe Ashok is on to the problem. The Starkit package doesn't (by
default) add the application VFS to the Tcl Module path - it only adds
it to the auto_path. Now that ActiveState are distributing packages
as TMs it would probably make sense to do that as well, but you should
be able to follow Ashok's suggestion and achieve the same result.
Steve
-----
/Ashok
By the way, if you are intending to package your application in
8.5 .tm format in the future, do not use '-' in the package name. Make
it appOEVLetters. From what I recall, the '-' confuses the tm loader
which parses it as a separator. Not sure if that problem still exists.
/Ashok
That's the wheel ... re-invented.
--
David Zolli
if {[package vsatisfies [package require Tcl] 8.5]} {
::tcl::tm::path add [file join $starkit::topdir lib]
}
Schelte.
True, but in my case, the app will not even build if version is < 8.4.
The makefile verifies the tclkit versions. You're right in general
though.
/Ashok
--
David Zolli
No. 8.3 did not have a virtual filesystem therefore no tclkit.
--
Pat Thoyts http://www.patthoyts.tk/
To reply, rot13 the return address or read the X-Address header.
PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD