From 6d0593ab47a970f79149f83c4a810c2646cdf23c Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Mon, 23 Feb 2026 00:33:41 +1100 Subject: [PATCH] fix runtime path generation (file tail) --- src/make.tcl | 6 +++--- src/project_layouts/custom/_project/punk.basic/src/make.tcl | 6 +++--- .../custom/_project/punk.project-0.1/src/make.tcl | 6 +++--- .../custom/_project/punk.shell-0.1/src/make.tcl | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/make.tcl b/src/make.tcl index 0fd79ad3..e3233d10 100644 --- a/src/make.tcl +++ b/src/make.tcl @@ -2452,9 +2452,9 @@ if {[file dirname [info nameofexecutable]] eq $rtfolder} { # - 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 if {$::tcl_platform(platform) eq "windows"} { - exec cmd /c copy [info nameofexecutable] $rtfolder/[file rootname [info nameofexecutable]]_BUILDCOPY.exe + exec cmd /c copy [info nameofexecutable] $rtfolder/[file rootname [file tail [info nameofexecutable]]]_BUILDCOPY.exe } else { - exec cp [info nameofexecutable] $rtfolder/[file rootname [info nameofexecutable]]_BUILDCOPY + exec cp [info nameofexecutable] $rtfolder/[file tail [info nameofexecutable]]_BUILDCOPY } } @@ -2632,7 +2632,7 @@ foreach runtime [dict keys $runtime_vfs_map] { #assume it's a mounted tclkit (because tcl kits mount in same place as their underlying path and mask the executable) #use the BUILDCOPY created above - REVIEW if {$::tcl_platform(platform) eq "windows"} { - set useruntime [file rootname [file tail $runtime]]_BUILDCOPY.exe + set useruntime [file rootname $runtime]_BUILDCOPY.exe } else { set useruntime ${runtime}_BUILDCOPY } diff --git a/src/project_layouts/custom/_project/punk.basic/src/make.tcl b/src/project_layouts/custom/_project/punk.basic/src/make.tcl index 0fd79ad3..e3233d10 100644 --- a/src/project_layouts/custom/_project/punk.basic/src/make.tcl +++ b/src/project_layouts/custom/_project/punk.basic/src/make.tcl @@ -2452,9 +2452,9 @@ if {[file dirname [info nameofexecutable]] eq $rtfolder} { # - 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 if {$::tcl_platform(platform) eq "windows"} { - exec cmd /c copy [info nameofexecutable] $rtfolder/[file rootname [info nameofexecutable]]_BUILDCOPY.exe + exec cmd /c copy [info nameofexecutable] $rtfolder/[file rootname [file tail [info nameofexecutable]]]_BUILDCOPY.exe } else { - exec cp [info nameofexecutable] $rtfolder/[file rootname [info nameofexecutable]]_BUILDCOPY + exec cp [info nameofexecutable] $rtfolder/[file tail [info nameofexecutable]]_BUILDCOPY } } @@ -2632,7 +2632,7 @@ foreach runtime [dict keys $runtime_vfs_map] { #assume it's a mounted tclkit (because tcl kits mount in same place as their underlying path and mask the executable) #use the BUILDCOPY created above - REVIEW if {$::tcl_platform(platform) eq "windows"} { - set useruntime [file rootname [file tail $runtime]]_BUILDCOPY.exe + set useruntime [file rootname $runtime]_BUILDCOPY.exe } else { set useruntime ${runtime}_BUILDCOPY } diff --git a/src/project_layouts/custom/_project/punk.project-0.1/src/make.tcl b/src/project_layouts/custom/_project/punk.project-0.1/src/make.tcl index 0fd79ad3..e3233d10 100644 --- a/src/project_layouts/custom/_project/punk.project-0.1/src/make.tcl +++ b/src/project_layouts/custom/_project/punk.project-0.1/src/make.tcl @@ -2452,9 +2452,9 @@ if {[file dirname [info nameofexecutable]] eq $rtfolder} { # - 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 if {$::tcl_platform(platform) eq "windows"} { - exec cmd /c copy [info nameofexecutable] $rtfolder/[file rootname [info nameofexecutable]]_BUILDCOPY.exe + exec cmd /c copy [info nameofexecutable] $rtfolder/[file rootname [file tail [info nameofexecutable]]]_BUILDCOPY.exe } else { - exec cp [info nameofexecutable] $rtfolder/[file rootname [info nameofexecutable]]_BUILDCOPY + exec cp [info nameofexecutable] $rtfolder/[file tail [info nameofexecutable]]_BUILDCOPY } } @@ -2632,7 +2632,7 @@ foreach runtime [dict keys $runtime_vfs_map] { #assume it's a mounted tclkit (because tcl kits mount in same place as their underlying path and mask the executable) #use the BUILDCOPY created above - REVIEW if {$::tcl_platform(platform) eq "windows"} { - set useruntime [file rootname [file tail $runtime]]_BUILDCOPY.exe + set useruntime [file rootname $runtime]_BUILDCOPY.exe } else { set useruntime ${runtime}_BUILDCOPY } diff --git a/src/project_layouts/custom/_project/punk.shell-0.1/src/make.tcl b/src/project_layouts/custom/_project/punk.shell-0.1/src/make.tcl index 0fd79ad3..e3233d10 100644 --- a/src/project_layouts/custom/_project/punk.shell-0.1/src/make.tcl +++ b/src/project_layouts/custom/_project/punk.shell-0.1/src/make.tcl @@ -2452,9 +2452,9 @@ if {[file dirname [info nameofexecutable]] eq $rtfolder} { # - 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 if {$::tcl_platform(platform) eq "windows"} { - exec cmd /c copy [info nameofexecutable] $rtfolder/[file rootname [info nameofexecutable]]_BUILDCOPY.exe + exec cmd /c copy [info nameofexecutable] $rtfolder/[file rootname [file tail [info nameofexecutable]]]_BUILDCOPY.exe } else { - exec cp [info nameofexecutable] $rtfolder/[file rootname [info nameofexecutable]]_BUILDCOPY + exec cp [info nameofexecutable] $rtfolder/[file tail [info nameofexecutable]]_BUILDCOPY } } @@ -2632,7 +2632,7 @@ foreach runtime [dict keys $runtime_vfs_map] { #assume it's a mounted tclkit (because tcl kits mount in same place as their underlying path and mask the executable) #use the BUILDCOPY created above - REVIEW if {$::tcl_platform(platform) eq "windows"} { - set useruntime [file rootname [file tail $runtime]]_BUILDCOPY.exe + set useruntime [file rootname $runtime]_BUILDCOPY.exe } else { set useruntime ${runtime}_BUILDCOPY }