git-gui: retire Git Gui.app
In a recent commit, the minimum version of Tcl/Tk was raised to 8.6, but the "app" relies on the system provided Framework that is based on 8.5. Remove it, and let git-gui use a third party version of Wish if available. Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Carlo Marcelo Arenas Belón committed
Jul 31, 2025 at 01:06 UTC
df41037be019863d1de86e5bacce91d7218758b1
9 files changed
-234
.gitignore
-1
@@ -1,6 +1,5 @@
1
.DS_Store
2
config.mak
3
-Git Gui.app*
3
git-gui.tcl
4
GIT-GUI-BUILD-OPTIONS
5
GIT-VERSION-FILE
GIT-GUI-BUILD-OPTIONS.in
-1
@@ -4,4 +4,3 @@ GITGUI_RELATIVE=@GITGUI_RELATIVE@
4
SHELL_PATH=@SHELL_PATH@
5
TCLTK_PATH=@TCLTK_PATH@
6
TCL_PATH=@TCL_PATH@
7
-TKEXECUTABLE=@TKEXECUTABLE@
Makefile
-51
@@ -52,8 +52,6 @@ INSTALL_R0 = $(INSTALL) -m 644 # space is required here
52
INSTALL_R1 =
53
INSTALL_X0 = $(INSTALL) -m 755 # space is required here
54
INSTALL_X1 =
55
-INSTALL_A0 = find # space is required here
56
-INSTALL_A1 = | cpio -pud
55
INSTALL_L0 = rm -f # space is required here
56
INSTALL_L1 = && ln # space is required here
57
INSTALL_L2 =
@@ -78,8 +76,6 @@ ifndef V
76
INSTALL_R1 = && echo ' ' INSTALL 644 `basename $$src` && $(INSTALL) -m 644 $$src
77
INSTALL_X0 = src=
78
INSTALL_X1 = && echo ' ' INSTALL 755 `basename $$src` && $(INSTALL) -m 755 $$src
81
- INSTALL_A0 = src=
82
- INSTALL_A1 = && echo ' ' INSTALL ' ' `basename "$$src"` && find "$$src" | cpio -pud
79
80
INSTALL_L0 = dst=
81
INSTALL_L1 = && src=
@@ -100,18 +96,6 @@ else
96
TCL_PATH ?= $(dir $(TCLTK_PATH))$(notdir $(subst wish,tclsh,$(TCLTK_PATH)))
97
endif
98
103
-ifeq ($(uname_S),Darwin)
104
- TKFRAMEWORK = /Library/Frameworks/Tk.framework/Resources/Wish.app
105
- ifeq ($(shell echo "$(uname_R)" | awk -F. '{if ($$1 >= 9) print "y"}')_$(shell test -d $(TKFRAMEWORK) || echo n),y_n)
106
- TKFRAMEWORK = /System/Library/Frameworks/Tk.framework/Resources/Wish.app
107
- ifeq ($(shell test -d $(TKFRAMEWORK) || echo n),n)
108
- TKFRAMEWORK = /System/Library/Frameworks/Tk.framework/Resources/Wish\ Shell.app
109
- endif
110
- endif
111
- TKEXECUTABLE = $(TKFRAMEWORK)/Contents/MacOS/$(shell basename "$(TKFRAMEWORK)" .app)
112
- TKEXECUTABLE_SQ = $(subst ','\'',$(TKEXECUTABLE))
113
-endif
114
-
99
ifeq ($(findstring $(firstword -$(MAKEFLAGS)),s),s)
100
QUIET_GEN =
101
endif
@@ -129,16 +113,10 @@ libdir_SQ = $(subst ','\'',$(gg_libdir))
113
exedir = $(dir $(gitexecdir))share/git-gui/lib
114
115
GITGUI_RELATIVE :=
132
-GITGUI_MACOSXAPP :=
116
117
ifeq ($(exedir),$(gg_libdir))
118
GITGUI_RELATIVE := 1
119
endif
137
-ifeq ($(uname_S),Darwin)
138
- ifeq ($(shell test -d $(TKFRAMEWORK) && echo y),y)
139
- GITGUI_MACOSXAPP := YesPlease
140
- endif
141
-endif
120
ifneq (,$(findstring MINGW,$(uname_S)))
121
ifeq ($(shell expr "$(uname_R)" : '1\.'),2)
122
NO_MSGFMT=1
@@ -147,20 +125,6 @@ endif
125
GITGUI_RELATIVE := 1
126
endif
127
150
-ifdef GITGUI_MACOSXAPP
151
-GITGUI_MAIN := git-gui.tcl
152
-
153
-git-gui: generate-macos-wrapper.sh GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
154
- $(QUIET_GEN)$(SHELL_PATH) generate-macos-wrapper.sh "$@" ./GIT-GUI-BUILD-OPTIONS ./GIT-VERSION-FILE
155
-
156
-Git\ Gui.app: GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS \
157
- macosx/Info.plist \
158
- macosx/git-gui.icns \
159
- macosx/AppMain.tcl \
160
- $(TKEXECUTABLE)
161
- $(QUIET_GEN)$(SHELL_PATH) generate-macos-app.sh . "$@" ./GIT-GUI-BUILD-OPTIONS ./GIT-VERSION-FILE
162
-endif
163
-
128
ifdef GITGUI_WINDOWS_WRAPPER
129
GITGUI_MAIN := git-gui.tcl
130
@@ -205,14 +169,10 @@ GIT-GUI-BUILD-OPTIONS: FORCE
169
-e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
170
-e 's|@TCLTK_PATH@|$(TCLTK_PATH_SQ)|' \
171
-e 's|@TCL_PATH@|$(TCL_PATH_SQ)|' \
208
- -e 's|@TKEXECUTABLE@|$(TKEXECUTABLE_SQ)|' \
172
$@.in >$@+
173
@if grep -q '^[A-Z][A-Z_]*=@.*@$$' $@+; then echo "Unsubstituted build options in $@" >&2 && exit 1; fi
174
@if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi
175
213
-ifdef GITGUI_MACOSXAPP
214
-all:: git-gui Git\ Gui.app
215
-endif
176
ifdef GITGUI_WINDOWS_WRAPPER
177
all:: git-gui
178
endif
@@ -228,10 +188,6 @@ ifdef GITGUI_WINDOWS_WRAPPER
188
endif
189
$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(libdir_SQ)' $(INSTALL_D1)
190
$(QUIET)$(INSTALL_R0)lib/tclIndex $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)'
231
-ifdef GITGUI_MACOSXAPP
232
- $(QUIET)$(INSTALL_A0)'Git Gui.app' $(INSTALL_A1) '$(DESTDIR_SQ)$(libdir_SQ)'
233
- $(QUIET)$(INSTALL_X0)git-gui.tcl $(INSTALL_X1) '$(DESTDIR_SQ)$(libdir_SQ)'
234
-endif
191
$(QUIET)$(foreach p,$(ALL_LIBFILES) $(NONTCL_LIBFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)' &&) true
192
$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(msgsdir_SQ)' $(INSTALL_D1)
193
$(QUIET)$(foreach p,$(ALL_MSGFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true
@@ -246,10 +202,6 @@ ifdef GITGUI_WINDOWS_WRAPPER
202
endif
203
$(QUIET)$(CLEAN_DST) '$(DESTDIR_SQ)$(libdir_SQ)'
204
$(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/tclIndex $(REMOVE_F1)
249
-ifdef GITGUI_MACOSXAPP
250
- $(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)/Git Gui.app' $(REMOVE_F1)
251
- $(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/git-gui.tcl $(REMOVE_F1)
252
-endif
205
$(QUIET)$(foreach p,$(ALL_LIBFILES) $(NONTCL_LIBFILES), $(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/$(notdir $p) $(REMOVE_F1) &&) true
206
$(QUIET)$(CLEAN_DST) '$(DESTDIR_SQ)$(msgsdir_SQ)'
207
$(QUIET)$(foreach p,$(ALL_MSGFILES), $(REMOVE_F0)'$(DESTDIR_SQ)$(msgsdir_SQ)'/$(notdir $p) $(REMOVE_F1) &&) true
@@ -265,9 +217,6 @@ dist-version: GIT-VERSION-FILE
217
clean::
218
$(RM_RF) $(GITGUI_MAIN) lib/tclIndex po/*.msg $(PO_TEMPLATE)
219
$(RM_RF) GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
268
-ifdef GITGUI_MACOSXAPP
269
- $(RM_RF) 'Git Gui.app'* git-gui
270
-endif
220
ifdef GITGUI_WINDOWS_WRAPPER
221
$(RM_RF) git-gui
222
endif
generate-macos-app.sh
deleted
-30
@@ -1,30 +0,0 @@
1
-#!/bin/sh
2
-
3
-set -e
4
-
5
-SOURCE_DIR="$1"
6
-OUTPUT="$2"
7
-BUILD_OPTIONS="$3"
8
-VERSION_FILE="$4"
9
-
10
-. "$BUILD_OPTIONS"
11
-. "$VERSION_FILE"
12
-
13
-rm -rf "$OUTPUT" "$OUTPUT+"
14
-
15
-mkdir -p "$OUTPUT+/Contents/MacOS"
16
-mkdir -p "$OUTPUT+/Contents/Resources/Scripts"
17
-
18
-cp "$TKEXECUTABLE" "$OUTPUT+/Contents/MacOS"
19
-cp "$SOURCE_DIR/macosx/git-gui.icns" "$OUTPUT+/Contents/Resources"
20
-sed \
21
- -e "s/@@GITGUI_VERSION@@/$GITGUI_VERSION/g" \
22
- -e "s/@@GITGUI_TKEXECUTABLE@@/$(basename "$TKEXECUTABLE")/g" \
23
- "$SOURCE_DIR/macosx/Info.plist" \
24
- >"$OUTPUT+/Contents/Info.plist"
25
-sed \
26
- -e "s|@@gitexecdir@@|$GITGUI_GITEXECDIR|" \
27
- -e "s|@@GITGUI_LIBDIR@@|$GITGUI_LIBDIR|" \
28
- "$SOURCE_DIR/macosx/AppMain.tcl" \
29
- >"$OUTPUT+/Contents/Resources/Scripts/AppMain.tcl"
30
-mv "$OUTPUT+" "$OUTPUT"
generate-macos-wrapper.sh
deleted
-35
@@ -1,35 +0,0 @@
1
-#!/bin/sh
2
-
3
-set -e
4
-
5
-if test "$#" -ne 3
6
-then
7
- echo >&2 "usage: $0 <OUTPUT> <BUILD_OPTIONS> <VERSION_FILE>"
8
- exit 1
9
-fi
10
-
11
-OUTPUT="$1"
12
-BUILD_OPTIONS="$2"
13
-VERSION_FILE="$3"
14
-
15
-. "$BUILD_OPTIONS"
16
-
17
-rm -f "$OUTPUT" "$OUTPUT+"
18
-
19
-(
20
- echo "#!$SHELL_PATH"
21
- cat "$BUILD_OPTIONS" "$VERSION_FILE"
22
- cat <<-'EOF'
23
- if test "z$*" = zversion ||
24
- test "z$*" = z--version
25
- then
26
- echo "git-gui version $GITGUI_VERSION"
27
- else
28
- libdir="${GIT_GUI_LIB_DIR:-$GITGUI_LIBDIR}"
29
- exec "$libdir/Git Gui.app/Contents/MacOS/$(basename "$TKEXECUTABLE")" "$0" "$@"
30
- fi
31
- EOF
32
-) >"$OUTPUT+"
33
-
34
-chmod +x "$OUTPUT+"
35
-mv "$OUTPUT+" "$OUTPUT"
macosx/AppMain.tcl
deleted
-29
@@ -1,29 +0,0 @@
1
-set gitexecdir {@@gitexecdir@@}
2
-if { [info exists ::env(GIT_GUI_LIB_DIR) ] } {
3
- set gitguilib $::env(GIT_GUI_LIB_DIR)
4
-} else {
5
- set gitguilib {@@GITGUI_LIBDIR@@}
6
-}
7
-
8
-set env(PATH) "$gitexecdir:$env(PATH)"
9
-
10
-if {[string first -psn [lindex $argv 0]] == 0} {
11
- lset argv 0 [file join $gitexecdir git-gui]
12
-}
13
-
14
-if {[file tail [lindex $argv 0]] eq {gitk}} {
15
- set argv0 [lindex $argv 0]
16
- set AppMain_source $argv0
17
-} else {
18
- set argv0 [file join $gitexecdir [file tail [lindex $argv 0]]]
19
- set AppMain_source [file join $gitguilib git-gui.tcl]
20
- if {[info exists env(PWD)]} {
21
- cd $env(PWD)
22
- } elseif {[pwd] eq {/}} {
23
- cd $env(HOME)
24
- }
25
-}
26
-
27
-unset gitexecdir gitguilib
28
-set argv [lrange $argv 1 end]
29
-source $AppMain_source
macosx/Info.plist
deleted
-30
@@ -1,30 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
-<plist version="1.0">
4
-<dict>
5
- <key>CFBundleDevelopmentRegion</key>
6
- <string>English</string>
7
- <key>CFBundleExecutable</key>
8
- <string>@@GITGUI_TKEXECUTABLE@@</string>
9
- <key>CFBundleGetInfoString</key>
10
- <string>Git Gui @@GITGUI_VERSION@@ © 2006-2007 Shawn Pearce, et. al.</string>
11
- <key>CFBundleIconFile</key>
12
- <string>git-gui.icns</string>
13
- <key>CFBundleIdentifier</key>
14
- <string>cz.or.repo.git-gui</string>
15
- <key>CFBundleInfoDictionaryVersion</key>
16
- <string>6.0</string>
17
- <key>CFBundleName</key>
18
- <string>Git Gui</string>
19
- <key>CFBundlePackageType</key>
20
- <string>APPL</string>
21
- <key>CFBundleShortVersionString</key>
22
- <string>@@GITGUI_VERSION@@</string>
23
- <key>CFBundleSignature</key>
24
- <string>GITg</string>
25
- <key>CFBundleVersion</key>
26
- <string>@@GITGUI_VERSION@@</string>
27
- <key>NSHighResolutionCapable</key>
28
- <true/>
29
-</dict>
30
-</plist>
macosx/git-gui.icns
Binary files a/macosx/git-gui.icns and /dev/null differ
meson.build
-57
@@ -19,17 +19,6 @@ build_options_config.set_quoted('GITGUI_LIBDIR', get_option('prefix') / get_opti
19
build_options_config.set_quoted('SHELL_PATH', fs.as_posix(shell.full_path()))
20
build_options_config.set_quoted('TCLTK_PATH', fs.as_posix(wish.full_path()))
21
build_options_config.set_quoted('TCL_PATH', fs.as_posix(tclsh.full_path()))
22
-if target_machine.system() == 'darwin'
23
- tkexecutables = [
24
- '/Library/Frameworks/Tk.framework/Resources/Wish.app/Contents/MacOS/Wish',
25
- '/System/Library/Frameworks/Tk.framework/Resources/Wish.app/Contents/MacOS/Wish',
26
- '/System/Library/Frameworks/Tk.framework/Resources/Wish Shell.app/Contents/MacOS/Wish Shell',
27
- ]
28
- tkexecutable = find_program(tkexecutables)
29
- build_options_config.set_quoted('TKEXECUTABLE', tkexecutable.full_path())
30
-else
31
- build_options_config.set('TKEXECUTABLE', '')
32
-endif
22
23
build_options = configure_file(
24
input: 'GIT-GUI-BUILD-OPTIONS.in',
@@ -70,52 +59,6 @@ if target_machine.system() == 'windows'
59
install: true,
60
install_dir: get_option('libexecdir') / 'git-core',
61
)
73
-elif target_machine.system() == 'darwin'
74
- gitgui_main = 'git-gui.tcl'
75
- gitgui_main_install_dir = get_option('datadir') / 'git-gui/lib'
76
-
77
- custom_target(
78
- output: 'git-gui',
79
- command: [
80
- shell,
81
- meson.current_source_dir() / 'generate-macos-wrapper.sh',
82
- '@OUTPUT@',
83
- meson.current_build_dir() / 'GIT-GUI-BUILD-OPTIONS',
84
- meson.current_build_dir() / 'GIT-VERSION-FILE',
85
- ],
86
- depends: [
87
- version_file,
88
- ],
89
- depend_files: [
90
- build_options,
91
- ],
92
- install: true,
93
- install_dir: get_option('libexecdir') / 'git-core',
94
- )
95
-
96
- custom_target(
97
- output: 'Git Gui.app',
98
- command: [
99
- shell,
100
- meson.current_source_dir() / 'generate-macos-app.sh',
101
- meson.current_source_dir(),
102
- meson.current_build_dir() / 'Git Gui.app',
103
- meson.current_build_dir() / 'GIT-GUI-BUILD-OPTIONS',
104
- meson.current_build_dir() / 'GIT-VERSION-FILE',
105
- ],
106
- depends: [
107
- version_file,
108
- ],
109
- depend_files: [
110
- build_options,
111
- 'macosx/AppMain.tcl',
112
- 'macosx/Info.plist',
113
- 'macosx/git-gui.icns',
114
- ],
115
- build_by_default: true,
116
- install: true,
117
- install_dir: get_option('datadir') / 'git-gui/lib',
118
- )
62
endif
63
64
custom_target(