• Re: kit improvement suggestion

    From Ted Nolan @21:1/5 to [email protected] on Fri Aug 8 16:43:53 2025
    In article <10758ki$qa80$[email protected]>, saito <[email protected]> wrote: >I recently built a custom tclkit and wrapped it. I noticed that when it >runs, it extracts its dll's and other stuff. This is fine.

    However, it turns out that it does this each and every time you run it.
    This seems excessive. It adds to the startup time, it wastes space and
    it creates lots of duplicate folders.

    I wonder if tclkit could be enhanced in a simple way that keeps the
    benefits and avoids the negatives: use the wrapped kit name, or some
    hash of it, and use that as the folder name where to extract the dll's.
    If it exists, skip the file extract/copy/save operation. Otherwise, it
    means it is the first time the app is running, and it can extract the files.



    That seems like it would leave you open to a number of issues. Security obviously, but maybe you have a shared filesystem and last time you
    ran the ubuntu version of the kit and this time you ran the redhat
    one and their dlls are complied against different glibc versions or whatever. --
    columbiaclosings.com
    What's not in Columbia anymore..

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robert Heller@21:1/5 to [email protected] on Fri Aug 8 16:47:34 2025
    There really isn't any sensible way to do this. There really isn't to be certain that the extracted dlls/sos are really the correct ones.

    The startup cost is probably small. I don't know about MS-Windows specificly, but I believe under Linux, the extracted so files are marked for deletion on program exit. I think under Linux, the so files are extracted to /tmp, which
    on most modern Linuxes is a RAMDISK (eg it is gone on reboot), I don't know why there would be duplicate directories, unless it is another MS-Windows "weirdness".

    At Fri, 8 Aug 2025 12:29:05 -0400 saito <[email protected]> wrote:


    I recently built a custom tclkit and wrapped it. I noticed that when it runs, it extracts its dll's and other stuff. This is fine.

    However, it turns out that it does this each and every time you run it.
    This seems excessive. It adds to the startup time, it wastes space and
    it creates lots of duplicate folders.

    I wonder if tclkit could be enhanced in a simple way that keeps the
    benefits and avoids the negatives: use the wrapped kit name, or some
    hash of it, and use that as the folder name where to extract the dll's.
    If it exists, skip the file extract/copy/save operation. Otherwise, it
    means it is the first time the app is running, and it can extract the files.





    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    [email protected] -- Webhosting Services

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robert Heller@21:1/5 to [email protected] on Fri Aug 8 17:17:36 2025
    At Fri, 8 Aug 2025 13:05:32 -0400 saito <[email protected]> wrote:


    On 8/8/2025 12:43 PM, Ted Nolan <tednolan> wrote:

    That seems like it would leave you open to a number of issues. Security obviously, but maybe you have a shared filesystem and last time you
    ran the ubuntu version of the kit and this time you ran the redhat
    one and their dlls are complied against different glibc versions or whatever.

    You can compare dll file info one by one, including their checksums.

    The shared file system scenario seems interesting and limited to Linux.
    Is it common? In any case, it is easy to address it: just include user
    name somehow in the folder name. I doubt the same user would be using multiple Linux versions at the same time.

    (Same user name on different systems is very common in the Linux / UNIX
    world. Using the host name *might* be better...)

    Both MS-Windows and MacOSX support "shared" file systems as well as Linux. MacOSX and Linux both support at least two flavors of file sharing.

    Also there are now various cloud file sharing options as well.

    I am not sure file sharing is really an issue anyway. Under Linux (and probably MacOSX) there is almost never going to be a reason to "share" /tmp...






    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    [email protected] -- Webhosting Services

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Sat Aug 9 16:24:26 2025
    Am 08.08.2025 um 18:29 schrieb saito:
    I recently built a custom tclkit and wrapped it.  I noticed that when it runs, it extracts its dll's and other stuff.  This is fine.

    However, it turns out that it does this each and every time you run it.
    This seems excessive. It adds to the startup time, it wastes space and
    it creates lots of duplicate folders.

    I wonder if tclkit could be enhanced in a simple way that keeps the
    benefits and avoids the negatives: use the wrapped kit name, or some
    hash of it, and use that as the folder name where to extract the dll's.
    If it exists, skip the file extract/copy/save operation. Otherwise, it
    means it is the first time the app is running, and it can extract the
    files.


    Dear Saito,
    this is an open issue since at least 20 years.
    This is starkit technology by JC Wipfler.

    We had last year a heavy discussion on this point, if dlls may be memory loaded.
    A side aspect of it is this TIP:

    https://core.tcl-lang.org/tips/doc/trunk/tip/709.md

    On the core, we decided to not put any dlls in the zip on Windows, so
    the dde and registry dlls are not included.

    Another manifestation was this widthdrawn TIP: https://core.tcl-lang.org/tips/doc/trunk/tip/702.md

    I just want to day, that a lot of discussion already took place and
    there is no satisfactory solution jet. So, any solution welcome!

    On the practical side, you may follow the solution I use and presented here: https://wiki.tcl-lang.org/page/Single+file+applications+in+Tcl+9
    I also used it for starkits.

    Take care,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)