|
|
|
@ -283,7 +283,7 @@ namespace eval ::punkboot::lib {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if {"::try" ni [info commands ::try]} { |
|
|
|
|
puts stderr "Tcl interpreter possibly too old - 'try' command not found - aborting" |
|
|
|
|
puts stderr "Tcl interpreter possibly too old - need at least tcl 8.6 - 'try' command not found - aborting" |
|
|
|
|
exit 1 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -296,8 +296,7 @@ if {"::try" ni [info commands ::try]} {
|
|
|
|
|
# and load these in preference to ones that may have been in the interp's tcl::tm::list or auto_path due to environment variables |
|
|
|
|
set startdir [pwd] |
|
|
|
|
|
|
|
|
|
set scriptdir [file dirname [file normalize [info script]]] |
|
|
|
|
#puts "SCRIPTDIR: $scriptdir" |
|
|
|
|
#puts "SCRIPTFOLDER: $::punkboot::scriptfolder" |
|
|
|
|
|
|
|
|
|
#we are focussed on pure-tcl libs/modules in bootsupport for now. |
|
|
|
|
#There may be cases where we want to use compiled packages from src/bootsupport/modules_tcl9 etc |
|
|
|
@ -313,8 +312,8 @@ set bootsupport_library_paths [list]
|
|
|
|
|
set this_platform_generic [punkboot::lib::platform_generic] |
|
|
|
|
#we always create these lists in order of desired precedence. |
|
|
|
|
# - this is the same order when adding to auto_path - but will need to be reversed when using tcl:tm::add |
|
|
|
|
if {[file exists [file join $scriptdir bootsupport]]} { |
|
|
|
|
set bootsupportdir [file join $scriptdir bootsupport] |
|
|
|
|
if {[file exists [file join $::punkboot::scriptfolder bootsupport]]} { |
|
|
|
|
set bootsupportdir [file join $::punkboot::scriptfolder bootsupport] |
|
|
|
|
puts stderr "Using bootsupport dir $bootsupportdir" |
|
|
|
|
|
|
|
|
|
lappend bootsupport_module_paths [file join $bootsupportdir modules_tcl$::tclmajorv] ;#more version-specific modules slightly higher in precedence order |
|
|
|
@ -323,7 +322,7 @@ if {[file exists [file join $scriptdir bootsupport]]} {
|
|
|
|
|
lappend bootsupport_library_paths [file join $bootsupportdir lib_tcl$::tclmajorv/$this_platform_generic] ;#more version-specific pkgs slightly higher in precedence order |
|
|
|
|
lappend bootsupport_library_paths [file join $bootsupportdir lib] |
|
|
|
|
} else { |
|
|
|
|
puts stderr "No bootsupport dir for script [info script] at [file join $scriptdir bootsupport]" |
|
|
|
|
puts stderr "No bootsupport dir for script [info script] at [file join $::punkboot::scriptfolder bootsupport]" |
|
|
|
|
#lappend bootsupport_module_paths [file join $startdir bootsupport modules_tcl$::tclmajorv] |
|
|
|
|
#lappend bootsupport_module_paths [file join $startdir bootsupport modules] |
|
|
|
|
#lappend bootsupport_library_paths [file join $startdir bootsupport lib_tcl$::tclmajorv/allplatforms] |
|
|
|
@ -1306,38 +1305,70 @@ proc ::punkboot::punkboot_gethelp {args} {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#todo? process and remove first arg dev os internal (and combinations such as dev-os etc) |
|
|
|
|
############################################################################################################## |
|
|
|
|
############################################################################################################## |
|
|
|
|
############################################################################################################## |
|
|
|
|
set scriptargs $::argv |
|
|
|
|
namespace eval ::punkboot::app { |
|
|
|
|
namespace ensemble create |
|
|
|
|
proc help {args} { |
|
|
|
|
puts "test help" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
namespace eval ::punkboot::app::argdoc { |
|
|
|
|
proc punkboot_subcommands {} { |
|
|
|
|
dict set groups "package" {packages modules libs} |
|
|
|
|
dict set groups "informational" {check info help} |
|
|
|
|
return [punk::args::ensemble_subcommands_definition -groupdict $groups -columns 4 ::punkboot::app] |
|
|
|
|
} |
|
|
|
|
#punk::args::define { |
|
|
|
|
# @id -id punkboot::app |
|
|
|
|
# @cmd -name punkboot::app\ |
|
|
|
|
# -summary\ |
|
|
|
|
# "Project builder"\ |
|
|
|
|
# -help\ |
|
|
|
|
# "" |
|
|
|
|
# @form -form help |
|
|
|
|
# @leaders |
|
|
|
|
# subcommand -type "literal(help)" |
|
|
|
|
# @opts |
|
|
|
|
# @values |
|
|
|
|
# what -type string -choices {modules libs shell} |
|
|
|
|
|
|
|
|
|
# @form -form modules |
|
|
|
|
# subcommand -type "literal(modules)" |
|
|
|
|
|
|
|
|
|
# @form -form libs |
|
|
|
|
# subcommand -type "literal(libs)" |
|
|
|
|
|
|
|
|
|
# @form -form shell |
|
|
|
|
# subcommand -type "literal(shell)" |
|
|
|
|
# arg -type any -optional 1 -multiple 1 |
|
|
|
|
#} |
|
|
|
|
punk::args::define { |
|
|
|
|
@dynamic |
|
|
|
|
@id -id ::punkboot::app |
|
|
|
|
@cmd -name ::punkboot::app\ |
|
|
|
|
-summary\ |
|
|
|
|
"Project builder"\ |
|
|
|
|
-help\ |
|
|
|
|
"" |
|
|
|
|
@leaders |
|
|
|
|
${[punkboot::app::argdoc::punkboot_subcommands]} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
namespace eval ::punkboot::app { |
|
|
|
|
proc test {args} { |
|
|
|
|
puts "test" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
set scriptargs $::argv |
|
|
|
|
punk::args::define { |
|
|
|
|
@id -id punkmake |
|
|
|
|
@cmd -name punkmake\ |
|
|
|
|
-summary\ |
|
|
|
|
"Project builder"\ |
|
|
|
|
-help\ |
|
|
|
|
"" |
|
|
|
|
@form -form help |
|
|
|
|
@leaders |
|
|
|
|
subcommand -type "literal(help)" |
|
|
|
|
@opts |
|
|
|
|
@values |
|
|
|
|
what -type string -choices {modules libs shell} |
|
|
|
|
|
|
|
|
|
@form -form modules |
|
|
|
|
subcommand -type "literal(modules)" |
|
|
|
|
|
|
|
|
|
@form -form libs |
|
|
|
|
subcommand -type "literal(libs)" |
|
|
|
|
|
|
|
|
|
@form -form shell |
|
|
|
|
subcommand -type "literal(shell)" |
|
|
|
|
arg -type any -optional 1 -multiple 1 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#set argd [punk::args::parse $scriptargs -form 0 withid punkmake] |
|
|
|
|
#set argd [punk::args::parse $scriptargs -form 0 withid ::punkboot::app] |
|
|
|
|
###lassign [dict values $argd] leaders opts values received |
|
|
|
|
# |
|
|
|
|
#puts stdout [punk::args::usage -scheme nocolour punkmake] |
|
|
|
|
#puts stdout [punk::args::usage -scheme nocolour ::punkboot::app] |
|
|
|
|
#exit 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1650,6 +1681,8 @@ if {$::punkboot::command eq "shell"} {
|
|
|
|
|
#todo - make procs vars etc from this file available? |
|
|
|
|
puts stderr "punk boot shell not implemented - dropping into ordinary punk shell." |
|
|
|
|
|
|
|
|
|
set ::argv [lrange $::argv 1 end] |
|
|
|
|
incr ::argc -1 |
|
|
|
|
|
|
|
|
|
repl::init |
|
|
|
|
set replresult [repl::start stdin -title make.tcl] |
|
|
|
@ -1840,9 +1873,11 @@ if {$::punkboot::command eq "bootsupport"} {
|
|
|
|
|
} |
|
|
|
|
set bootsupport_config $projectroot/src/bootsupport/modules$which/include_modules.config ;# |
|
|
|
|
set bootsupport_modules [list] ;#variable populated by include_modules.config file - initialise empty for each bm folder |
|
|
|
|
set bootsupport_folders [list] |
|
|
|
|
if {[file exists $bootsupport_config]} { |
|
|
|
|
set targetroot $projectroot/src/bootsupport/modules$which |
|
|
|
|
source $bootsupport_config ;#populate $bootsupport_modules with project-specific list |
|
|
|
|
|
|
|
|
|
if {![llength $bootsupport_modules]} { |
|
|
|
|
puts stderr "bootsupport/modules$which - No local bootsupport modules configured for updating" |
|
|
|
|
} else { |
|
|
|
@ -1932,6 +1967,11 @@ if {$::punkboot::command eq "bootsupport"} {
|
|
|
|
|
$boot_installer destroy |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if {![llength $bootsupport_folders]} { |
|
|
|
|
puts stderr "bootsupport/modules$which - No local bootsupport folders configured for updating" |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1939,7 +1979,7 @@ if {$::punkboot::command eq "bootsupport"} {
|
|
|
|
|
|
|
|
|
|
bootsupport_localupdate $projectroot |
|
|
|
|
|
|
|
|
|
#if this project has custom project layouts, and there is a bootsupport folder - update their bootsupport |
|
|
|
|
#if this project has custom project layouts, and there is a bootsupport folder - update their bootsupport |
|
|
|
|
|
|
|
|
|
set layout_bases [list\ |
|
|
|
|
$sourcefolder/project_layouts/custom/_project\ |
|
|
|
|