Diff

Differences From Artifact [31a964e643]:

To Artifact [2b2126d5c0]:


71
72
73
74
75
76
77







78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101



102
103
104
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89


90
91
92
93
94
95
96
97
98


99
100
101
102
103
104
105
106
107
108
109
110







+
+
+
+
+
+
+





-
-









-
-






+
+
+



	# This loads everything needed for "clock scan" to work
	# "clock scan" is used within "vfs::zip", which may be
	# loaded before this is run causing the root VFS to break
	catch { clock scan }

	# Load these, the original Tclkit does so it should be safe.
	uplevel #0 [list source [file join $tcl_mountpoint lib vfs vfsUtils.tcl]]

	# Set a maximum seek to avoid reading the entire DLL looking for a
	# zip header
	catch {
		package require vfs::zip
		set ::zip::max_header_seek 8192
	}

	# Now that the initialization is complete, mount the user VFS if needed
	## Mount the VFS from the Shared Object
	if {[info exists ::initVFS] && [info exists ::tclKitFilename]} {
		catch {
			package require vfs::zip

			vfs::zip::Mount $::tclKitFilename "/.KITDLL_USER"

			lappend auto_path [file normalize "/.KITDLL_USER/lib"]
		}
	}

	## Mount the VFS from executable
	if {[info exists ::initVFS]} {
		catch {
			package require vfs::zip

			vfs::zip::Mount [info nameofexecutable] "/.KITDLL_APP"

			lappend auto_path [file normalize "/.KITDLL_APP/lib"]
		}
	}

	# Clean up
	unset -nocomplain ::zip::max_header_seek

	# Clean up after the kitInit.c:preInitCmd
	unset -nocomplain ::initVFS ::tclKitFilename
}