|
|
|
@ -2839,6 +2839,7 @@ foreach vfstail $vfs_tails {
|
|
|
|
|
#zipfs mkimg replaces the entire zipped vfs in the runtime - so we need the original data to be part of our targetvfs. |
|
|
|
|
puts stdout "building $vfsname.new with zipfs vfsdir:$vfstail cwd: [pwd]" |
|
|
|
|
file mkdir $targetvfs |
|
|
|
|
set raw_runtime $buildfolder/raw_$runtime_fullname |
|
|
|
|
|
|
|
|
|
if {[info commands ::tcl::zipfs::mount] ne ""} { |
|
|
|
|
|
|
|
|
@ -2862,7 +2863,6 @@ foreach vfstail $vfs_tails {
|
|
|
|
|
#which unfortunately Tcl does by default after the 2021 'fix' :( |
|
|
|
|
#https://core.tcl-lang.org/tcl/tktview/aaa84fbbc5 |
|
|
|
|
|
|
|
|
|
set raw_runtime $buildfolder/raw_$runtime_fullname |
|
|
|
|
if {[file exists $rtmountpoint]} { |
|
|
|
|
merge_over $rtmountpoint $targetvfs |
|
|
|
|
#see if we can extract the exe part |
|
|
|
@ -2889,16 +2889,23 @@ foreach vfstail $vfs_tails {
|
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
#the input building_runtime wasn't mountable as a zip - so presumably a plain executable |
|
|
|
|
#set building_runtime $buildfolder/build_$runtime_fullname ;#working copy of runtime executable - (possibly with kit/zipfs/cookfs etc attached!) |
|
|
|
|
#set raw_runtime $buildfolder/raw_$runtime_fullname |
|
|
|
|
#runtime executable possibly with kit/cookfs etc attached? |
|
|
|
|
#If not - init.tcl probably won't be found? should we even proceed ?? |
|
|
|
|
puts stderr "\x1b\[31mWARNING the runtime was not mountable as a zip - which means tcl_library was not extracted - the executable may not work with zipfs attached!\x1b\[m" |
|
|
|
|
file copy -force $building_runtime $raw_runtime |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
package require punk::zip |
|
|
|
|
#tcl we are calling with doesn't have zipfs - can't mount |
|
|
|
|
puts stderr "WARNING: tcl shell '[info nameofexecutable]' being used to build doesn't have zipfs - falling back to punk::zip::extract_preamble" |
|
|
|
|
punk::zip::extract_preamble $building_runtime $raw_runtime $buildfolder/extracted_$runtime_fullname.zip |
|
|
|
|
merge_over $buildfolder/extracted_$runtime_fullname.zip $targetvfs |
|
|
|
|
set extractedzip $buildfolder/extracted_$runtime_fullname.zip |
|
|
|
|
punk::zip::extract_preamble $building_runtime $raw_runtime $extractedzip |
|
|
|
|
package require zipfile::decode |
|
|
|
|
zipfile::open $extractedzip |
|
|
|
|
set archiveinfo [zipfile::archive] |
|
|
|
|
zipfile::unzip $archiveinfo extracted_$runtime_fullname |
|
|
|
|
#todo - verify that init.tcl etc are present? |
|
|
|
|
merge_over $buildfolder/extracted_$runtime_fullname $targetvfs |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
merge_over $sourcefolder/vfs/_vfscommon.vfs $targetvfs |
|
|
|
|