• working with --enable-zipfs

    From Nicolas@21:1/5 to All on Wed Feb 9 05:29:44 2022
    Hi,
    can someone please explain me how to work with --enable-zipfs ?
    (on linux, with Tcl/Tk8.7)

    I recently learnt that with --enable-zipfs option at compile time, all Tcl and Tk scripts are zipped and include in libtcl8.7.so/libtk8.7.so
    For what I understand all library files are first packed in libtcl8.7a6.zip/libtk8.7a6.zip then added to .so
    is that right?

    now at C level, I'm starting more or less my app like that:
    #ifdef WIN32
    int wmain(int argc, wchar_t **argv) {
    #else
    int main (int argc, char* argv[]) {
    #endif

    //mainLoop
    Tk_Main(argc, argv, Tk_AppInit);

    exit(EXIT_SUCCESS);
    }

    and in int Tk_AppInit(Tcl_Interp *interp), I'm calling:
    if (Tcl_Init(interp) == TCL_ERROR) {
    return TCL_ERROR;
    }
    if (Tk_Init(interp) == TCL_ERROR) {
    return TCL_ERROR;
    }

    It doesn't work because:
    application-specific initialization failed : Can't find a usable init.tcl...

    Can someone explain me how to do it right?
    many thanks,
    nicolas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas@21:1/5 to All on Wed Feb 9 08:40:06 2022
    Le mercredi 9 février 2022 à 14:29:50 UTC+1, Nicolas a écrit :
    Hi,
    can someone please explain me how to work with --enable-zipfs ?
    (on linux, with Tcl/Tk8.7)

    I recently learnt that with --enable-zipfs option at compile time, all Tcl and Tk scripts are zipped and include in libtcl8.7.so/libtk8.7.so
    For what I understand all library files are first packed in libtcl8.7a6.zip/libtk8.7a6.zip then added to .so
    is that right?

    now at C level, I'm starting more or less my app like that:
    #ifdef WIN32
    int wmain(int argc, wchar_t **argv) {
    #else
    int main (int argc, char* argv[]) {
    #endif

    //mainLoop
    Tk_Main(argc, argv, Tk_AppInit);

    exit(EXIT_SUCCESS);
    }

    and in int Tk_AppInit(Tcl_Interp *interp), I'm calling:
    if (Tcl_Init(interp) == TCL_ERROR) {
    return TCL_ERROR;
    }
    if (Tk_Init(interp) == TCL_ERROR) {
    return TCL_ERROR;
    }

    It doesn't work because:
    application-specific initialization failed : Can't find a usable init.tcl...

    Can someone explain me how to do it right?
    many thanks,
    nicolas
    ok...
    the trick is to call
    TclZipfs_AppHook(&argc, &argv);


    ++

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas@21:1/5 to All on Wed Feb 9 10:39:45 2022
    Le mercredi 9 février 2022 à 17:40:10 UTC+1, Nicolas a écrit :
    Le mercredi 9 février 2022 à 14:29:50 UTC+1, Nicolas a écrit :
    Hi,
    can someone please explain me how to work with --enable-zipfs ?
    (on linux, with Tcl/Tk8.7)

    I recently learnt that with --enable-zipfs option at compile time, all Tcl and Tk scripts are zipped and include in libtcl8.7.so/libtk8.7.so
    For what I understand all library files are first packed in libtcl8.7a6.zip/libtk8.7a6.zip then added to .so
    is that right?

    now at C level, I'm starting more or less my app like that:
    #ifdef WIN32
    int wmain(int argc, wchar_t **argv) {
    #else
    int main (int argc, char* argv[]) {
    #endif

    //mainLoop
    Tk_Main(argc, argv, Tk_AppInit);

    exit(EXIT_SUCCESS);
    }

    and in int Tk_AppInit(Tcl_Interp *interp), I'm calling:
    if (Tcl_Init(interp) == TCL_ERROR) {
    return TCL_ERROR;
    }
    if (Tk_Init(interp) == TCL_ERROR) {
    return TCL_ERROR;
    }

    It doesn't work because:
    application-specific initialization failed : Can't find a usable init.tcl...

    Can someone explain me how to do it right?
    many thanks,
    nicolas
    ok...
    the trick is to call
    TclZipfs_AppHook(&argc, &argv);


    ++
    as a side note, in order to work, you must not strip the .so

    ++

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