60
}
61
}
62
63
-######################################################################
64
-##
65
-## configure our library
66
-
67
-set oguilib {@@GITGUI_LIBDIR@@}
68
-set oguirel {@@GITGUI_RELATIVE@@}
69
-if {$oguirel eq {1}} {
70
- set oguilib [file dirname [file dirname [file normalize $argv0]]]
71
- set oguilib [file join $oguilib share git-gui lib]
72
-} elseif {[string match @@* $oguirel]} {
73
- set oguilib [file join [file dirname [file normalize $argv0]] lib]
74
-}
75
-
76
-set idx [file join $oguilib tclIndex]
77
-if {[catch {set fd [open $idx r]} err]} {
78
- catch {wm withdraw .}
79
- tk_messageBox \
80
- -icon error \
81
- -type ok \
82
- -title "git-gui: fatal error" \
83
- -message $err
84
- exit 1
85
-}
86
-if {[gets $fd] eq {# Autogenerated by git-gui Makefile}} {
87
- set idx [list]
88
- while {[gets $fd n] >= 0} {
89
- if {$n ne {} && ![string match #* $n]} {
90
- lappend idx $n
91
- }
92
- }
93
-} else {
94
- set idx {}
95
-}
96
-close $fd
97
-
98
-if {$idx ne {}} {
99
- set loaded [list]
100
- foreach p $idx {
101
- if {[lsearch -exact $loaded $p] >= 0} continue
102
- source [file join $oguilib $p]
103
- lappend loaded $p
104
- }
105
- unset loaded p
106
-} else {
107
- set auto_path [concat [list $oguilib] $auto_path]
108
-}
109
-unset -nocomplain oguirel idx fd
110
-
63
######################################################################
64
##
65
## read only globals
484
485
if {[catch {set _git_version [git --version]} err]} {
486
catch {wm withdraw .}
535
- error_popup "Cannot determine Git version:
487
+ tk_messageBox \
488
+ -icon error \
489
+ -type ok \
490
+ -title "git-gui: fatal error" \
491
+ -message "Cannot determine Git version:
492
493
$err
494
497
}
498
if {![regsub {^git version } $_git_version {} _git_version]} {
499
catch {wm withdraw .}
544
- error_popup "Cannot parse Git version string:\n\n$_git_version"
500
+ tk_messageBox \
501
+ -icon error \
502
+ -type ok \
503
+ -title "git-gui: fatal error" \
504
+ -message "Cannot parse Git version string:\n\n$_git_version"
505
exit 1
506
}
507
579
580
if {[git-version < 1.5]} {
581
catch {wm withdraw .}
622
- error_popup "[appname] requires Git 1.5.0 or later.
582
+ tk_messageBox \
583
+ -icon error \
584
+ -type ok \
585
+ -title "git-gui: fatal error" \
586
+ -message "[appname] requires Git 1.5.0 or later.
587
588
You are using [git-version]:
589
591
exit 1
592
}
593
594
+######################################################################
595
+##
596
+## configure our library
597
+
598
+set oguilib {@@GITGUI_LIBDIR@@}
599
+set oguirel {@@GITGUI_RELATIVE@@}
600
+if {$oguirel eq {1}} {
601
+ set oguilib [file dirname [file dirname [file normalize $argv0]]]
602
+ set oguilib [file join $oguilib share git-gui lib]
603
+} elseif {[string match @@* $oguirel]} {
604
+ set oguilib [file join [file dirname [file normalize $argv0]] lib]
605
+}
606
+
607
+set idx [file join $oguilib tclIndex]
608
+if {[catch {set fd [open $idx r]} err]} {
609
+ catch {wm withdraw .}
610
+ tk_messageBox \
611
+ -icon error \
612
+ -type ok \
613
+ -title "git-gui: fatal error" \
614
+ -message $err
615
+ exit 1
616
+}
617
+if {[gets $fd] eq {# Autogenerated by git-gui Makefile}} {
618
+ set idx [list]
619
+ while {[gets $fd n] >= 0} {
620
+ if {$n ne {} && ![string match #* $n]} {
621
+ lappend idx $n
622
+ }
623
+ }
624
+} else {
625
+ set idx {}
626
+}
627
+close $fd
628
+
629
+if {$idx ne {}} {
630
+ set loaded [list]
631
+ foreach p $idx {
632
+ if {[lsearch -exact $loaded $p] >= 0} continue
633
+ source [file join $oguilib $p]
634
+ lappend loaded $p
635
+ }
636
+ unset loaded p
637
+} else {
638
+ set auto_path [concat [list $oguilib] $auto_path]
639
+}
640
+unset -nocomplain oguirel idx fd
641
+
642
######################################################################
643
##
644
## feature option selection