Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-06-03 00:11:26 +0400
committerShawn O. Pearce <spearce@spearce.org>2007-06-03 04:00:55 +0400
commitcfb07cca7d9a517fae1bdc741c41c06d150a852f (patch)
treed89e549f5011cee5b29a801314155f91ff4a6cf2
parent6309172ea56294d08674cf35df92d6a3fa695480 (diff)
git-gui: Verify Tcl/Tk is new enough for our needs
For quite a while we have been assuming the user is running on a Tcl/Tk 8.4 or later platform. This may not be the case on some very old systems. Unfortunately I am pretty far down the path of using the Tcl/Tk 8.4 commands and options and cannot easily work around them to support earlier versions of Tcl/Tk. So we'll check that we are using the correct version up front, and if not we'll stop with a related error message. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rwxr-xr-xgit-gui.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh
index daee5601b1..cc1625bfac 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -22,6 +22,22 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA}
######################################################################
##
+## Tcl/Tk sanity check
+
+if {[catch {package require Tcl 8.4} err]
+ || [catch {package require Tk 8.4} err]
+} {
+ catch {wm withdraw .}
+ tk_messageBox \
+ -icon error \
+ -type ok \
+ -title "git-gui: fatal error" \
+ -message $err
+ exit 1
+}
+
+######################################################################
+##
## configure our library
set oguilib {@@GITGUI_LIBDIR@@}