From: John Doe on
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
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
From: APN on
On Jul 14, 9:36 pm, John Doe <bba...(a)gmail.com> wrote:
> 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
>     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
From: John Doe on
On Jul 14, 10:12 am, APN <palm...(a)yahoo.com> wrote:
> On Jul 14, 9:36 pm, John Doe <bba...(a)gmail.com> wrote:
>
>
>
>
>
> > 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
> >     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- Hide quoted text -
>
> - Show quoted text -

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

From: stevel on
On Jul 15, 1:39 am, John Doe <bba...(a)gmail.com> wrote:
> On Jul 14, 10:12 am, APN <palm...(a)yahoo.com> wrote:
>
>
>
>
>
> > On Jul 14, 9:36 pm, John Doe <bba...(a)gmail.com> wrote:
>
> > > 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
> > >     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- Hide quoted text -
>
> > - Show quoted text -
>
> 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
From: APN on
Here's a sample I use
------
package require starkit
starkit::startup
if {[package vcompare [package require Tcl] 8.4]} {
::tcl::tm::path add [file join $starkit::topdir lib]
}
starkit::autoextend [file join $starkit::topdir lib tcllib]
starkit::autoextend [file join $starkit::topdir lib tklib]
package require appwits

-----

/Ashok