gitk: Check that we are running on at least Tcl/Tk 8.4
[gitweb.git] / gitk
diff --git a/gitk b/gitk
index 516e14a8fc25a5688bd6b2f5d8defe0075681f34..06172a434b64c330a260596a8dd187a20577638a 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -7838,6 +7838,13 @@ proc tcl_encoding {enc} {
     return {}
 }
 
+# First check that Tcl/Tk is recent enough
+if {[catch {package require Tk 8.4} err]} {
+    show_error {} . "Sorry, gitk cannot run with this version of Tcl/Tk.\n\
+                    Gitk requires at least Tcl/Tk 8.4."
+    exit 1
+}
+
 # defaults...
 set datemode 0
 set diffopts "-U 5 -p"