From 8a8efbe4140fd732e1890cbba6eaa85c0fac85e2 Mon Sep 17 00:00:00 2001 From: Pratyush Yadav Date: Mon, 17 Feb 2020 21:09:29 +0530 Subject: git-gui: reduce Tcl version requirement from 8.6 to 8.5 On some MacOS distributions like High Sierra, Tcl 8.5 is shipped by default. This makes git-gui error out at startup because of the version mismatch. The only part that requires Tcl 8.6 is SimpleChord, which depends on TclOO. So, don't use it and use our homegrown class.tcl instead. This means some slight syntax changes. Since class.tcl doesn't have an "unknown" method like TclOO does, we can't just call '$note', but have to use '$note activate' instead. The constructor now needs a proper namespace qualifier. Update the documentation to reflect the new syntax. As of now, the only part of git-gui that needs Tcl 8.5 is a call to 'apply' in lib/index.tcl::lambda. Keep using it until someone shows up shouting that their OS ships with 8.4 only. Then we would have to look into implementing it in pure Tcl. Signed-off-by: Pratyush Yadav --- git-gui.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git-gui.sh') diff --git a/git-gui.sh b/git-gui.sh index f41ed2eb20..027e093f9f 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -30,8 +30,8 @@ along with this program; if not, see .}] ## ## Tcl/Tk sanity check -if {[catch {package require Tcl 8.6} err] - || [catch {package require Tk 8.6} err] +if {[catch {package require Tcl 8.5} err] + || [catch {package require Tk 8.5} err] } { catch {wm withdraw .} tk_messageBox \ -- cgit v1.3