]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-gui: retire Git Gui.app
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>
Thu, 31 Jul 2025 08:06:26 +0000 (01:06 -0700)
committerJohannes Sixt <j6t@kdbg.org>
Thu, 31 Jul 2025 16:42:54 +0000 (18:42 +0200)
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>
.gitignore
GIT-GUI-BUILD-OPTIONS.in
Makefile
generate-macos-app.sh [deleted file]
generate-macos-wrapper.sh [deleted file]
macosx/AppMain.tcl [deleted file]
macosx/Info.plist [deleted file]
macosx/git-gui.icns [deleted file]
meson.build

index ff6e0be4b4126cf804dde11d37d762a4d1d1a817..ba845f3f3a357c82df0d1195b61c465a8cad00f5 100644 (file)
@@ -1,6 +1,5 @@
 .DS_Store
 config.mak
-Git Gui.app*
 git-gui.tcl
 GIT-GUI-BUILD-OPTIONS
 GIT-VERSION-FILE
index 5fd885c2bf73e93988285d9bfa47c8444b702b1f..3c112af57803a0a29b624dd47e82dcfcc43c6c15 100644 (file)
@@ -4,4 +4,3 @@ GITGUI_RELATIVE=@GITGUI_RELATIVE@
 SHELL_PATH=@SHELL_PATH@
 TCLTK_PATH=@TCLTK_PATH@
 TCL_PATH=@TCL_PATH@
-TKEXECUTABLE=@TKEXECUTABLE@
index 179857d08836e57e3e3c7380ebb87d69e1c466d6..2ac5f442f499e2dc3c8a9c1a7df9fe84f275db81 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -52,8 +52,6 @@ INSTALL_R0 = $(INSTALL) -m 644 # space is required here
 INSTALL_R1 =
 INSTALL_X0 = $(INSTALL) -m 755 # space is required here
 INSTALL_X1 =
-INSTALL_A0 = find # space is required here
-INSTALL_A1 = | cpio -pud
 INSTALL_L0 = rm -f # space is required here
 INSTALL_L1 = && ln # space is required here
 INSTALL_L2 =
@@ -78,8 +76,6 @@ ifndef V
        INSTALL_R1 = && echo '   ' INSTALL 644 `basename $$src` && $(INSTALL) -m 644 $$src
        INSTALL_X0 = src=
        INSTALL_X1 = && echo '   ' INSTALL 755 `basename $$src` && $(INSTALL) -m 755 $$src
-       INSTALL_A0 = src=
-       INSTALL_A1 = && echo '   ' INSTALL '   ' `basename "$$src"` && find "$$src" | cpio -pud
 
        INSTALL_L0 = dst=
        INSTALL_L1 = && src=
@@ -100,18 +96,6 @@ else
        TCL_PATH ?= $(dir $(TCLTK_PATH))$(notdir $(subst wish,tclsh,$(TCLTK_PATH)))
 endif
 
-ifeq ($(uname_S),Darwin)
-       TKFRAMEWORK = /Library/Frameworks/Tk.framework/Resources/Wish.app
-        ifeq ($(shell echo "$(uname_R)" | awk -F. '{if ($$1 >= 9) print "y"}')_$(shell test -d $(TKFRAMEWORK) || echo n),y_n)
-               TKFRAMEWORK = /System/Library/Frameworks/Tk.framework/Resources/Wish.app
-                ifeq ($(shell test -d $(TKFRAMEWORK) || echo n),n)
-                       TKFRAMEWORK = /System/Library/Frameworks/Tk.framework/Resources/Wish\ Shell.app
-                endif
-        endif
-       TKEXECUTABLE = $(TKFRAMEWORK)/Contents/MacOS/$(shell basename "$(TKFRAMEWORK)" .app)
-       TKEXECUTABLE_SQ = $(subst ','\'',$(TKEXECUTABLE))
-endif
-
 ifeq ($(findstring $(firstword -$(MAKEFLAGS)),s),s)
 QUIET_GEN =
 endif
@@ -129,16 +113,10 @@ libdir_SQ  = $(subst ','\'',$(gg_libdir))
 exedir     = $(dir $(gitexecdir))share/git-gui/lib
 
 GITGUI_RELATIVE :=
-GITGUI_MACOSXAPP :=
 
 ifeq ($(exedir),$(gg_libdir))
        GITGUI_RELATIVE := 1
 endif
-ifeq ($(uname_S),Darwin)
-        ifeq ($(shell test -d $(TKFRAMEWORK) && echo y),y)
-               GITGUI_MACOSXAPP := YesPlease
-        endif
-endif
 ifneq (,$(findstring MINGW,$(uname_S)))
 ifeq ($(shell expr "$(uname_R)" : '1\.'),2)
        NO_MSGFMT=1
@@ -147,20 +125,6 @@ endif
        GITGUI_RELATIVE := 1
 endif
 
-ifdef GITGUI_MACOSXAPP
-GITGUI_MAIN := git-gui.tcl
-
-git-gui: generate-macos-wrapper.sh GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
-       $(QUIET_GEN)$(SHELL_PATH) generate-macos-wrapper.sh "$@" ./GIT-GUI-BUILD-OPTIONS ./GIT-VERSION-FILE
-
-Git\ Gui.app: GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS \
-               macosx/Info.plist \
-               macosx/git-gui.icns \
-               macosx/AppMain.tcl \
-               $(TKEXECUTABLE)
-       $(QUIET_GEN)$(SHELL_PATH) generate-macos-app.sh . "$@" ./GIT-GUI-BUILD-OPTIONS ./GIT-VERSION-FILE
-endif
-
 ifdef GITGUI_WINDOWS_WRAPPER
 GITGUI_MAIN := git-gui.tcl
 
@@ -205,14 +169,10 @@ GIT-GUI-BUILD-OPTIONS: FORCE
                -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
                -e 's|@TCLTK_PATH@|$(TCLTK_PATH_SQ)|' \
                -e 's|@TCL_PATH@|$(TCL_PATH_SQ)|' \
-               -e 's|@TKEXECUTABLE@|$(TKEXECUTABLE_SQ)|' \
                $@.in >$@+
        @if grep -q '^[A-Z][A-Z_]*=@.*@$$' $@+; then echo "Unsubstituted build options in $@" >&2 && exit 1; fi
        @if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi
 
-ifdef GITGUI_MACOSXAPP
-all:: git-gui Git\ Gui.app
-endif
 ifdef GITGUI_WINDOWS_WRAPPER
 all:: git-gui
 endif
@@ -228,10 +188,6 @@ ifdef GITGUI_WINDOWS_WRAPPER
 endif
        $(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(libdir_SQ)' $(INSTALL_D1)
        $(QUIET)$(INSTALL_R0)lib/tclIndex $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)'
-ifdef GITGUI_MACOSXAPP
-       $(QUIET)$(INSTALL_A0)'Git Gui.app' $(INSTALL_A1) '$(DESTDIR_SQ)$(libdir_SQ)'
-       $(QUIET)$(INSTALL_X0)git-gui.tcl $(INSTALL_X1) '$(DESTDIR_SQ)$(libdir_SQ)'
-endif
        $(QUIET)$(foreach p,$(ALL_LIBFILES) $(NONTCL_LIBFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)' &&) true
        $(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(msgsdir_SQ)' $(INSTALL_D1)
        $(QUIET)$(foreach p,$(ALL_MSGFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true
@@ -246,10 +202,6 @@ ifdef GITGUI_WINDOWS_WRAPPER
 endif
        $(QUIET)$(CLEAN_DST) '$(DESTDIR_SQ)$(libdir_SQ)'
        $(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/tclIndex $(REMOVE_F1)
-ifdef GITGUI_MACOSXAPP
-       $(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)/Git Gui.app' $(REMOVE_F1)
-       $(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/git-gui.tcl $(REMOVE_F1)
-endif
        $(QUIET)$(foreach p,$(ALL_LIBFILES) $(NONTCL_LIBFILES), $(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/$(notdir $p) $(REMOVE_F1) &&) true
        $(QUIET)$(CLEAN_DST) '$(DESTDIR_SQ)$(msgsdir_SQ)'
        $(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
 clean::
        $(RM_RF) $(GITGUI_MAIN) lib/tclIndex po/*.msg $(PO_TEMPLATE)
        $(RM_RF) GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
-ifdef GITGUI_MACOSXAPP
-       $(RM_RF) 'Git Gui.app'* git-gui
-endif
 ifdef GITGUI_WINDOWS_WRAPPER
        $(RM_RF) git-gui
 endif
diff --git a/generate-macos-app.sh b/generate-macos-app.sh
deleted file mode 100755 (executable)
index 71b9fa6..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-set -e
-
-SOURCE_DIR="$1"
-OUTPUT="$2"
-BUILD_OPTIONS="$3"
-VERSION_FILE="$4"
-
-. "$BUILD_OPTIONS"
-. "$VERSION_FILE"
-
-rm -rf "$OUTPUT" "$OUTPUT+"
-
-mkdir -p "$OUTPUT+/Contents/MacOS"
-mkdir -p "$OUTPUT+/Contents/Resources/Scripts"
-
-cp "$TKEXECUTABLE" "$OUTPUT+/Contents/MacOS"
-cp "$SOURCE_DIR/macosx/git-gui.icns" "$OUTPUT+/Contents/Resources"
-sed \
-       -e "s/@@GITGUI_VERSION@@/$GITGUI_VERSION/g" \
-       -e "s/@@GITGUI_TKEXECUTABLE@@/$(basename "$TKEXECUTABLE")/g" \
-       "$SOURCE_DIR/macosx/Info.plist" \
-       >"$OUTPUT+/Contents/Info.plist"
-sed \
-       -e "s|@@gitexecdir@@|$GITGUI_GITEXECDIR|" \
-       -e "s|@@GITGUI_LIBDIR@@|$GITGUI_LIBDIR|" \
-       "$SOURCE_DIR/macosx/AppMain.tcl" \
-       >"$OUTPUT+/Contents/Resources/Scripts/AppMain.tcl"
-mv "$OUTPUT+" "$OUTPUT"
diff --git a/generate-macos-wrapper.sh b/generate-macos-wrapper.sh
deleted file mode 100755 (executable)
index 0304937..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if test "$#" -ne 3
-then
-       echo >&2 "usage: $0 <OUTPUT> <BUILD_OPTIONS> <VERSION_FILE>"
-       exit 1
-fi
-
-OUTPUT="$1"
-BUILD_OPTIONS="$2"
-VERSION_FILE="$3"
-
-. "$BUILD_OPTIONS"
-
-rm -f "$OUTPUT" "$OUTPUT+"
-
-(
-       echo "#!$SHELL_PATH"
-       cat "$BUILD_OPTIONS" "$VERSION_FILE"
-       cat <<-'EOF'
-       if test "z$*" = zversion ||
-          test "z$*" = z--version
-       then
-               echo "git-gui version $GITGUI_VERSION"
-       else
-               libdir="${GIT_GUI_LIB_DIR:-$GITGUI_LIBDIR}"
-               exec "$libdir/Git Gui.app/Contents/MacOS/$(basename "$TKEXECUTABLE")" "$0" "$@"
-       fi
-       EOF
-) >"$OUTPUT+"
-
-chmod +x "$OUTPUT+"
-mv "$OUTPUT+" "$OUTPUT"
diff --git a/macosx/AppMain.tcl b/macosx/AppMain.tcl
deleted file mode 100644 (file)
index b6c6dc3..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-set gitexecdir {@@gitexecdir@@}
-if { [info exists ::env(GIT_GUI_LIB_DIR) ] } {
-       set gitguilib $::env(GIT_GUI_LIB_DIR)
-} else {
-       set gitguilib {@@GITGUI_LIBDIR@@}
-}
-
-set env(PATH) "$gitexecdir:$env(PATH)"
-
-if {[string first -psn [lindex $argv 0]] == 0} {
-       lset argv 0 [file join $gitexecdir git-gui]
-}
-
-if {[file tail [lindex $argv 0]] eq {gitk}} {
-       set argv0 [lindex $argv 0]
-       set AppMain_source $argv0
-} else {
-       set argv0 [file join $gitexecdir [file tail [lindex $argv 0]]]
-       set AppMain_source [file join $gitguilib git-gui.tcl]
-       if {[info exists env(PWD)]} {
-               cd $env(PWD)
-       } elseif {[pwd] eq {/}} {
-               cd $env(HOME)
-       }
-}
-
-unset gitexecdir gitguilib
-set argv [lrange $argv 1 end]
-source $AppMain_source
diff --git a/macosx/Info.plist b/macosx/Info.plist
deleted file mode 100644 (file)
index 1ade121..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-       <key>CFBundleDevelopmentRegion</key>
-       <string>English</string>
-       <key>CFBundleExecutable</key>
-       <string>@@GITGUI_TKEXECUTABLE@@</string>
-       <key>CFBundleGetInfoString</key>
-       <string>Git Gui @@GITGUI_VERSION@@ © 2006-2007 Shawn Pearce, et. al.</string>
-       <key>CFBundleIconFile</key>
-       <string>git-gui.icns</string>
-       <key>CFBundleIdentifier</key>
-       <string>cz.or.repo.git-gui</string>
-       <key>CFBundleInfoDictionaryVersion</key>
-       <string>6.0</string>
-       <key>CFBundleName</key>
-       <string>Git Gui</string>
-       <key>CFBundlePackageType</key>
-       <string>APPL</string>
-       <key>CFBundleShortVersionString</key>
-       <string>@@GITGUI_VERSION@@</string>
-       <key>CFBundleSignature</key>
-       <string>GITg</string>
-       <key>CFBundleVersion</key>
-       <string>@@GITGUI_VERSION@@</string>
-       <key>NSHighResolutionCapable</key>
-       <true/>
-</dict>
-</plist>
diff --git a/macosx/git-gui.icns b/macosx/git-gui.icns
deleted file mode 100644 (file)
index 77d88a7..0000000
Binary files a/macosx/git-gui.icns and /dev/null differ
index cdae85e4b9dce71bbc8bfa2437af4aa47eca419d..1cedc823dec1f09d5104a0a2d71b1e346c2f4776 100644 (file)
@@ -19,17 +19,6 @@ build_options_config.set_quoted('GITGUI_LIBDIR', get_option('prefix') / get_opti
 build_options_config.set_quoted('SHELL_PATH', fs.as_posix(shell.full_path()))
 build_options_config.set_quoted('TCLTK_PATH', fs.as_posix(wish.full_path()))
 build_options_config.set_quoted('TCL_PATH', fs.as_posix(tclsh.full_path()))
-if target_machine.system() == 'darwin'
-  tkexecutables = [
-    '/Library/Frameworks/Tk.framework/Resources/Wish.app/Contents/MacOS/Wish',
-    '/System/Library/Frameworks/Tk.framework/Resources/Wish.app/Contents/MacOS/Wish',
-    '/System/Library/Frameworks/Tk.framework/Resources/Wish Shell.app/Contents/MacOS/Wish Shell',
-  ]
-  tkexecutable = find_program(tkexecutables)
-  build_options_config.set_quoted('TKEXECUTABLE', tkexecutable.full_path())
-else
-  build_options_config.set('TKEXECUTABLE', '')
-endif
 
 build_options = configure_file(
   input: 'GIT-GUI-BUILD-OPTIONS.in',
@@ -70,52 +59,6 @@ if target_machine.system() == 'windows'
     install: true,
     install_dir: get_option('libexecdir') / 'git-core',
   )
-elif target_machine.system() == 'darwin'
-  gitgui_main = 'git-gui.tcl'
-  gitgui_main_install_dir = get_option('datadir') / 'git-gui/lib'
-
-  custom_target(
-    output: 'git-gui',
-    command: [
-      shell,
-      meson.current_source_dir() / 'generate-macos-wrapper.sh',
-      '@OUTPUT@',
-      meson.current_build_dir() / 'GIT-GUI-BUILD-OPTIONS',
-      meson.current_build_dir() / 'GIT-VERSION-FILE',
-    ],
-    depends: [
-      version_file,
-    ],
-    depend_files: [
-      build_options,
-    ],
-    install: true,
-    install_dir: get_option('libexecdir') / 'git-core',
-  )
-
-  custom_target(
-    output: 'Git Gui.app',
-    command: [
-      shell,
-      meson.current_source_dir() / 'generate-macos-app.sh',
-      meson.current_source_dir(),
-      meson.current_build_dir() / 'Git Gui.app',
-      meson.current_build_dir() / 'GIT-GUI-BUILD-OPTIONS',
-      meson.current_build_dir() / 'GIT-VERSION-FILE',
-    ],
-    depends: [
-      version_file,
-    ],
-    depend_files: [
-      build_options,
-      'macosx/AppMain.tcl',
-      'macosx/Info.plist',
-      'macosx/git-gui.icns',
-    ],
-    build_by_default: true,
-    install: true,
-    install_dir: get_option('datadir') / 'git-gui/lib',
-  )
 endif
 
 custom_target(