@matheusbsbs / matheus-bagliano / commits / cfb07cca7d
Fork 0

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>

Shawn O. Pearce committed Jun 2, 2007 at 16:11 UTC cfb07cca7d9a517fae1bdc741c41c06d150a852f
1 file changed +16
git-gui.sh
+16
@@ -20,6 +20,22 @@ You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA}
22
23 +######################################################################
24 +##
25 +## Tcl/Tk sanity check
26 +
27 +if {[catch {package require Tcl 8.4} err]
28 + || [catch {package require Tk 8.4} err]
29 +} {
30 + catch {wm withdraw .}
31 + tk_messageBox \
32 + -icon error \
33 + -type ok \
34 + -title "git-gui: fatal error" \
35 + -message $err
36 + exit 1
37 +}
38 +
39 ######################################################################
40 ##
41 ## configure our library