Browse Source

move test for have_sdx til after runtimes examined

master
Julian Noble 1 week ago
parent
commit
66d5a767a7
  1. 102
      src/make.tcl

102
src/make.tcl

@ -2494,56 +2494,7 @@ if {![llength $runtimes]} {
exit 0
}
set have_sdx 1
set sdxpath [auto_execok $binfolder/sdx]
if {$sdxpath eq ""} {
set sdxpath [auto_execok [file dirname [info nameofexecutable]]/sdx]
if {$sdxpath eq ""} {
#last resort - look on path
set sdxpath [auto_execok sdx]
}
if {$sdxpath eq ""} {
#last resorts - a tclkit and sdx.kit file
if {[file exists $binfolder/sdx.kit]} {
set tclkitpath [auto_execok $binfolder/tclkit]
if {$tclkitpath eq ""} {
set tclkitpath [auto_execok tclkit]
}
if {$tclkitpath ne ""} {
set sdxpath [list {*}$tclkitpath $binfolder/sdx.kit]
} else {
#see if the runtime (or any runtime *for current platform*) has tclkit in the name or has_starkit(?) and use that
#todo - review
#picking first found for now - fix
dict for {rtname rtprops} $runtime_caps {
if {[dict exists $rtprops has_starkit] && [dict get $rtprops has_starkit]} {
set testpath $rtfolder/$rtname
if {[file exists $testpath]} {
if {[file type $testpath] eq "directory"} {
set tclkitpath $rtfolder/[punk::lib::runtime_buildcopyname $testpath]
} else {
set tclkitpath $testpath
}
if {$tclkitpath ne "" && [file exists $tclkitpath]} {
break
}
}
}
}
}
}
}
if {$sdxpath eq "" || [catch {exec {*}$sdxpath help} errM]} {
puts stderr "FAILED to find usable sdx command or tclkit executable with sdx.bat"
puts stderr "If tclkit-based runtimes are required - check that sdx executable is in bin folder of project or in same folder as tcl/punk executable or on path"
puts stderr "This is not a problem if tcl8.7/tcl9+ kits using the preferred method 'zipfs' are to be used, or if cookfs based kits are to be used."
puts stderr "err: $errM"
#exit 1
set have_sdx 0
}
}
#previous have_sdx test location
# -- --- --- --- --- --- --- --- --- ---
#load mapvfs.config file (if any) in runtime folder to map runtimes to vfs folders.
#build a dict keyed on runtime executable name.
@ -2788,6 +2739,57 @@ foreach runtimefile $runtimes {
}
# -- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
set have_sdx 1
set sdxpath [auto_execok $binfolder/sdx]
if {$sdxpath eq ""} {
set sdxpath [auto_execok [file dirname [info nameofexecutable]]/sdx]
if {$sdxpath eq ""} {
#last resort - look on path
set sdxpath [auto_execok sdx]
}
if {$sdxpath eq ""} {
#last resorts - a tclkit and sdx.kit file
if {[file exists $binfolder/sdx.kit]} {
set tclkitpath [auto_execok $binfolder/tclkit]
if {$tclkitpath eq ""} {
set tclkitpath [auto_execok tclkit]
}
if {$tclkitpath ne ""} {
set sdxpath [list {*}$tclkitpath $binfolder/sdx.kit]
} else {
#see if the runtime (or any runtime *for current platform*) has tclkit in the name or has_starkit(?) and use that
#todo - review
#picking first found for now - fix
dict for {rtname rtprops} $runtime_caps {
if {[dict exists $rtprops has_starkit] && [dict get $rtprops has_starkit]} {
set testpath $rtfolder/$rtname
if {[file exists $testpath]} {
if {[file type $testpath] eq "directory"} {
set tclkitpath $rtfolder/[punk::lib::runtime_buildcopyname $testpath]
} else {
set tclkitpath $testpath
}
if {$tclkitpath ne "" && [file exists $tclkitpath]} {
break
}
}
}
}
}
}
}
if {$sdxpath eq "" || [catch {exec {*}$sdxpath help} errM]} {
puts stderr "FAILED to find usable sdx command or tclkit executable with sdx.bat"
puts stderr "If tclkit-based runtimes are required - check that sdx executable is in bin folder of project or in same folder as tcl/punk executable or on path"
puts stderr "This is not a problem if tcl8.7/tcl9+ kits using the preferred method 'zipfs' are to be used, or if cookfs based kits are to be used."
puts stderr "err: $errM"
#exit 1
set have_sdx 0
}
}
# -- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
set failed_kits [list]
set installed_kits [list]
set skipped_kits [list]

Loading…
Cancel
Save