From: Jan N. <jan...@gm...> - 2025-08-11 09:36:50
|
Op vr 8 aug 2025 om 03:52 schreef <apn...@ya...>: > > Will do. Both no-zipfs and TIP 726 await your return and review! Regarding no-zipfs, let's do the following. Compile tclsh with --disable-shared and Tk with "--disable-shared --disable-zipfs" Then tclsh9.0 will have a zip-file attached which contains everything in tcl_library: $ ./tclsh % set tcl_library //zipfs:/app/tcl_library % tcl::build-info 9.0.3+011bd6147b19e73dc45fc523d672079aec402cff8f0780ce6bd40deb59c4764f.gcc-1304.static Everything as expected. Now run wish: $ ./wish % set tcl_library /home/jan.nijtmans/workspace/tcl9.0/library % tcl::build-info 9.0.3+011bd6147b19e73dc45fc523d672079aec402cff8f0780ce6bd40deb59c4764f.gcc-1304.static We see that wish is built with --disable-zipfs, which means that neither tcl_library neither tk_library will be available from an attached zip-file. There's no way tclsh's "no-zipfs" tag can know this for other executables than tclsh. tcl::build-info for a shared-library build gives information how libtcl.so is built. A "no-zipfs" tag would inform us that libtcl.so doesn't have a zip-file attached. But static libraries cannot have a zip-file attached. So, should we set the "no-zipfs" tag always for static libraries? I don't think we should do that, since we already have the "static" tag too. All in all, testing whether there is a zip-file attached which provides "init.tcl", can be done as follows: if {[file exists //zipfs:/app/tcl_library/init.tcl] || [file exists //zipfs:/lib/tcl/tcl_library/init.tcl]} Unfortunately, the test is different for a static and a shared build, but there are no other variations than those two. Since your use-case is for test purposes only, that should do. Hope this helps, Jan Nijtmans |