|
|
|
@ -2458,17 +2458,21 @@ proc ::punkboot::lib::runtime_buildcopyname {runtime} { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
set runtimes [list] |
|
|
|
set runtimes [list] |
|
|
|
if {[file dirname [info nameofexecutable]] eq $rtfolder} { |
|
|
|
if {[file dirname [info nameofexecutable]] eq $rtfolder && [file isdirectory [info nameofexecutable]]} { |
|
|
|
|
|
|
|
#info name will only appear to be a directory when the runtime is a tclkit that is mounted at the same path as the physical file. |
|
|
|
|
|
|
|
#This is not a problem for zip based kits. |
|
|
|
#fix so that we can find and use a runtime tclkit that is currently in use as the runtime that is running this script. |
|
|
|
#fix so that we can find and use a runtime tclkit that is currently in use as the runtime that is running this script. |
|
|
|
# - when the current runtime is using a runtime in the rtfolder that is a tclkit, it is mounted at the same path as the physical file and so appears to Tcl as if it's a directory. |
|
|
|
# - when the current runtime is using a runtime in the rtfolder that is a tclkit, it is mounted at the same path as the physical file and so appears to Tcl as if it's a directory. |
|
|
|
# - use external filesystem tools to make a copy of the file |
|
|
|
# - use external filesystem tools to make a copy of the file |
|
|
|
if {$::tcl_platform(platform) eq "windows"} { |
|
|
|
if {$::tcl_platform(platform) eq "windows"} { |
|
|
|
#exec cmd /c copy [info nameofexecutable] $rtfolder/[file rootname [file tail [info nameofexecutable]]]_BUILDCOPY.exe |
|
|
|
#exec cmd /c copy [info nameofexecutable] $rtfolder/[file rootname [file tail [info nameofexecutable]]]_BUILDCOPY.exe |
|
|
|
exec cmd /c copy [info nameofexecutable] $rtfolder/[punkboot::lib::runtime_buildcopyname [info nameofexecutable]] |
|
|
|
exec cmd /c copy [file nativename [info nameofexecutable]] [file nativename $rtfolder/[punkboot::lib::runtime_buildcopyname [info nameofexecutable]]] |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
#exec cp [info nameofexecutable] $rtfolder/[file tail [info nameofexecutable]]_BUILDCOPY |
|
|
|
#exec cp [info nameofexecutable] $rtfolder/[file tail [info nameofexecutable]]_BUILDCOPY |
|
|
|
exec cp [info nameofexecutable] $rtfolder/[punkboot::lib::runtime_buildcopyname [info nameofexecutable]] |
|
|
|
exec cp [info nameofexecutable] $rtfolder/[punkboot::lib::runtime_buildcopyname [info nameofexecutable]] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#we need to add the base name of the current exe to the runtimes list because the next section will look for files in the runtime folder |
|
|
|
|
|
|
|
#and won't find the mounted runtime since it's mounted as a directory. |
|
|
|
lappend runtimes [file tail [info nameofexecutable]] |
|
|
|
lappend runtimes [file tail [info nameofexecutable]] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -2627,7 +2631,7 @@ foreach runtime [dict keys $runtime_vfs_map] { |
|
|
|
|
|
|
|
|
|
|
|
#invoke can fail if runtime not an executable file for the current platform |
|
|
|
#invoke can fail if runtime not an executable file for the current platform |
|
|
|
if {[file type $rtfolder/$runtime] eq "directory"} { |
|
|
|
if {[file type $rtfolder/$runtime] eq "directory"} { |
|
|
|
#assume it's a mounted tclkit (because tcl kits mount in same place as their underlying path and mask the executable) |
|
|
|
#assume it's a mounted tclkit (because tcl kits mount in same place as their underlying path and mask the executable as a directory) |
|
|
|
#use the BUILDCOPY created above - REVIEW |
|
|
|
#use the BUILDCOPY created above - REVIEW |
|
|
|
if {$::tcl_platform(platform) eq "windows"} { |
|
|
|
if {$::tcl_platform(platform) eq "windows"} { |
|
|
|
set useruntime [file rootname $runtime]_BUILDCOPY.exe |
|
|
|
set useruntime [file rootname $runtime]_BUILDCOPY.exe |
|
|
|
|