Skip to content

Commit 112648d

Browse files
committed
Merge branch 'master' of https://github.com/j6t/git-gui
* 'master' of https://github.com/j6t/git-gui: (21 commits) git-gui: ensure own version of git-gui--askpass is used git-gui: Allow Tcl 9.0 git-gui: use -profile tcl8 on encoding conversions git-gui: use -profile tcl8 for file input with Tcl 9 git-gui: themed.tcl: use full namespace for color git-gui: remove EOL translation for gets git-gui: honor TCLTK_PATH in git-gui--askpass git-gui: retire Git Gui.app git-gui: fix dependency of GITGUI_MAIN on generator git-gui: remove uname_O in Makefile git-gui i18n: Remove the locations within the Bulgarian translation git-gui i18n: Update Bulgarian translation (557t) git-gui: do not mix -translation binary and -encoding git-gui: replace encoding binary with iso8859-1 git-gui: translation binary defines iso8859-1 git-gui: assure -eofchar {} on all channels git-gui: use /cmd/git-gui.exe for shortcut git-gui: Windows tk_getSaveFile is not useful for shortcuts git-gui: let nice work on Windows git-gui: do not add directories to PATH on Windows ...
2 parents e2ad556 + e3923e3 commit 112648d

27 files changed

+197
-1052
lines changed

git-gui/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.DS_Store
22
config.mak
3-
Git Gui.app*
43
git-gui.tcl
54
GIT-GUI-BUILD-OPTIONS
65
GIT-VERSION-FILE
76
git-gui
7+
git-gui--askpass
88
lib/tclIndex

git-gui/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@

git-gui/Makefile

Lines changed: 6 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ GIT-VERSION-FILE: FORCE
1212
@$(SHELL_PATH) ./GIT-VERSION-GEN . $@
1313

1414
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
15-
uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
1615
uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
1716

1817
SCRIPT_SH = git-gui.sh
@@ -54,8 +53,6 @@ INSTALL_R0 = $(INSTALL) -m 644 # space is required here
5453
INSTALL_R1 =
5554
INSTALL_X0 = $(INSTALL) -m 755 # space is required here
5655
INSTALL_X1 =
57-
INSTALL_A0 = find # space is required here
58-
INSTALL_A1 = | cpio -pud
5956
INSTALL_L0 = rm -f # space is required here
6057
INSTALL_L1 = && ln # space is required here
6158
INSTALL_L2 =
@@ -80,8 +77,6 @@ ifndef V
8077
INSTALL_R1 = && echo ' ' INSTALL 644 `basename $$src` && $(INSTALL) -m 644 $$src
8178
INSTALL_X0 = src=
8279
INSTALL_X1 = && echo ' ' INSTALL 755 `basename $$src` && $(INSTALL) -m 755 $$src
83-
INSTALL_A0 = src=
84-
INSTALL_A1 = && echo ' ' INSTALL ' ' `basename "$$src"` && find "$$src" | cpio -pud
8580

8681
INSTALL_L0 = dst=
8782
INSTALL_L1 = && src=
@@ -102,18 +97,6 @@ else
10297
TCL_PATH ?= $(dir $(TCLTK_PATH))$(notdir $(subst wish,tclsh,$(TCLTK_PATH)))
10398
endif
10499

105-
ifeq ($(uname_S),Darwin)
106-
TKFRAMEWORK = /Library/Frameworks/Tk.framework/Resources/Wish.app
107-
ifeq ($(shell echo "$(uname_R)" | awk -F. '{if ($$1 >= 9) print "y"}')_$(shell test -d $(TKFRAMEWORK) || echo n),y_n)
108-
TKFRAMEWORK = /System/Library/Frameworks/Tk.framework/Resources/Wish.app
109-
ifeq ($(shell test -d $(TKFRAMEWORK) || echo n),n)
110-
TKFRAMEWORK = /System/Library/Frameworks/Tk.framework/Resources/Wish\ Shell.app
111-
endif
112-
endif
113-
TKEXECUTABLE = $(TKFRAMEWORK)/Contents/MacOS/$(shell basename "$(TKFRAMEWORK)" .app)
114-
TKEXECUTABLE_SQ = $(subst ','\'',$(TKEXECUTABLE))
115-
endif
116-
117100
ifeq ($(findstring $(firstword -$(MAKEFLAGS)),s),s)
118101
QUIET_GEN =
119102
endif
@@ -131,16 +114,10 @@ libdir_SQ = $(subst ','\'',$(gg_libdir))
131114
exedir = $(dir $(gitexecdir))share/git-gui/lib
132115

133116
GITGUI_RELATIVE :=
134-
GITGUI_MACOSXAPP :=
135117

136118
ifeq ($(exedir),$(gg_libdir))
137119
GITGUI_RELATIVE := 1
138120
endif
139-
ifeq ($(uname_S),Darwin)
140-
ifeq ($(shell test -d $(TKFRAMEWORK) && echo y),y)
141-
GITGUI_MACOSXAPP := YesPlease
142-
endif
143-
endif
144121
ifneq (,$(findstring MINGW,$(uname_S)))
145122
ifeq ($(shell expr "$(uname_R)" : '1\.'),2)
146123
NO_MSGFMT=1
@@ -149,28 +126,14 @@ endif
149126
GITGUI_RELATIVE := 1
150127
endif
151128

152-
ifdef GITGUI_MACOSXAPP
153-
GITGUI_MAIN := git-gui.tcl
154-
155-
git-gui: generate-macos-wrapper.sh GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
156-
$(QUIET_GEN)$(SHELL_PATH) generate-macos-wrapper.sh "$@" ./GIT-GUI-BUILD-OPTIONS ./GIT-VERSION-FILE
157-
158-
Git\ Gui.app: GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS \
159-
macosx/Info.plist \
160-
macosx/git-gui.icns \
161-
macosx/AppMain.tcl \
162-
$(TKEXECUTABLE)
163-
$(QUIET_GEN)$(SHELL_PATH) generate-macos-app.sh . "$@" ./GIT-GUI-BUILD-OPTIONS ./GIT-VERSION-FILE
164-
endif
165-
166129
ifdef GITGUI_WINDOWS_WRAPPER
167130
GITGUI_MAIN := git-gui.tcl
168131

169132
git-gui: windows/git-gui.sh
170133
cp $< $@
171134
endif
172135

173-
$(GITGUI_MAIN): git-gui.sh GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
136+
$(GITGUI_MAIN): git-gui.sh GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS generate-git-gui.sh
174137
$(QUIET_GEN)$(SHELL_PATH) generate-git-gui.sh "$<" "$@" ./GIT-GUI-BUILD-OPTIONS ./GIT-VERSION-FILE
175138

176139
XGETTEXT ?= xgettext
@@ -207,18 +170,17 @@ GIT-GUI-BUILD-OPTIONS: FORCE
207170
-e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
208171
-e 's|@TCLTK_PATH@|$(TCLTK_PATH_SQ)|' \
209172
-e 's|@TCL_PATH@|$(TCL_PATH_SQ)|' \
210-
-e 's|@TKEXECUTABLE@|$(TKEXECUTABLE_SQ)|' \
211173
$@.in >$@+
212174
@if grep -q '^[A-Z][A-Z_]*=@.*@$$' $@+; then echo "Unsubstituted build options in $@" >&2 && exit 1; fi
213175
@if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi
214176

215-
ifdef GITGUI_MACOSXAPP
216-
all:: git-gui Git\ Gui.app
217-
endif
177+
git-gui--askpass: git-gui--askpass.sh GIT-GUI-BUILD-OPTIONS generate-script.sh
178+
$(QUIET_GEN)$(SHELL_PATH) generate-script.sh $@ $< ./GIT-GUI-BUILD-OPTIONS
179+
218180
ifdef GITGUI_WINDOWS_WRAPPER
219181
all:: git-gui
220182
endif
221-
all:: $(GITGUI_MAIN) lib/tclIndex $(ALL_MSGFILES)
183+
all:: $(GITGUI_MAIN) git-gui--askpass lib/tclIndex $(ALL_MSGFILES)
222184

223185
install: all
224186
$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(gitexecdir_SQ)' $(INSTALL_D1)
@@ -230,10 +192,6 @@ ifdef GITGUI_WINDOWS_WRAPPER
230192
endif
231193
$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(libdir_SQ)' $(INSTALL_D1)
232194
$(QUIET)$(INSTALL_R0)lib/tclIndex $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)'
233-
ifdef GITGUI_MACOSXAPP
234-
$(QUIET)$(INSTALL_A0)'Git Gui.app' $(INSTALL_A1) '$(DESTDIR_SQ)$(libdir_SQ)'
235-
$(QUIET)$(INSTALL_X0)git-gui.tcl $(INSTALL_X1) '$(DESTDIR_SQ)$(libdir_SQ)'
236-
endif
237195
$(QUIET)$(foreach p,$(ALL_LIBFILES) $(NONTCL_LIBFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)' &&) true
238196
$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(msgsdir_SQ)' $(INSTALL_D1)
239197
$(QUIET)$(foreach p,$(ALL_MSGFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true
@@ -248,10 +206,6 @@ ifdef GITGUI_WINDOWS_WRAPPER
248206
endif
249207
$(QUIET)$(CLEAN_DST) '$(DESTDIR_SQ)$(libdir_SQ)'
250208
$(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/tclIndex $(REMOVE_F1)
251-
ifdef GITGUI_MACOSXAPP
252-
$(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)/Git Gui.app' $(REMOVE_F1)
253-
$(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/git-gui.tcl $(REMOVE_F1)
254-
endif
255209
$(QUIET)$(foreach p,$(ALL_LIBFILES) $(NONTCL_LIBFILES), $(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/$(notdir $p) $(REMOVE_F1) &&) true
256210
$(QUIET)$(CLEAN_DST) '$(DESTDIR_SQ)$(msgsdir_SQ)'
257211
$(QUIET)$(foreach p,$(ALL_MSGFILES), $(REMOVE_F0)'$(DESTDIR_SQ)$(msgsdir_SQ)'/$(notdir $p) $(REMOVE_F1) &&) true
@@ -265,11 +219,8 @@ dist-version: GIT-VERSION-FILE
265219
@sed 's|^GITGUI_VERSION=||' <GIT-VERSION-FILE >$(TARDIR)/version
266220

267221
clean::
268-
$(RM_RF) $(GITGUI_MAIN) lib/tclIndex po/*.msg $(PO_TEMPLATE)
222+
$(RM_RF) $(GITGUI_MAIN) git-gui--askpass lib/tclIndex po/*.msg $(PO_TEMPLATE)
269223
$(RM_RF) GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
270-
ifdef GITGUI_MACOSXAPP
271-
$(RM_RF) 'Git Gui.app'* git-gui
272-
endif
273224
ifdef GITGUI_WINDOWS_WRAPPER
274225
$(RM_RF) git-gui
275226
endif

git-gui/generate-macos-app.sh

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

git-gui/generate-macos-wrapper.sh

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

git-gui/generate-script.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
if test $# -ne 3
6+
then
7+
echo >&2 "USAGE: $0 <OUTPUT> <INPUT> <GIT-GUI-BUILD-OPTIONS>"
8+
exit 1
9+
fi
10+
11+
OUTPUT="$1"
12+
INPUT="$2"
13+
BUILD_OPTIONS="$3"
14+
15+
. "$BUILD_OPTIONS"
16+
17+
sed \
18+
-e "1s|#!.*/sh|#!$SHELL_PATH|" \
19+
-e "1,3s|^exec wish|exec '$TCLTK_PATH'|" \
20+
"$INPUT" >"$OUTPUT"
21+
22+
chmod a+x "$OUTPUT"
File renamed without changes.

0 commit comments

Comments
 (0)