diff --git a/src/make.tcl b/src/make.tcl index dbf6d7f9..c469fc4f 100644 --- a/src/make.tcl +++ b/src/make.tcl @@ -60,6 +60,11 @@ if {[llength $runtimes] > 1} { } set runtimefile [lindex $runtimes 0] +#sdx *may* be pointed to use the runtime we use to build the kit, or the user may manually use this runtime if they don't have tclsh +#sdx will complain if the same runtime is used for the shell as is used in the -runtime argument - so we make a copy (REVIEW) +if {![file exists $sourcefolder/_build/buildruntime.exe]} { + file copy $rtfolder/$runtimefile $sourcefolder/_build/buildruntime.exe +} puts stdout "Found [llength $vfs_folders] .vfs folders - building executable for each..." foreach vfs $vfs_folders { @@ -72,12 +77,12 @@ foreach vfs $vfs_folders { file delete $sourcefolder/_build/$vfsname } - puts stdout "building $vfsname with sdx.." + puts stdout "building $vfsname with sdx.. vfsdir:$vfs cwd: [pwd]" if {[catch { - exec sdx wrap _build/$vfsname -runtime runtime/$runtimefile -verbose + exec sdx wrap [pwd]/_build/$vfsname -vfs [pwd]/$vfs -runtime $sourcefolder/_build/buildruntime.exe -verbose } result]} { - puts stderr "sdx wrap _build/$vfsname -runtime runtime/$runtimefile -verbose failed with msg: $result" + puts stderr "sdx wrap _build/$vfsname -vfs [pwd]/$vfs -runtime $sourcefolder/_build/buildruntime.exe -verbose failed with msg: $result" } else { puts stdout "ok - finished sdx" set separator [string repeat = 40]