Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Starkit, problem loading tls

66 views
Skip to first unread message

P8j6

unread,
Oct 30, 2017, 7:06:08 PM10/30/17
to
Hi,

i have starkit, where i loading tls package, in main.tcl

package require starkit

if {[starkit::startup] ne "sourced"} {

::tcl::tm::path add [file join $starkit::topdir tmlib]
package require tls
# some other code here...
}

Now, when i put app.kit into:

C:/devel/app.kit

-everything runs fine.

But when i put app.kit in folder with czech characters, for example:

C:/devel/Stažené soubory/app.kit

It will ends with this error: https://ibin.co/3fcF32vRZELt.png

How can i setup starkit, so he can handle loading DLLs with special characters in path?

Thanks for any help.




Mike Griffiths

unread,
Oct 31, 2017, 5:05:07 PM10/31/17
to
Are you sure it's the special characters, and not the space, causing the issue? On Windows when you have a starkit, tls::initlib tries to copy a couple of dependancy DLLs out of the starkit and into the directory the starkit is in, and I suspect it's that which is failing, causing the error you're getting. Try it in a directory with special chars, but no spaces, and see if that works?

P8j6

unread,
Oct 31, 2017, 5:34:51 PM10/31/17
to
Dne úterý 31. října 2017 22:05:07 UTC+1 Mike Griffiths napsal(a):
Nop, its special characters. Space is OK. I tried:

C:\devel\stazene soubory\app.kit - worked perfectly

C:\devel\staženeěščřžýáí - crashed

Probably some encoding problem in starkit? It failing with every binary packages. Probably starkit cant copy *.dll file from starpak, when there are these characters. Maybe bug?

Rich

unread,
Oct 31, 2017, 5:45:57 PM10/31/17
to
P8j6 <jureck...@gmail.com> wrote:
> Probably some encoding problem in starkit? It failing with every
> binary packages. Probably starkit cant copy *.dll file from starpak,
> when there are these characters. Maybe bug?

Or, maybe the windows dll loading API is more restrictive filename
character wise than other parts of windows (note, just a guess here).

P8j6

unread,
Nov 1, 2017, 11:20:52 AM11/1/17
to
Dne úterý 31. října 2017 22:45:57 UTC+1 Rich napsal(a):
>
> Or, maybe the windows dll loading API is more restrictive filename
> character wise than other parts of windows (note, just a guess here).

Hmm, maybe windows cant load DLL from that path with special cahrs - but that doesn't matter, because as far as i know (and maybe im wrong) starpack always copy DLLs from starkit vfs to some TEMP folder in windows.

I created workaround and for each binary package im now using my own loader which copy DLLs to temp and then loads them to app.

If anyone interested, im using this proc:

proc setup_dll {dir ver} {
set tmpdir [file join $::env(TEMP) myapp]
file mkdir $tmpdir
foreach sdll [glob -nocomplain -directory $dir -tails *.dll] {
catch {file delete -force $tmpdir/$sdll}
catch {file copy -force $dir/$sdll $tmpdir/$sdll}
load [file join $tmpdir $sdll] $ver
}
}

and then in pkgIndex, im doing this:

package ifneeded tls 1.6.5 \
"[list source [file join $dir tls.tcl]] ; \
[list setup_dll $dir tls];"

And it works :)

But i would like to find bug in starkit and report it. Can anyone point me, where in the startkit ecosystem is done DLL copying?
I looked into starkit-1.3.3.tm, but found nothing interesting...

0 new messages