|
|
@ -290,37 +290,21 @@ if {[file exists $sourcefolder/vendorlib]} { |
|
|
|
README.md\ |
|
|
|
README.md\ |
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
puts stdout "VENDORLIB: copying from $sourcefolder/vendorlib to $projectroot/lib (if source file changed)" |
|
|
|
set resultdict [punkcheck::install $sourcefolder/vendorlib $projectroot/lib -overwrite installedsourcechanged-targets -unpublish_paths $unpublish] |
|
|
|
set resultdict [punkcheck::install $sourcefolder/vendorlib $projectroot/lib -overwrite installedsourcechanged-targets -unpublish_paths $unpublish] |
|
|
|
set copied [dict get $resultdict files_copied] |
|
|
|
puts stdout [punkcheck::summarize_install_resultdict $resultdict] |
|
|
|
set sources_unchanged [dict get $resultdict sources_unchanged] |
|
|
|
|
|
|
|
puts stdout "--------------------------" |
|
|
|
|
|
|
|
flush stdout |
|
|
|
|
|
|
|
puts stderr "Copied [llength $copied] vendor lib files from src/vendorlib to $projectroot/lib" |
|
|
|
|
|
|
|
foreach f $copied { |
|
|
|
|
|
|
|
puts stdout "COPIED $f" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
puts stdout "[llength $sources_unchanged] unchanged source files" |
|
|
|
|
|
|
|
puts stdout "--------------------------" |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
puts stderr "NOTE: No src/vendorlib folder found." |
|
|
|
puts stderr "VENDORLIB: No src/vendorlib folder found." |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if {[file exists $sourcefolder/vendormodules]} { |
|
|
|
if {[file exists $sourcefolder/vendormodules]} { |
|
|
|
#install .tm *and other files* |
|
|
|
#install .tm *and other files* |
|
|
|
|
|
|
|
puts stdout "VENDORMODULES: copying from $sourcefolder/vendormodules to $target_modules_base (if source file changed)" |
|
|
|
set resultdict [punkcheck::install $sourcefolder/vendormodules $target_modules_base -installer make.tcl -overwrite installedsourcechanged-targets -unpublish_paths {README.md}] |
|
|
|
set resultdict [punkcheck::install $sourcefolder/vendormodules $target_modules_base -installer make.tcl -overwrite installedsourcechanged-targets -unpublish_paths {README.md}] |
|
|
|
set copied [dict get $resultdict files_copied] |
|
|
|
puts stdout [punkcheck::summarize_install_resultdict $resultdict] |
|
|
|
set sources_unchanged [dict get $resultdict sources_unchanged] |
|
|
|
|
|
|
|
puts stdout "--------------------------" |
|
|
|
|
|
|
|
flush stdout |
|
|
|
|
|
|
|
puts stderr "Copied [llength $copied] vendor module files from src/vendormodules to $target_modules_base" |
|
|
|
|
|
|
|
foreach f $copied { |
|
|
|
|
|
|
|
puts stdout "COPIED $f" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
puts stdout "[llength $sources_unchanged] unchanged source files" |
|
|
|
|
|
|
|
puts stdout "--------------------------" |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
puts stderr "NOTE: No src/vendormodules folder found." |
|
|
|
puts stderr "VENDORMODULES: No src/vendormodules folder found." |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
######################################################## |
|
|
|
######################################################## |
|
|
@ -354,6 +338,7 @@ foreach layoutinfo $layout_update_list { |
|
|
|
|
|
|
|
|
|
|
|
foreach filepair $pairs { |
|
|
|
foreach filepair $pairs { |
|
|
|
lassign $filepair srcfile tgtfile |
|
|
|
lassign $filepair srcfile tgtfile |
|
|
|
|
|
|
|
file mkdir [file dirname $tgtfile] |
|
|
|
#---------- |
|
|
|
#---------- |
|
|
|
$tpl_event targetset_init INSTALL $tgtfile |
|
|
|
$tpl_event targetset_init INSTALL $tgtfile |
|
|
|
$tpl_event targetset_addsource $srcfile |
|
|
|
$tpl_event targetset_addsource $srcfile |
|
|
@ -386,8 +371,6 @@ foreach layoutinfo $layout_update_list { |
|
|
|
######################################################## |
|
|
|
######################################################## |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#default source module folder is at projectroot/src/modules |
|
|
|
#default source module folder is at projectroot/src/modules |
|
|
|
#There may be multiple other src module folders at same level (e.g folder not being other special-purpose folder and not matching name vendor* that contains at least one .tm file in its root) |
|
|
|
#There may be multiple other src module folders at same level (e.g folder not being other special-purpose folder and not matching name vendor* that contains at least one .tm file in its root) |
|
|
|
set source_module_folderlist [punk::mix::cli::lib::find_source_module_paths $projectroot] |
|
|
|
set source_module_folderlist [punk::mix::cli::lib::find_source_module_paths $projectroot] |
|
|
@ -403,19 +386,54 @@ foreach src_module_dir $source_module_folderlist { |
|
|
|
|
|
|
|
|
|
|
|
set overwrite "installedsourcechanged-targets" |
|
|
|
set overwrite "installedsourcechanged-targets" |
|
|
|
#set overwrite "ALL-TARGETS" |
|
|
|
#set overwrite "ALL-TARGETS" |
|
|
|
|
|
|
|
puts stdout "MODULEFOLDER non_tm_files $src_module_dir - copying to $target_modules_base (if source file changed)" |
|
|
|
set resultdict [punkcheck::install_non_tm_files $src_module_dir $target_modules_base -installer make.tcl -overwrite $overwrite -unpublish_paths {README.md}] |
|
|
|
set resultdict [punkcheck::install_non_tm_files $src_module_dir $target_modules_base -installer make.tcl -overwrite $overwrite -unpublish_paths {README.md}] |
|
|
|
set copied [dict get $resultdict files_copied] |
|
|
|
puts stdout [punkcheck::summarize_install_resultdict $resultdict] |
|
|
|
set sources_unchanged [dict get $resultdict sources_unchanged] |
|
|
|
|
|
|
|
puts stdout "--------------------------" |
|
|
|
|
|
|
|
flush stdout |
|
|
|
|
|
|
|
puts stderr "Copied [llength $copied] non-tm source files from $src_module_dir to $target_modules_base" |
|
|
|
|
|
|
|
puts stderr "[llength $sources_unchanged] unchanged source files" |
|
|
|
|
|
|
|
flush stderr |
|
|
|
|
|
|
|
puts stdout "--------------------------" |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set installername "make.tcl" |
|
|
|
|
|
|
|
|
|
|
|
# ---------------------------------------- |
|
|
|
# ---------------------------------------- |
|
|
|
|
|
|
|
if {[punk::repo::is_fossil_root $projectroot]} { |
|
|
|
|
|
|
|
set config [dict create\ |
|
|
|
|
|
|
|
-make-step configure_fossil\ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
#---------- |
|
|
|
|
|
|
|
set installer [punkcheck::installtrack new $installername $projectroot/.punkcheck] |
|
|
|
|
|
|
|
$installer set_source_target $projectroot $projectroot |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set event [$installer start_event $config] |
|
|
|
|
|
|
|
$event targetset_init VIRTUAL fossil_settings_mainmenu ;#VIRTUAL - since there is no actual target file |
|
|
|
|
|
|
|
set menufile $projectroot/.fossil-custom/mainmenu |
|
|
|
|
|
|
|
$event targetset_addsource $menufile |
|
|
|
|
|
|
|
#---------- |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if {\ |
|
|
|
|
|
|
|
[llength [dict get [$event targetset_source_changes] changed]]\ |
|
|
|
|
|
|
|
} { |
|
|
|
|
|
|
|
$event targetset_started |
|
|
|
|
|
|
|
# -- --- --- --- --- --- |
|
|
|
|
|
|
|
puts stdout "Configuring fossil setting: mainmenu from: $menufile" |
|
|
|
|
|
|
|
if {[catch { |
|
|
|
|
|
|
|
set fd [open $menufile r] |
|
|
|
|
|
|
|
fconfigure $fd -translation binary |
|
|
|
|
|
|
|
set data [read $fd] |
|
|
|
|
|
|
|
close $fd |
|
|
|
|
|
|
|
exec fossil settings mainmenu $data |
|
|
|
|
|
|
|
} errM]} { |
|
|
|
|
|
|
|
$event targetset_end FAILED -note "fossil update failed: $errM" |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
$event targetset_end OK |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
# -- --- --- --- --- --- |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
puts stderr "." |
|
|
|
|
|
|
|
$event targetset_end SKIPPED |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$event end |
|
|
|
|
|
|
|
$event destroy |
|
|
|
|
|
|
|
$installer destroy |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
set buildfolder [punk::mix::cli::lib::get_build_workdir $sourcefolder] |
|
|
|
set buildfolder [punk::mix::cli::lib::get_build_workdir $sourcefolder] |
|
|
|
if {$buildfolder ne "$sourcefolder/_build"} { |
|
|
|
if {$buildfolder ne "$sourcefolder/_build"} { |
|
|
@ -430,7 +448,8 @@ set rtfolder $sourcefolder/runtime |
|
|
|
set runtimes [glob -nocomplain -dir $rtfolder -types {f x} -tail *] |
|
|
|
set runtimes [glob -nocomplain -dir $rtfolder -types {f x} -tail *] |
|
|
|
if {![llength $runtimes]} { |
|
|
|
if {![llength $runtimes]} { |
|
|
|
puts stderr "No executable runtimes found in $rtfolder - unable to build any .vfs folders into executables." |
|
|
|
puts stderr "No executable runtimes found in $rtfolder - unable to build any .vfs folders into executables." |
|
|
|
exit 2 |
|
|
|
puts stderr "Add runtimes to $sourcefolder/runtime if required" |
|
|
|
|
|
|
|
exit 0 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if {[catch {exec sdx help} errM]} { |
|
|
|
if {[catch {exec sdx help} errM]} { |
|
|
@ -465,13 +484,15 @@ if {[file exists $mapfile]} { |
|
|
|
#drop windows .exe suffix so same config can work cross platform - extension will be re-added if necessary later |
|
|
|
#drop windows .exe suffix so same config can work cross platform - extension will be re-added if necessary later |
|
|
|
set runtime [string range $runtime 0 end-4] |
|
|
|
set runtime [string range $runtime 0 end-4] |
|
|
|
} |
|
|
|
} |
|
|
|
set runtime_test $runtime |
|
|
|
if {$runtime ne "-"} { |
|
|
|
if {"windows" eq $::tcl_platform(platform)} { |
|
|
|
set runtime_test $runtime |
|
|
|
set runtime_test $runtime.exe |
|
|
|
if {"windows" eq $::tcl_platform(platform)} { |
|
|
|
} |
|
|
|
set runtime_test $runtime.exe |
|
|
|
if {![file exists [file join $rtfolder $runtime_test]]} { |
|
|
|
} |
|
|
|
puts stderr "WARNING: Missing runtime file $rtfolder/$runtime_test (line in mapvfs.config: $ln)" |
|
|
|
if {![file exists [file join $rtfolder $runtime_test]]} { |
|
|
|
lappend missing $runtime |
|
|
|
puts stderr "WARNING: Missing runtime file $rtfolder/$runtime_test (line in mapvfs.config: $ln)" |
|
|
|
|
|
|
|
lappend missing $runtime |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
foreach vfs $vfspaths { |
|
|
|
foreach vfs $vfspaths { |
|
|
|
if {![file isdirectory [file join $sourcefolder $vfs]]} { |
|
|
|
if {![file isdirectory [file join $sourcefolder $vfs]]} { |
|
|
@ -511,7 +532,6 @@ if {![llength $vfs_folders]} { |
|
|
|
|
|
|
|
|
|
|
|
set vfs_folder_changes [dict create] ;#cache whether each .vfs folder has changes so we don't re-run tests if building from same .vfs with multiple runtime executables |
|
|
|
set vfs_folder_changes [dict create] ;#cache whether each .vfs folder has changes so we don't re-run tests if building from same .vfs with multiple runtime executables |
|
|
|
|
|
|
|
|
|
|
|
set installername "make.tcl" |
|
|
|
|
|
|
|
# -- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- |
|
|
|
# -- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- |
|
|
|
#set runtimefile [lindex $runtimes 0] |
|
|
|
#set runtimefile [lindex $runtimes 0] |
|
|
|
foreach runtimefile $runtimes { |
|
|
|
foreach runtimefile $runtimes { |
|
|
@ -593,7 +613,7 @@ foreach vfs $vfs_folders { |
|
|
|
set runtimes_raw $runtimes |
|
|
|
set runtimes_raw $runtimes |
|
|
|
set runtimes [list] |
|
|
|
set runtimes [list] |
|
|
|
foreach rt $runtimes_raw { |
|
|
|
foreach rt $runtimes_raw { |
|
|
|
if {![string match *.exe $rt]} { |
|
|
|
if {![string match *.exe $rt] && $rt ne "-"} { |
|
|
|
set rt $rt.exe |
|
|
|
set rt $rt.exe |
|
|
|
} |
|
|
|
} |
|
|
|
lappend runtimes $rt |
|
|
|
lappend runtimes $rt |
|
|
@ -615,27 +635,36 @@ foreach vfs $vfs_folders { |
|
|
|
#assert $runtimes is a list of executable names suffixed with .exe if on windows - whether or not specified with .exe in the mapvfs.config |
|
|
|
#assert $runtimes is a list of executable names suffixed with .exe if on windows - whether or not specified with .exe in the mapvfs.config |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#todo - non kit based - zipkit? |
|
|
|
|
|
|
|
# $runtimes may now include a dash entry "-" (from mapvfs.config file) |
|
|
|
foreach rtname $runtimes { |
|
|
|
foreach rtname $runtimes { |
|
|
|
|
|
|
|
#rtname of "-" indicates build a kit without a runtime |
|
|
|
|
|
|
|
|
|
|
|
#first configured runtime will be the one to use the same name as .vfs folder for output executable. Additional runtimes on this .vfs will need to suffix the runtime name to disambiguate. |
|
|
|
#first configured runtime will be the one to use the same name as .vfs folder for output executable. Additional runtimes on this .vfs will need to suffix the runtime name to disambiguate. |
|
|
|
#review: This mechanism may not be great for multiplatform builds ? We may be better off consistently combining vfsname and rtname and letting a later platform-specific step choose ones to install in bin with simpler names. |
|
|
|
#review: This mechanism may not be great for multiplatform builds ? We may be better off consistently combining vfsname and rtname and letting a later platform-specific step choose ones to install in bin with simpler names. |
|
|
|
if {$::tcl_platform(platform) eq "windows"} { |
|
|
|
if {$rtname eq "-"} { |
|
|
|
set targetexe ${vfsname}.exe |
|
|
|
set targetkit $vfsname.kit |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
set targetexe $vfsname |
|
|
|
if {$::tcl_platform(platform) eq "windows"} { |
|
|
|
} |
|
|
|
set targetkit ${vfsname}.exe |
|
|
|
if {$targetexe in $exe_names_seen} { |
|
|
|
} else { |
|
|
|
#more than one runtime for this .vfs |
|
|
|
set targetkit $vfsname |
|
|
|
set targetexe ${vfsname}_$rtname |
|
|
|
} |
|
|
|
|
|
|
|
if {$targetkit in $exe_names_seen} { |
|
|
|
|
|
|
|
#more than one runtime for this .vfs |
|
|
|
|
|
|
|
set targetkit ${vfsname}_$rtname |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
lappend exe_names_seen $targetexe |
|
|
|
lappend exe_names_seen $targetkit |
|
|
|
# -- ---------- |
|
|
|
# -- ---------- |
|
|
|
set vfs_installer [punkcheck::installtrack new $installername $basedir/.punkcheck] |
|
|
|
set vfs_installer [punkcheck::installtrack new $installername $basedir/.punkcheck] |
|
|
|
$vfs_installer set_source_target $sourcefolder $buildfolder |
|
|
|
$vfs_installer set_source_target $sourcefolder $buildfolder |
|
|
|
set vfs_event [$vfs_installer start_event {-make-step build_vfs}] |
|
|
|
set vfs_event [$vfs_installer start_event {-make-step build_vfs}] |
|
|
|
$vfs_event targetset_init INSTALL $buildfolder/$targetexe |
|
|
|
$vfs_event targetset_init INSTALL $buildfolder/$targetkit |
|
|
|
$vfs_event targetset_addsource $sourcefolder/$vfs |
|
|
|
$vfs_event targetset_addsource $sourcefolder/$vfs |
|
|
|
$vfs_event targetset_addsource $buildfolder/build_$rtname |
|
|
|
if {$rtname ne "-"} { |
|
|
|
|
|
|
|
$vfs_event targetset_addsource $buildfolder/build_$rtname |
|
|
|
|
|
|
|
} |
|
|
|
# -- ---------- |
|
|
|
# -- ---------- |
|
|
|
|
|
|
|
|
|
|
|
set changed_unchanged [$vfs_event targetset_source_changes] |
|
|
|
set changed_unchanged [$vfs_event targetset_source_changes] |
|
|
@ -655,9 +684,17 @@ foreach vfs $vfs_folders { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if {[catch { |
|
|
|
if {[catch { |
|
|
|
exec sdx wrap $buildfolder/$vfsname.new -vfs $sourcefolder/$vfs -runtime $buildfolder/build_$rtname -verbose |
|
|
|
if {$rtname ne "-"} { |
|
|
|
|
|
|
|
exec sdx wrap $buildfolder/$vfsname.new -vfs $sourcefolder/$vfs -runtime $buildfolder/build_$rtname -verbose |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
exec sdx wrap $buildfolder/$vfsname.new -vfs $sourcefolder/$vfs -verbose |
|
|
|
|
|
|
|
} |
|
|
|
} result]} { |
|
|
|
} result]} { |
|
|
|
puts stderr "sdx wrap $buildfolder/$vfsname.new -vfs $sourcefolder/$vfs -runtime $buildfolder/build_$rtname -verbose failed with msg: $result" |
|
|
|
if {$rtname ne "-"} { |
|
|
|
|
|
|
|
puts stderr "sdx wrap $buildfolder/$vfsname.new -vfs $sourcefolder/$vfs -runtime $buildfolder/build_$rtname -verbose failed with msg: $result" |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
puts stderr "sdx wrap $buildfolder/$vfsname.new -vfs $sourcefolder/$vfs -verbose failed with msg: $result" |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
puts stdout "ok - finished sdx" |
|
|
|
puts stdout "ok - finished sdx" |
|
|
|
set separator [string repeat = 40] |
|
|
|
set separator [string repeat = 40] |
|
|
@ -678,65 +715,68 @@ foreach vfs $vfs_folders { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
set pscmd "ps" |
|
|
|
set pscmd "ps" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if {![catch { |
|
|
|
#killing process doesn't apply to .kit build |
|
|
|
exec $pscmd | grep $vfsname |
|
|
|
if {$rtname ne "-"} { |
|
|
|
} still_running]} { |
|
|
|
if {![catch { |
|
|
|
|
|
|
|
exec $pscmd | grep $vfsname |
|
|
|
puts stdout "found $vfsname instances still running\n" |
|
|
|
} still_running]} { |
|
|
|
set count_killed 0 |
|
|
|
|
|
|
|
foreach ln [split $still_running \n] { |
|
|
|
puts stdout "found $vfsname instances still running\n" |
|
|
|
puts stdout " $ln" |
|
|
|
set count_killed 0 |
|
|
|
|
|
|
|
foreach ln [split $still_running \n] { |
|
|
|
if {$::tcl_platform(platform) eq "windows"} { |
|
|
|
puts stdout " $ln" |
|
|
|
set pid [lindex $ln 1] |
|
|
|
|
|
|
|
if {$forcekill} { |
|
|
|
if {$::tcl_platform(platform) eq "windows"} { |
|
|
|
set killcmd [list taskkill /F /PID $pid] |
|
|
|
set pid [lindex $ln 1] |
|
|
|
|
|
|
|
if {$forcekill} { |
|
|
|
|
|
|
|
set killcmd [list taskkill /F /PID $pid] |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
set killcmd [list taskkill /PID $pid] |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
set killcmd [list taskkill /PID $pid] |
|
|
|
set pid [lindex $ln 0] |
|
|
|
|
|
|
|
#review! |
|
|
|
|
|
|
|
if {$forcekill} { |
|
|
|
|
|
|
|
set killcmd [list kill -9 $pid] |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
set killcmd [list kill $pid] |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
puts stdout " pid: $pid (attempting to kill now using '$killcmd')" |
|
|
|
set pid [lindex $ln 0] |
|
|
|
if {[catch { |
|
|
|
#review! |
|
|
|
exec {*}$killcmd |
|
|
|
if {$forcekill} { |
|
|
|
} errMsg]} { |
|
|
|
set killcmd [list kill -9 $pid] |
|
|
|
puts stderr "$killcmd returned an error:" |
|
|
|
|
|
|
|
puts stderr $errMsg |
|
|
|
|
|
|
|
puts stderr "(try '[info script] -k' option to force kill)" |
|
|
|
|
|
|
|
exit 4 |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
set killcmd [list kill $pid] |
|
|
|
puts stderr "$killcmd ran without error" |
|
|
|
|
|
|
|
incr count_killed |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
puts stdout " pid: $pid (attempting to kill now using '$killcmd')" |
|
|
|
if {$count_killed > 0} { |
|
|
|
if {[catch { |
|
|
|
puts stderr "\nKilled $count_killed processes. Waiting a short time before attempting to delete executable" |
|
|
|
exec {*}$killcmd |
|
|
|
after 1000 |
|
|
|
} errMsg]} { |
|
|
|
|
|
|
|
puts stderr "$killcmd returned an error:" |
|
|
|
|
|
|
|
puts stderr $errMsg |
|
|
|
|
|
|
|
puts stderr "(try '[info script] -k' option to force kill)" |
|
|
|
|
|
|
|
exit 4 |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
puts stderr "$killcmd ran without error" |
|
|
|
|
|
|
|
incr count_killed |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
puts stderr "Ok.. no running '$vfsname' processes found" |
|
|
|
} |
|
|
|
} |
|
|
|
if {$count_killed > 0} { |
|
|
|
|
|
|
|
puts stderr "\nKilled $count_killed processes. Waiting a short time before attempting to delete executable" |
|
|
|
|
|
|
|
after 1000 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
puts stderr "Ok.. no running '$vfsname' processes found" |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if {[file exists $buildfolder/$targetexe]} { |
|
|
|
if {[file exists $buildfolder/$targetkit]} { |
|
|
|
puts stderr "deleting existing $buildfolder/$targetexe" |
|
|
|
puts stderr "deleting existing $buildfolder/$targetkit" |
|
|
|
if {[catch { |
|
|
|
if {[catch { |
|
|
|
file delete $buildfolder/$targetexe |
|
|
|
file delete $buildfolder/$targetkit |
|
|
|
} msg]} { |
|
|
|
} msg]} { |
|
|
|
puts stderr "Failed to delete $buildfolder/$targetexe" |
|
|
|
puts stderr "Failed to delete $buildfolder/$targetkit" |
|
|
|
exit 4 |
|
|
|
exit 4 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
#WINDOWS filesystem 'tunneling' (file replacement within 15secs) could cause targetexe to copy ctime & shortname metadata from previous file! |
|
|
|
#WINDOWS filesystem 'tunneling' (file replacement within 15secs) could cause targetkit to copy ctime & shortname metadata from previous file! |
|
|
|
#This is probably harmless - but worth being aware of. |
|
|
|
#This is probably harmless - but worth being aware of. |
|
|
|
file rename $buildfolder/$vfsname.new $buildfolder/$targetexe |
|
|
|
file rename $buildfolder/$vfsname.new $buildfolder/$targetkit |
|
|
|
# -- --- --- --- --- --- |
|
|
|
# -- --- --- --- --- --- |
|
|
|
$vfs_event targetset_end OK |
|
|
|
$vfs_event targetset_end OK |
|
|
|
|
|
|
|
|
|
|
@ -748,36 +788,36 @@ foreach vfs $vfs_folders { |
|
|
|
# -- ---------- |
|
|
|
# -- ---------- |
|
|
|
set bin_installer [punkcheck::installtrack new "make.tcl" $deployment_folder/.punkcheck] |
|
|
|
set bin_installer [punkcheck::installtrack new "make.tcl" $deployment_folder/.punkcheck] |
|
|
|
$bin_installer set_source_target $buildfolder $deployment_folder |
|
|
|
$bin_installer set_source_target $buildfolder $deployment_folder |
|
|
|
set bin_event [$bin_installer start_event {-make-step final_exe_install}] |
|
|
|
set bin_event [$bin_installer start_event {-make-step final_kit_install}] |
|
|
|
$bin_event targetset_init INSTALL $deployment_folder/$targetexe |
|
|
|
$bin_event targetset_init INSTALL $deployment_folder/$targetkit |
|
|
|
$bin_event targetset_addsource $buildfolder/$targetexe |
|
|
|
$bin_event targetset_addsource $buildfolder/$targetkit |
|
|
|
$bin_event targetset_started |
|
|
|
$bin_event targetset_started |
|
|
|
# -- ---------- |
|
|
|
# -- ---------- |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set delete_failed 0 |
|
|
|
set delete_failed 0 |
|
|
|
if {[file exists $deployment_folder/$targetexe]} { |
|
|
|
if {[file exists $deployment_folder/$targetkit]} { |
|
|
|
puts stderr "deleting existing deployed at $deployment_folder/$targetexe" |
|
|
|
puts stderr "deleting existing deployed at $deployment_folder/$targetkit" |
|
|
|
if {[catch { |
|
|
|
if {[catch { |
|
|
|
file delete $deployment_folder/$targetexe |
|
|
|
file delete $deployment_folder/$targetkit |
|
|
|
} errMsg]} { |
|
|
|
} errMsg]} { |
|
|
|
puts stderr "deletion of deployed version at $deployment_folder/$targetexe failed: $errMsg" |
|
|
|
puts stderr "deletion of deployed version at $deployment_folder/$targetkit failed: $errMsg" |
|
|
|
#exit 5 |
|
|
|
#exit 5 |
|
|
|
set delete_failed 1 |
|
|
|
set delete_failed 1 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if {!$delete_failed} { |
|
|
|
if {!$delete_failed} { |
|
|
|
puts stdout "copying.." |
|
|
|
puts stdout "copying.." |
|
|
|
puts stdout "$buildfolder/$targetexe" |
|
|
|
puts stdout "$buildfolder/$targetkit" |
|
|
|
puts stdout "to:" |
|
|
|
puts stdout "to:" |
|
|
|
puts stdout "$deployment_folder/$targetexe" |
|
|
|
puts stdout "$deployment_folder/$targetkit" |
|
|
|
after 300 |
|
|
|
after 300 |
|
|
|
file copy $buildfolder/$targetexe $deployment_folder/$targetexe |
|
|
|
file copy $buildfolder/$targetkit $deployment_folder/$targetkit |
|
|
|
# -- ---------- |
|
|
|
# -- ---------- |
|
|
|
$bin_event targetset_end OK |
|
|
|
$bin_event targetset_end OK |
|
|
|
# -- ---------- |
|
|
|
# -- ---------- |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$bin_event targetset_end FAILED -note "could not delete |
|
|
|
$bin_event targetset_end FAILED -note "could not delete" |
|
|
|
} |
|
|
|
} |
|
|
|
$bin_event destroy |
|
|
|
$bin_event destroy |
|
|
|
$bin_installer destroy |
|
|
|
$bin_installer destroy |
|
|
@ -785,7 +825,7 @@ foreach vfs $vfs_folders { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
set skipped_vfs_build 1 |
|
|
|
set skipped_vfs_build 1 |
|
|
|
puts stderr "." |
|
|
|
puts stderr "." |
|
|
|
puts stdout "Skipping build for vfs $vfs - no change detected" |
|
|
|
puts stdout "Skipping build for vfs $vfs with runtime $rtname - no change detected" |
|
|
|
$vfs_event targetset_end SKIPPED |
|
|
|
$vfs_event targetset_end SKIPPED |
|
|
|
} |
|
|
|
} |
|
|
|
$vfs_event destroy |
|
|
|
$vfs_event destroy |
|
|
|