From d7b40297d2ec40549321631ce061f496a14b4f46 Mon Sep 17 00:00:00 2001 From: tne Date: Tue, 21 Nov 2017 01:14:05 +0000 Subject: Final tweaks to make "./tclsh install" work properly on Windows NOTE: We still seem to be screwing up minizip on MinGW. the `find . -type f` substitution is not working --- generic/tclZipfs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index 2e24afe..a954dd6 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -4059,11 +4059,13 @@ int TclZipfs_AppHook(int *argc, char ***argv) if(strcmp(archive,"install")==0) { /* If the first argument is mkzip, run the mkzip program */ Tcl_Obj *vfsinitscript; - - vfsinitscript=Tcl_NewStringObj(ZIPFS_ZIP_MOUNT "/tcl_library/install.tcl",-1); - Tcl_IncrRefCount(vfsinitscript); /* Run this now to ensure the file is present by the time Tcl_Main wants it */ TclZipfs_TclLibrary(); + vfsinitscript=Tcl_NewStringObj(ZIPFS_ZIP_MOUNT "/tcl_library/install.tcl",-1); + Tcl_IncrRefCount(vfsinitscript); + if(Tcl_FSAccess(vfsinitscript,F_OK)==0) { + Tcl_SetStartupScript(vfsinitscript,NULL); + } return TCL_OK; } else { if(!TclZipfs_Mount(NULL, archive, ZIPFS_APP_MOUNT, NULL)) { -- cgit v0.12