Re: [PATCH] git-gui: add mingw specific startup wrapper
- From
Steffen Prohaska <prohaska@zib.de>
- Date
- Oct 10, 2007, 06:55 UTC
- Message-ID
- <8F81028C-9924-4AA2-A58D-961AD10F5315@zib.de>
- In-Reply-To
- <20071010062218.GP2137@spearce.org>
On Oct 10, 2007, at 8:22 AM, Shawn O. Pearce wrote:
Show 15 quoted lines
> Steffen Prohaska <prohaska@zib.de> wrote: > >> diff --git a/git-gui/Makefile b/git-gui/Makefile >> @@ -128,6 +128,7 @@ ifeq ($(uname_S),Darwin) >> endif >> ifneq (,$(findstring MINGW,$(uname_S))) >> NO_MSGFMT=1 >> + GITGUI_WINDOWS_WRAPPER := YesPlease >> endif > > I don't have this context in my Makefile so I can't apply this > additional line here. Can someone package up the patch that > introduces the MINGW case above with a proper commit message, > so I can apply it in front of this patch? >
You need the patch "git-gui: set NO_MSGFMT to force using pure tcl replacement in msysgit" that I'll send in a follow-up mail. Apologies for forgetting about that.
Show 18 quoted lines
>> install: all >> @@ -246,6 +257,9 @@ 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 >> +ifdef GITGUI_WINDOWS_WRAPPER >> + $(QUIET)$(INSTALL_X0)git-gui.tcl $(INSTALL_X1) '$(DESTDIR_SQ)$ >> (libdir_SQ)' >> +endif >> $(QUIET)$(foreach p,$(ALL_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 > > I think you missed the entry in the uninstall and clean targets.
fixed.
Show 16 quoted lines
>> diff --git a/git-gui/windows/git-gui.sh b/git-gui/windows/git-gui.sh
>> @@ -0,0 +1,16 @@
>> +#!/bin/sh
>> +# Tcl ignores the next line -*- tcl -*- \
>> +exec wish "$0" -- "$@"
>> +
>> +if { $argc >=2 && [lindex $argv 0] == "--working-dir" } {
>> + cd [lindex $argv 1]
>> + set argv [lrange $argv 2 end]
>> + incr argc -2
>> +}
>
> Maybe we should just support this option directly in git-gui.
> Today we also support doing something like this by setting the
> GIT_DIR environment variable into a non-bare repository; see the
> "# repository setup" block of git-gui.sh.would definitely be easier. It is an option that can be useful in general. I'll not take care of this right away.
Show 11 quoted lines
>> +set gitguidir [file dirname [info script]] >> +regsub -all ";" $gitguidir "\\;" gitguidir >> +set env(PATH) "$gitguidir;$env(PATH)" >> +unset gitguidir >> + >> +source [file join [file dirname [info script]] git-gui.tcl] > > Hmmph. The install target was going into libdir but the above > source doesn't seem to read from there, its loading from the same > location as the git-gui wrapper script. You msys guys probably > don't have $(libdir) == $(gitexecdir), do you?
Thanks for spotting that. I decided to put git-gui.tcl into $(gitexecdir) with permissions 644.
A series of two patches will follow.
Steffen