From 53282858b4c56d9926b61efc1301dbe9531af223 Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Mon, 23 Feb 2026 01:01:38 +1100 Subject: [PATCH] attempt to avoid cross-platform kit builds for now - todo for later --- src/make.tcl | 23 +++++++++++++++++++ .../custom/_project/punk.basic/src/make.tcl | 23 +++++++++++++++++++ .../_project/punk.project-0.1/src/make.tcl | 23 +++++++++++++++++++ .../_project/punk.shell-0.1/src/make.tcl | 23 +++++++++++++++++++ 4 files changed, 92 insertions(+) diff --git a/src/make.tcl b/src/make.tcl index e3233d10..6c94a68c 100644 --- a/src/make.tcl +++ b/src/make.tcl @@ -2627,6 +2627,14 @@ foreach runtime [dict keys $runtime_vfs_map] { puts -nonewline stdout $caps exit 0 } + + #temp + #build for current platform only for now + if {![file exists $rtfolder/$runtime]} { + dict set runtime_caps $runtime exitcode -1 error "find-fail" + continue + } + #invoke can fail if runtime not an executable file for the current platform 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) @@ -2679,6 +2687,15 @@ foreach runtimefile $runtimes { # file copy $rtfolder/$runtimefile $buildfolder/buildruntime.exe #} + #---------------------- + #todo + #temp - only build for current platform - need changes to runtime/mapvfs.config etc + if {![file exists $rtfolder/$runtimefile]} { + puts stderr " >> skipping $runtimefile not present in $rtfolder (wrong platform?) x-platform kit build TODO." + continue + } + #---------------------- + if {![file type $rtfolder/$runtimefile] eq "directory"} { #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 @@ -3619,6 +3636,12 @@ foreach vfstail $vfs_tails { $vfs_event destroy $vfs_installer destroy + #TODO - allow building of kits for other platforms + # - we need to use /bin for only kits targetting current platform, + # and use /bin/ for others + # that we we can have same target executable for multiple platforms e.g executable just named 'punkshell' + # - to do this we need to change runtime/mapvfs.config to have platform names not just standalone target executable names + # (todo: change to toml format at same time) after 200 set deployment_folder [file dirname $sourcefolder]/bin file mkdir $deployment_folder 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 e3233d10..6c94a68c 100644 --- a/src/project_layouts/custom/_project/punk.basic/src/make.tcl +++ b/src/project_layouts/custom/_project/punk.basic/src/make.tcl @@ -2627,6 +2627,14 @@ foreach runtime [dict keys $runtime_vfs_map] { puts -nonewline stdout $caps exit 0 } + + #temp + #build for current platform only for now + if {![file exists $rtfolder/$runtime]} { + dict set runtime_caps $runtime exitcode -1 error "find-fail" + continue + } + #invoke can fail if runtime not an executable file for the current platform 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) @@ -2679,6 +2687,15 @@ foreach runtimefile $runtimes { # file copy $rtfolder/$runtimefile $buildfolder/buildruntime.exe #} + #---------------------- + #todo + #temp - only build for current platform - need changes to runtime/mapvfs.config etc + if {![file exists $rtfolder/$runtimefile]} { + puts stderr " >> skipping $runtimefile not present in $rtfolder (wrong platform?) x-platform kit build TODO." + continue + } + #---------------------- + if {![file type $rtfolder/$runtimefile] eq "directory"} { #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 @@ -3619,6 +3636,12 @@ foreach vfstail $vfs_tails { $vfs_event destroy $vfs_installer destroy + #TODO - allow building of kits for other platforms + # - we need to use /bin for only kits targetting current platform, + # and use /bin/ for others + # that we we can have same target executable for multiple platforms e.g executable just named 'punkshell' + # - to do this we need to change runtime/mapvfs.config to have platform names not just standalone target executable names + # (todo: change to toml format at same time) after 200 set deployment_folder [file dirname $sourcefolder]/bin file mkdir $deployment_folder 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 e3233d10..6c94a68c 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 @@ -2627,6 +2627,14 @@ foreach runtime [dict keys $runtime_vfs_map] { puts -nonewline stdout $caps exit 0 } + + #temp + #build for current platform only for now + if {![file exists $rtfolder/$runtime]} { + dict set runtime_caps $runtime exitcode -1 error "find-fail" + continue + } + #invoke can fail if runtime not an executable file for the current platform 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) @@ -2679,6 +2687,15 @@ foreach runtimefile $runtimes { # file copy $rtfolder/$runtimefile $buildfolder/buildruntime.exe #} + #---------------------- + #todo + #temp - only build for current platform - need changes to runtime/mapvfs.config etc + if {![file exists $rtfolder/$runtimefile]} { + puts stderr " >> skipping $runtimefile not present in $rtfolder (wrong platform?) x-platform kit build TODO." + continue + } + #---------------------- + if {![file type $rtfolder/$runtimefile] eq "directory"} { #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 @@ -3619,6 +3636,12 @@ foreach vfstail $vfs_tails { $vfs_event destroy $vfs_installer destroy + #TODO - allow building of kits for other platforms + # - we need to use /bin for only kits targetting current platform, + # and use /bin/ for others + # that we we can have same target executable for multiple platforms e.g executable just named 'punkshell' + # - to do this we need to change runtime/mapvfs.config to have platform names not just standalone target executable names + # (todo: change to toml format at same time) after 200 set deployment_folder [file dirname $sourcefolder]/bin file mkdir $deployment_folder 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 e3233d10..6c94a68c 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 @@ -2627,6 +2627,14 @@ foreach runtime [dict keys $runtime_vfs_map] { puts -nonewline stdout $caps exit 0 } + + #temp + #build for current platform only for now + if {![file exists $rtfolder/$runtime]} { + dict set runtime_caps $runtime exitcode -1 error "find-fail" + continue + } + #invoke can fail if runtime not an executable file for the current platform 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) @@ -2679,6 +2687,15 @@ foreach runtimefile $runtimes { # file copy $rtfolder/$runtimefile $buildfolder/buildruntime.exe #} + #---------------------- + #todo + #temp - only build for current platform - need changes to runtime/mapvfs.config etc + if {![file exists $rtfolder/$runtimefile]} { + puts stderr " >> skipping $runtimefile not present in $rtfolder (wrong platform?) x-platform kit build TODO." + continue + } + #---------------------- + if {![file type $rtfolder/$runtimefile] eq "directory"} { #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 @@ -3619,6 +3636,12 @@ foreach vfstail $vfs_tails { $vfs_event destroy $vfs_installer destroy + #TODO - allow building of kits for other platforms + # - we need to use /bin for only kits targetting current platform, + # and use /bin/ for others + # that we we can have same target executable for multiple platforms e.g executable just named 'punkshell' + # - to do this we need to change runtime/mapvfs.config to have platform names not just standalone target executable names + # (todo: change to toml format at same time) after 200 set deployment_folder [file dirname $sourcefolder]/bin file mkdir $deployment_folder