Browse Source

update src/make.tcl to new bin/runtime/<os-arch> locations

master
Julian Noble 4 days ago
parent
commit
3b41459306
  1. 21
      src/make.tcl

21
src/make.tcl

@ -2296,8 +2296,23 @@ if {$::punkboot::command eq "bin"} {
}
#find runtimes
set rtfolder $sourcefolder/runtime
#set rtfolder $sourcefolder/runtime
#AAA
switch -glob -- $this_platform_generic {
macosx-* {
#assuming universal binaries x86_64 and arm
set rt_os_arch macosx
}
default {
set rt_os_arch $this_platform_generic
}
}
set rtfolder $binfolder/runtime/$rt_os_arch
set rt_sourcefolder $sourcefolder/runtime ;#where our config lives
#review - when building kits for other platforms - it's unlikely runtime will be marked as executable - we should probably process all files in runtime folder except those with certain extensions
set rtfolder_files [glob -nocomplain -dir $rtfolder -types {f} -tail *]
set exclusions {.config .md .ico .txt .doc .pdf .htm .html} ;#we don't encourage other files in runtime folder aside from mapvfs.config - but lets ignore some common possibilities
lappend exclusions .zip .7z .pea .bz2 .tar .gz .tgz .z .xz ;#don't allow archives to directly be treated as runtimes - tolerate presence but require user to unpack or rename if they're to be used as runtimes
@ -2311,7 +2326,7 @@ foreach f $rtfolder_files {
}
if {![llength $runtimes]} {
puts stderr "No executable runtimes found in $rtfolder - unable to build any .vfs folders into executables."
puts stderr "Add runtimes to $sourcefolder/runtime if required"
puts stderr "Add runtimes to $rtfolder if required"
#todo - don't exit - it is valid to use runtime of - to just build a .kit/.zipkit ?
exit 0
}
@ -2350,7 +2365,7 @@ if {$sdxpath eq ""} {
#build a dict keyed on runtime executable name.
#If no mapfile (or no mapfile entry for that runtime) - the runtime will be paired with a matching .vfs folder in src folder. e.g punk.exe to src/punk.vfs
#If vfs folders or runtime executables which are explicitly listed in the mapfile don't exist - warn on stderr - but continue. if such nonexistants found; prompt user for whether to continue or abort.
set mapfile $rtfolder/mapvfs.config
set mapfile $rt_sourcefolder/mapvfs.config
set runtime_vfs_map [dict create]
set vfs_runtime_map [dict create]
if {[file exists $mapfile]} {

Loading…
Cancel
Save