Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1074c2212 |
+1
-1
@@ -231,7 +231,7 @@ set(CMAKE_FIND_USE_PACKAGE_REGISTRY FALSE)
|
||||
# Prepare to manage and build BRL-CAD's external dependencies. Specifies a
|
||||
# specific commit hash to use in the 'bext' repository.
|
||||
include(BRLCAD_ExternalDeps)
|
||||
brlcad_bext_init(12115e6c5922e2db27a9b88e00dd714af5315f69)
|
||||
brlcad_bext_init(ea74d15dd9711eed1a985981059425f87e7396f1)
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# Define various utilities.
|
||||
|
||||
@@ -13,13 +13,13 @@ changes made. See document footer for additional details.
|
||||
--- 20XX-XX-XX Release 7.46.0 ---
|
||||
----------------------------------------------------------------------
|
||||
|
||||
* updated MGED and Archer for Tcl 8.6.18 and Itcl/Itk 4 - Cliff Yapp
|
||||
* updated MGED and Archer for Tcl 8.6.18 - Cliff Yapp
|
||||
* fixed writes to fileless geometry databases - Cliff Yapp
|
||||
* fixed nastran-g handling of large property IDs - Rupesh, Cliff Yapp
|
||||
* fixed dxf-g invalid polyface index crashes - Meghna45-code, Cliff Yapp
|
||||
* fixed Archer primitive editors under Itcl 4 - Cliff Yapp
|
||||
* fixed Archer primitive editors - Cliff Yapp
|
||||
* fixed Archer shutdown menu cleanup errors - Cliff Yapp
|
||||
* fixed MGED Build Pattern dialog under Itcl 4 - Cliff Yapp
|
||||
* fixed MGED Build Pattern dialog - Cliff Yapp
|
||||
* fixed TclCAD framebuffer listing and deletion - Cliff Yapp
|
||||
* fixed MGED Build Pattern progress updates - Cliff Yapp
|
||||
* fixed MGED search -exec reentry and Ctrl-C crashes - Cliff Yapp
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
BRL-CAD Itcl/Itk 4 migration
|
||||
============================
|
||||
|
||||
This records the main branch migration. The itcl3 branch retains the
|
||||
previously bundled Itcl/Itk 3 stack as a rollback option; the version
|
||||
requirements below describe the main branch.
|
||||
|
||||
Decision
|
||||
--------
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ the Qt application starts, its console accepts `draw all.g`, and the OpenGL
|
||||
view changes. qged is not yet stable enough for a menu or widget compatibility
|
||||
manifest.
|
||||
|
||||
The libtclcad Itcl 4 tests complement application fixtures by loading the GUI
|
||||
The libtclcad Itcl 3 tests complement application fixtures by loading the GUI
|
||||
package graph in both `btclsh` and `bwish`, checking representative Sdialogs,
|
||||
Swidgets, DataUtils, and cadwidgets behavior, and repeating package and object
|
||||
initialization in independent, destroyed, and replacement Tcl interpreters.
|
||||
|
||||
@@ -41,7 +41,7 @@ quadratic display-list or scene-object scans.
|
||||
The focused `regress-mged-xmin-gui-controls` fixture drives ViewRing, grid,
|
||||
ADC, font persistence, and About through their live Tk widgets and checks the
|
||||
resulting MGED state, view, named font, or generated preferences file. It also
|
||||
requires Itcl 4.3.0, Itk 4.2.3, and Iwidgets 4.1.1 from the running
|
||||
requires Itcl 3.4, Itk 3.4, and Iwidgets 4.1.1 from the running
|
||||
application. This complements the deeper multi-display-manager fixture with
|
||||
fast coverage for stateful controls that are otherwise easy to inventory
|
||||
without actually validating. The semantic MGED fixtures share the Xmin
|
||||
|
||||
@@ -327,7 +327,7 @@ proc ::mged::xmin::run {} {
|
||||
}
|
||||
|
||||
set versions {}
|
||||
foreach {package minimum} {Itcl 4.3.0 Itk 4.2.3 Iwidgets 4.1.1} {
|
||||
foreach {package minimum} {Itcl 3.4 Itk 3.4 Iwidgets 4.1.1} {
|
||||
set version [package require $package $minimum]
|
||||
lappend versions "$package $version"
|
||||
}
|
||||
|
||||
@@ -33,16 +33,16 @@ if(TARGET libtclcad)
|
||||
add_dependencies(bwish itk_pkgIndex)
|
||||
endif(TARGET itk_pkgIndex)
|
||||
|
||||
set(_itcl4_gui_test "${CMAKE_SOURCE_DIR}/src/libtclcad/tests/itcl4_gui.tcl")
|
||||
set(_itcl_gui_test "${CMAKE_SOURCE_DIR}/src/libtclcad/tests/itcl_gui.tcl")
|
||||
foreach(_shell btclsh bwish)
|
||||
brlcad_add_xmin_test(
|
||||
NAME tclcad_test_itcl4_gui_${_shell}
|
||||
NAME tclcad_test_itcl_gui_${_shell}
|
||||
SCREEN 1280x960x24
|
||||
TIMEOUT 120
|
||||
COMMAND $<TARGET_FILE:${_shell}> "${_itcl4_gui_test}"
|
||||
COMMAND $<TARGET_FILE:${_shell}> "${_itcl_gui_test}"
|
||||
)
|
||||
endforeach()
|
||||
unset(_itcl4_gui_test)
|
||||
unset(_itcl_gui_test)
|
||||
endif(BRLCAD_ENABLE_TK)
|
||||
endif(TARGET libtclcad)
|
||||
|
||||
|
||||
@@ -4,14 +4,15 @@ if(BRLCAD_ENABLE_TCL)
|
||||
endif(BRLCAD_ENABLE_TK)
|
||||
find_package_tcl(REQUIRED)
|
||||
|
||||
set(TCLCAD_PACKAGE_MAJOR_VERSION 3)
|
||||
function(tclcad_package_version result package_name)
|
||||
file(
|
||||
GLOB package_dirs
|
||||
LIST_DIRECTORIES true
|
||||
RELATIVE "${CMAKE_BINARY_DIR}/${LIB_DIR}"
|
||||
"${CMAKE_BINARY_DIR}/${LIB_DIR}/${package_name}4.*"
|
||||
"${CMAKE_BINARY_DIR}/${LIB_DIR}/${package_name}${TCLCAD_PACKAGE_MAJOR_VERSION}.*"
|
||||
)
|
||||
list(FILTER package_dirs INCLUDE REGEX "^${package_name}4\\.[0-9]+(\\.[0-9]+)*$")
|
||||
list(FILTER package_dirs INCLUDE REGEX "^${package_name}${TCLCAD_PACKAGE_MAJOR_VERSION}\\.[0-9]+(\\.[0-9]+)*$")
|
||||
if(package_dirs)
|
||||
list(SORT package_dirs COMPARE NATURAL ORDER DESCENDING)
|
||||
list(GET package_dirs 0 package_dir)
|
||||
|
||||
@@ -38,8 +38,8 @@ __BEGIN_DECLS
|
||||
|
||||
#define TO_UNLIMITED -1
|
||||
|
||||
#define TCLCAD_ITCL_MIN_VERSION "4.3.0"
|
||||
#define TCLCAD_ITK_MIN_VERSION "4.2.3"
|
||||
#define TCLCAD_ITCL_MIN_VERSION "3.4"
|
||||
#define TCLCAD_ITK_MIN_VERSION "3.4"
|
||||
|
||||
typedef int (*to_wrapper_func_ptr)(struct ged *, int, const char *[], ged_func_ptr, const char *, int);
|
||||
#define TO_WRAPPER_FUNC_PTR_NULL (to_wrapper_func_ptr)0
|
||||
|
||||
@@ -29,7 +29,7 @@ cmakefiles(
|
||||
check_tclcad_cmds.cpp
|
||||
check_itcl.cpp
|
||||
check_multi_interp.cpp
|
||||
itcl4_gui.tcl
|
||||
itcl_gui.tcl
|
||||
)
|
||||
|
||||
# Local Variables:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# I T C L 4 _ G U I . T C L
|
||||
# I T C L _ G U I . T C L
|
||||
# BRL-CAD
|
||||
#
|
||||
# Copyright (c) 2026 United States Government as represented by
|
||||
@@ -18,7 +18,7 @@
|
||||
#
|
||||
###
|
||||
#
|
||||
# Exercise the Itcl/Itk/Iwidgets paths that differ between Itcl 3 and 4.
|
||||
# Exercise the Itcl/Itk/Iwidgets paths used by BRL-CAD with Itcl 3.
|
||||
# The test is run by both btclsh and bwish so libtclcad is checked with
|
||||
# Itcl-first and Tk-first initialization orders.
|
||||
#
|
||||
@@ -99,16 +99,16 @@ proc bgerror {message} {
|
||||
}
|
||||
|
||||
set tk_version [require_at_least Tk 8.6]
|
||||
set itcl_version [require_at_least Itcl 4.3.0]
|
||||
set itk_version [require_at_least Itk 4.2.3]
|
||||
set itcl_version [require_at_least Itcl 3.4]
|
||||
set itk_version [require_at_least Itk 3.4]
|
||||
set iwidgets_version [require_at_least Iwidgets 4.1.1]
|
||||
interp alias {} Hierarchy {} ::iwidgets::Hierarchy
|
||||
interp alias {} scrolledlistbox {} ::iwidgets::scrolledlistbox
|
||||
|
||||
wm geometry . 900x700+0+0
|
||||
wm title . "Itcl 4 GUI compatibility baseline"
|
||||
wm title . "Itcl 3 GUI compatibility baseline"
|
||||
|
||||
# These classes contain every common-array reference corrected for Itcl 4.
|
||||
# Exercise common-array variable bindings used by Iwidgets.
|
||||
iwidgets::checkbox .checkbox
|
||||
.checkbox add alpha -text Alpha
|
||||
.checkbox insert 0 beta -text Beta
|
||||
@@ -130,19 +130,18 @@ iwidgets::spinint .spinint -labeltext Integer
|
||||
::iwidgets::Labeledwidget::alignlabels .spinner .spinint
|
||||
|
||||
set match_result {}
|
||||
proc record_match {marker match_point} {
|
||||
set ::match_result [list $marker $match_point]
|
||||
proc record_match {match_point} {
|
||||
set ::match_result $match_point
|
||||
}
|
||||
text .searchtext
|
||||
.searchtext insert end "alpha two words omega"
|
||||
iwidgets::finddialog .finddialog \
|
||||
-textwidget .searchtext \
|
||||
-matchcommand [list record_match {list prefix}]
|
||||
-matchcommand record_match
|
||||
set pattern [.finddialog component pattern]
|
||||
$pattern insert 0 {two words}
|
||||
set match_point [.finddialog find]
|
||||
assert_equal "finddialog command prefix" $match_result \
|
||||
[list {list prefix} $match_point]
|
||||
assert_equal "finddialog callback" $match_result $match_point
|
||||
|
||||
iwidgets::mainwindow .mainwindow
|
||||
iwidgets::canvasprintbox .canvasprintbox
|
||||
@@ -213,7 +212,7 @@ foreach class {::DataUtils ::sdialogs::Stddlgs ::swidgets::Togglearrow} {
|
||||
}
|
||||
}
|
||||
|
||||
rename ::tk_messageBox ::itcl4_tk_messageBox
|
||||
rename ::tk_messageBox ::itcl3_tk_messageBox
|
||||
proc ::tk_messageBox {args} {
|
||||
set ::message_box_arguments $args
|
||||
return xmin-answer
|
||||
@@ -222,7 +221,7 @@ set dialog_status [catch {
|
||||
sdialogs::Stddlgs::questiondlg {Xmin title} {Xmin message} yesno -parent .
|
||||
} dialog_result dialog_options]
|
||||
rename ::tk_messageBox {}
|
||||
rename ::itcl4_tk_messageBox ::tk_messageBox
|
||||
rename ::itcl3_tk_messageBox ::tk_messageBox
|
||||
if {$dialog_status} {
|
||||
return -options $dialog_options $dialog_result
|
||||
}
|
||||
@@ -340,8 +339,8 @@ assert_equal "disabled Togglearrow callback" $::toggle_count 1
|
||||
unset ::toggle_count
|
||||
|
||||
set source_database [file join [bu_dir data] db m35.g]
|
||||
set test_database [file join [pwd] itcl4-cadwidgets-[pid].g]
|
||||
set copied_database [file join [pwd] itcl4-cadwidgets-copy-[pid].g]
|
||||
set test_database [file join [pwd] itcl3-cadwidgets-[pid].g]
|
||||
set copied_database [file join [pwd] itcl3-cadwidgets-copy-[pid].g]
|
||||
file delete -force $test_database $copied_database
|
||||
file copy $source_database $test_database
|
||||
|
||||
@@ -391,7 +390,7 @@ assert_equal "GeometryIO .g save" \
|
||||
$copied_database
|
||||
assert_equal "GeometryIO .g copy size" [file size $copied_database] \
|
||||
[file size $test_database]
|
||||
set unsupported_file [file join [pwd] itcl4-cadwidgets-[pid].unsupported]
|
||||
set unsupported_file [file join [pwd] itcl3-cadwidgets-[pid].unsupported]
|
||||
if {![catch {
|
||||
cadwidgets::geom_save $test_database $unsupported_file .functional_ged
|
||||
} unsupported_message] ||
|
||||
Reference in New Issue
Block a user