Skip to content

Commit df41037

Browse files
carenasj6t
authored andcommitted
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 <[email protected]> Signed-off-by: Johannes Sixt <[email protected]>
1 parent de0ac94 commit df41037

File tree

9 files changed

+0
-234
lines changed

9 files changed

+0
-234
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.DS_Store
22
config.mak
3-
Git Gui.app*
43
git-gui.tcl
54
GIT-GUI-BUILD-OPTIONS
65
GIT-VERSION-FILE

GIT-GUI-BUILD-OPTIONS.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ GITGUI_RELATIVE=@GITGUI_RELATIVE@
44
SHELL_PATH=@SHELL_PATH@
55
TCLTK_PATH=@TCLTK_PATH@
66
TCL_PATH=@TCL_PATH@
7-
TKEXECUTABLE=@TKEXECUTABLE@

Makefile

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ INSTALL_R0 = $(INSTALL) -m 644 # space is required here
5252
INSTALL_R1 =
5353
INSTALL_X0 = $(INSTALL) -m 755 # space is required here
5454
INSTALL_X1 =
55-
INSTALL_A0 = find # space is required here
56-
INSTALL_A1 = | cpio -pud
5755
INSTALL_L0 = rm -f # space is required here
5856
INSTALL_L1 = && ln # space is required here
5957
INSTALL_L2 =
@@ -78,8 +76,6 @@ ifndef V
7876
INSTALL_R1 = && echo ' ' INSTALL 644 `basename $$src` && $(INSTALL) -m 644 $$src
7977
INSTALL_X0 = src=
8078
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
8379

8480
INSTALL_L0 = dst=
8581
INSTALL_L1 = && src=
@@ -100,18 +96,6 @@ else
10096
TCL_PATH ?= $(dir $(TCLTK_PATH))$(notdir $(subst wish,tclsh,$(TCLTK_PATH)))
10197
endif
10298

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-
11599
ifeq ($(findstring $(firstword -$(MAKEFLAGS)),s),s)
116100
QUIET_GEN =
117101
endif
@@ -129,16 +113,10 @@ libdir_SQ = $(subst ','\'',$(gg_libdir))
129113
exedir = $(dir $(gitexecdir))share/git-gui/lib
130114

131115
GITGUI_RELATIVE :=
132-
GITGUI_MACOSXAPP :=
133116

134117
ifeq ($(exedir),$(gg_libdir))
135118
GITGUI_RELATIVE := 1
136119
endif
137-
ifeq ($(uname_S),Darwin)
138-
ifeq ($(shell test -d $(TKFRAMEWORK) && echo y),y)
139-
GITGUI_MACOSXAPP := YesPlease
140-
endif
141-
endif
142120
ifneq (,$(findstring MINGW,$(uname_S)))
143121
ifeq ($(shell expr "$(uname_R)" : '1\.'),2)
144122
NO_MSGFMT=1
@@ -147,20 +125,6 @@ endif
147125
GITGUI_RELATIVE := 1
148126
endif
149127

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-
164128
ifdef GITGUI_WINDOWS_WRAPPER
165129
GITGUI_MAIN := git-gui.tcl
166130

@@ -205,14 +169,10 @@ GIT-GUI-BUILD-OPTIONS: FORCE
205169
-e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
206170
-e 's|@TCLTK_PATH@|$(TCLTK_PATH_SQ)|' \
207171
-e 's|@TCL_PATH@|$(TCL_PATH_SQ)|' \
208-
-e 's|@TKEXECUTABLE@|$(TKEXECUTABLE_SQ)|' \
209172
$@.in >$@+
210173
@if grep -q '^[A-Z][A-Z_]*=@.*@$$' $@+; then echo "Unsubstituted build options in $@" >&2 && exit 1; fi
211174
@if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi
212175

213-
ifdef GITGUI_MACOSXAPP
214-
all:: git-gui Git\ Gui.app
215-
endif
216176
ifdef GITGUI_WINDOWS_WRAPPER
217177
all:: git-gui
218178
endif
@@ -228,10 +188,6 @@ ifdef GITGUI_WINDOWS_WRAPPER
228188
endif
229189
$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(libdir_SQ)' $(INSTALL_D1)
230190
$(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
235191
$(QUIET)$(foreach p,$(ALL_LIBFILES) $(NONTCL_LIBFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)' &&) true
236192
$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(msgsdir_SQ)' $(INSTALL_D1)
237193
$(QUIET)$(foreach p,$(ALL_MSGFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true
@@ -246,10 +202,6 @@ ifdef GITGUI_WINDOWS_WRAPPER
246202
endif
247203
$(QUIET)$(CLEAN_DST) '$(DESTDIR_SQ)$(libdir_SQ)'
248204
$(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
253205
$(QUIET)$(foreach p,$(ALL_LIBFILES) $(NONTCL_LIBFILES), $(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/$(notdir $p) $(REMOVE_F1) &&) true
254206
$(QUIET)$(CLEAN_DST) '$(DESTDIR_SQ)$(msgsdir_SQ)'
255207
$(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
265217
clean::
266218
$(RM_RF) $(GITGUI_MAIN) lib/tclIndex po/*.msg $(PO_TEMPLATE)
267219
$(RM_RF) GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
268-
ifdef GITGUI_MACOSXAPP
269-
$(RM_RF) 'Git Gui.app'* git-gui
270-
endif
271220
ifdef GITGUI_WINDOWS_WRAPPER
272221
$(RM_RF) git-gui
273222
endif

generate-macos-app.sh

Lines changed: 0 additions & 30 deletions
This file was deleted.

generate-macos-wrapper.sh

Lines changed: 0 additions & 35 deletions
This file was deleted.

macosx/AppMain.tcl

Lines changed: 0 additions & 29 deletions
This file was deleted.

macosx/Info.plist

Lines changed: 0 additions & 30 deletions
This file was deleted.

macosx/git-gui.icns

-28.2 KB
Binary file not shown.

meson.build

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,6 @@ build_options_config.set_quoted('GITGUI_LIBDIR', get_option('prefix') / get_opti
1919
build_options_config.set_quoted('SHELL_PATH', fs.as_posix(shell.full_path()))
2020
build_options_config.set_quoted('TCLTK_PATH', fs.as_posix(wish.full_path()))
2121
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
3322

3423
build_options = configure_file(
3524
input: 'GIT-GUI-BUILD-OPTIONS.in',
@@ -70,52 +59,6 @@ if target_machine.system() == 'windows'
7059
install: true,
7160
install_dir: get_option('libexecdir') / 'git-core',
7261
)
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-
)
11962
endif
12063

12164
custom_target(

0 commit comments

Comments
 (0)