Diff

Differences From Artifact [901380bcbe]:

To Artifact [50169ff8c3]:


   133    133   	"info script $old\n"
   134    134   	"if {$code == 2} { set code 0 }\n"
   135    135   	"return -code $code $res\n"
   136    136   "}\n"
   137    137   #endif /* _WIN32_WCE && !TCLKIT_DLL */
   138    138   "proc tclKitInit {} {\n"
   139    139   	"rename tclKitInit {}\n"
          140  +	"catch { load {} vfs }\n"
   140    141   #ifdef KIT_INCLUDES_ZLIB
   141    142   	"catch { load {} zlib }\n"
   142    143   #endif
   143    144   #ifdef KIT_INCLUDES_MK4TCL
   144    145   	"catch { load {} Mk4tcl }\n"
   145    146   #endif
   146    147   #ifdef TCLKIT_DLL
................................................................................
   151    152   	"set bootfile [file join " TCLKIT_MOUNTPOINT " boot.tcl]\n"
   152    153   	"if {[file exists $bootfile]} {\n"
   153    154   		"catch {\n"
   154    155   			"set f [open $bootfile]\n"
   155    156   			"set s [read $f]\n"
   156    157   			"close $f\n"
   157    158   		"}\n"
          159  +	"} else {\n"
          160  +		"set ::TCLKIT_INITVFS 1\n"
   158    161   	"}\n"
   159    162   #ifdef KIT_STORAGE_MK4
   160    163   	"set ::tclKitStorage \"mk4\"\n"
   161    164   	"if {![info exists s]} {\n"
   162    165   		"mk::file open exe " TCLKIT_VFSSOURCE " -readonly\n"
   163    166   		"set n [mk::select exe.dirs!0.files name boot.tcl]\n"
   164    167   		"if {$n != \"\"} {\n"
................................................................................
   169    172   				"set s [zlib decompress $s]\n"
   170    173   			"}\n"
   171    174   		"}\n"
   172    175   	"}\n"
   173    176   #endif /* KIT_STORAGE_MK4 */
   174    177   #ifdef KIT_STORAGE_ZIP
   175    178   	"set ::tclKitStorage \"zip\"\n"
   176         -	"catch { load {} vfs }\n"
   177    179   	"if {![info exists s]} {\n"
   178    180   #  include "zipvfs.tcl.h"
   179    181   		"catch {\n"
   180    182   			"set ::tclKitStorage_fd [::zip::open " TCLKIT_VFSSOURCE "]\n"
   181    183   			"::zip::stat $::tclKitStorage_fd boot.tcl sb\n"
   182    184   			"seek $::tclKitStorage_fd $sb(ino)\n"
   183    185   			"::zip::Data $::tclKitStorage_fd sb s\n"
   184    186   		"}\n"
   185    187   	"}\n"
   186    188   #endif /* KIT_STORAGE_ZIP */
   187    189   #ifdef KIT_STORAGE_CVFS
   188    190   	"set ::tclKitStorage \"cvfs\"\n"
   189    191   	"load {} rechan\n"
   190         -	"load {} vfs\n"
   191    192   	"load {} cvfs_data_tcl\n"
   192    193   #include "cvfs.tcl.h"
   193    194   	"if {![info exists s]} {\n"
   194    195   		"catch {\n"
   195    196   			"set s [::vfs::cvfs::data::getData tcl boot.tcl]\n"
   196    197   		"}\n"
   197    198   	"}\n"
................................................................................
   382    383   	/* the tcl_rcFileName variable only exists in the initial interpreter */
   383    384   #  ifdef _WIN32
   384    385   	Tcl_SetVar(interp, "tcl_rcFileName", "~/tclkitrc.tcl", TCL_GLOBAL_ONLY);
   385    386   #  else
   386    387   	Tcl_SetVar(interp, "tcl_rcFileName", "~/.tclkitrc", TCL_GLOBAL_ONLY);
   387    388   #  endif /* _WIN32 */
   388    389   #endif /* !TCLKIT_DLL */
   389         -	Tcl_SetVar(interp, "TCLKIT_INITVFS", "1", TCL_GLOBAL_ONLY);
   390    390   
   391    391   #ifdef TCLKIT_CAN_SET_ENCODING
   392    392   	/* Set the encoding from the Environment */
   393    393   	Tcl_GetEncodingNameFromEnvironment(&encodingName);
   394    394   	Tcl_SetSystemEncoding(NULL, Tcl_DStringValue(&encodingName));
   395    395   	Tcl_SetVar(interp, "tclkit_system_encoding", Tcl_DStringValue(&encodingName), 0);
   396    396   	Tcl_DStringFree(&encodingName);