summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rwxr-xr-xgit-gui.sh6
-rw-r--r--macosx/AppMain.tcl7
3 files changed, 13 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index cde8b2e..4f00bdd 100644
--- a/Makefile
+++ b/Makefile
@@ -177,7 +177,8 @@ git-gui: GIT-VERSION-FILE GIT-GUI-VARS
echo then >>$@+ && \
echo ' 'echo \'git-gui version '$(GITGUI_VERSION)'\' >>$@+ && \
echo else >>$@+ && \
- echo ' 'exec \''$(libdir_SQ)/Git Gui.app/Contents/MacOS/$(subst \,,$(TKEXECUTABLE))'\' \
+ echo ' libdir="$${GIT_GUI_LIB_DIR:-$(libdir_SQ)}"' >>$@+ && \
+ echo ' 'exec \"'$$libdir/Git Gui.app/Contents/MacOS/$(subst \,,$(TKEXECUTABLE))'\" \
'"$$0" "$$@"' >>$@+ && \
echo fi >>$@+ && \
chmod +x $@+ && \
diff --git a/git-gui.sh b/git-gui.sh
index b186329..6cbb36e 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -49,7 +49,11 @@ catch {rename send {}} ; # What an evil concept...
##
## locate our library
-set oguilib {@@GITGUI_LIBDIR@@}
+if { [info exists ::env(GIT_GUI_LIB_DIR) ] } {
+ set oguilib $::env(GIT_GUI_LIB_DIR)
+} else {
+ set oguilib {@@GITGUI_LIBDIR@@}
+}
set oguirel {@@GITGUI_RELATIVE@@}
if {$oguirel eq {1}} {
set oguilib [file dirname [file normalize $argv0]]
diff --git a/macosx/AppMain.tcl b/macosx/AppMain.tcl
index 738bdd0..b6c6dc3 100644
--- a/macosx/AppMain.tcl
+++ b/macosx/AppMain.tcl
@@ -1,5 +1,10 @@
set gitexecdir {@@gitexecdir@@}
-set gitguilib {@@GITGUI_LIBDIR@@}
+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} {