From: "Shawn O. Pearce" <spearce@spearce.org>
To: "Jurko Gospodnetić" <jurko.gospodnetic@docte.hr>
Cc: git@vger.kernel.org
Subject: Re: git-gui not working in a non-default Cygwin installation.
Date: Fri, 22 Feb 2008 01:46:42 -0500 [thread overview]
Message-ID: <20080222064642.GD8410@spearce.org> (raw)
In-Reply-To: <20080217080255.GQ24004@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> wrote:
> Jurko Gospodneti <jurko.gospodnetic@docte.hr> wrote:
> >
> > One of these is that it seems that with the latest git release the
> > git-gui script changed and started hardcoding some absolute paths in it
> > during its build (git-gui/Makefile replaces @@GITGUI_SCRIPT@@ with a
> > hardcoded path). However, this causes the prebuilt Cygwin package to not
> > work in case Cygwin is not installed in its default location at
> > C:\Cygwin (e.g. D:\Cygwin or C:\Program Files\Cygwin).
...
> I'll have to figure out on Cygwin if the $TCL_PATH I'm using is
> able to resolve Cygwin absolute paths or not, and then build the
> script accordingly. Fun.
>
> I'll try to work up a Makefile patch in the next few days and get
> it into a gitgui-0.9.3 maint release, which will probably roll up
> into git 1.5.4.3.
So it took me longer than "next few days" but there is now a
two patch series in my maint branch that resolves this issue.
If git-gui is built with a Tcl/Tk that understands Cygwin path
translations it keeps the library path in POSIX format, but if it
builds with a Tcl/Tk that is a native Win32 binary then it uses
cygpath to translate the path.
Although now that I think about it the relative path case should
be able to be enabled again in the native Win32 codepath, as we
only ran into problems with it on Cygwin.
Anyway, it will be in gitgui-0.9.3, which I expect will be bundled
into git 1.5.4.3, which Junio has stated may be next week.
--8<--
diff --git a/Makefile b/Makefile
index 081d755..01e0a46 100644
--- a/Makefile
+++ b/Makefile
@@ -92,8 +92,12 @@ ifndef V
REMOVE_F1 = && echo ' ' REMOVE `basename "$$dst"` && $(RM_RF) "$$dst"
endif
-TCL_PATH ?= tclsh
TCLTK_PATH ?= wish
+ifeq (./,$(dir $(TCLTK_PATH)))
+ TCL_PATH ?= $(subst wish,tclsh,$(TCLTK_PATH))
+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
@@ -127,7 +131,17 @@ GITGUI_MACOSXAPP :=
ifeq ($(uname_O),Cygwin)
GITGUI_SCRIPT := `cygpath --windows --absolute "$(GITGUI_SCRIPT)"`
- gg_libdir_sed_in := $(shell cygpath --windows --absolute "$(gg_libdir)")
+
+ # Is this a Cygwin Tcl/Tk binary? If so it knows how to do
+ # POSIX path translation just like cygpath does and we must
+ # keep libdir in POSIX format so Cygwin packages of git-gui
+ # work no matter where the user installs them.
+ #
+ ifeq ($(shell echo 'puts [file normalize /]' | '$(TCL_PATH_SQ)'),$(shell cygpath --mixed --absolute /))
+ gg_libdir_sed_in := $(gg_libdir)
+ else
+ gg_libdir_sed_in := $(shell cygpath --windows --absolute "$(gg_libdir)")
+ endif
else
ifeq ($(exedir),$(gg_libdir))
GITGUI_RELATIVE := 1
--
Shawn.
prev parent reply other threads:[~2008-02-22 6:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-16 1:48 git-gui not working in a non-default Cygwin installation Jurko Gospodnetić
2008-02-17 8:02 ` Shawn O. Pearce
2008-02-17 11:25 ` Jurko Gospodnetić
2008-02-17 13:39 ` Brian Dessent
2008-02-22 6:46 ` Shawn O. Pearce [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080222064642.GD8410@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=jurko.gospodnetic@docte.hr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).