emccalib.tcl: find halfiles using hallib proc

that implements rule for HALLIB_PATH=.:$HALLIB_DIR (like linuxcnc.in)

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
This commit is contained in:
Dewey Garrett 2015-07-27 16:44:53 -07:00
parent 16dfaadb47
commit 70c89f55f9

View file

@ -27,6 +27,8 @@ exec $LINUXCNC_EMCSH "$0" "$@"
source [file join [file dirname [info script]] .. linuxcnc.tcl] source [file join [file dirname [info script]] .. linuxcnc.tcl]
eval emc_init $argv eval emc_init $argv
source [file join $::env(HALLIB_DIR) hal_procs_lib.tcl]
package require BWidget package require BWidget
# add a few default characteristics to the display # add a few default characteristics to the display
@ -143,13 +145,14 @@ set startline $sectionarray(HAL)
set endline $sectionarray([lindex $sectionlist [expr [lsearch -exact $sectionlist HAL] + 1 ]]) set endline $sectionarray([lindex $sectionlist [expr [lsearch -exact $sectionlist HAL] + 1 ]])
set halfilelist "" set halfilelist ""
for {set i $startline} {$i < $endline} {incr i} { for {set i $startline} {$i < $endline} {incr i} {
set thisstring [$initext get $i.0 $i.end] set thisstring [$initext get $i.0 $i.end]
if { [lindex $thisstring 0] == "HALFILE" if { [lindex $thisstring 0] == "HALFILE"
|| [lindex $thisstring 0] == "POSTGUI_HALFILE" || [lindex $thisstring 0] == "POSTGUI_HALFILE"
} { } {
set thishalname [lindex $thisstring end] set thishalname [lindex $thisstring end]
lappend halfilelist $thisconfigdir/$thishalname lappend halfilelist [find_file_in_hallib_path $thishalname $thisinifile]
} }
} }