From 0a2623269ff2996c453667a4abc12fbbbf2194b1 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Wed, 23 Nov 2011 10:41:01 +0100 Subject: [PATCH 1/7] Makefile: Do not use OLD_ICONV on MINGW anymore We are building libiconv now the same way as upstream MinGW does, so we do not need OLD_ICONV anymore when compiling Git either in msysGit or mingwGitDevEnv. Signed-off-by: Sebastian Schuberth --- config.mak.uname | 1 - 1 file changed, 1 deletion(-) diff --git a/config.mak.uname b/config.mak.uname index 174703b67c..11af5984cd 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -481,7 +481,6 @@ ifneq (,$(findstring MINGW,$(uname_S))) NO_FNMATCH = YesPlease NO_MEMMEM = YesPlease NEEDS_LIBICONV = YesPlease - OLD_ICONV = YesPlease NO_STRTOUMAX = YesPlease NO_MKDTEMP = YesPlease NO_MKSTEMPS = YesPlease From ca35487192c449dc0b22a46af4ec75914a8d4383 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 5 Jan 2012 16:41:41 -0600 Subject: [PATCH 2/7] Define NO_GETTEXT for Git for Windows The dreaded "your vnsprintf is broken (returned -1)" error is back. At least with the libintl version we have. So for the moment, just work around the issue by _not_ using gettext. Ah, I wish that my attempt at implementing a custom strbuf_vaddf() would not have been brushed aside so rashly. Oh well. Time saved on maintaining that thing, I guess (although more time went into working around coping with existing implementations). Signed-off-by: Johannes Schindelin --- config.mak.uname | 1 + 1 file changed, 1 insertion(+) diff --git a/config.mak.uname b/config.mak.uname index 11af5984cd..e90ad12f90 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -518,6 +518,7 @@ ifneq (,$(wildcard ../THIS_IS_MSYSGIT)) NO_R_TO_GCC_LINKER = YesPlease INTERNAL_QSORT = YesPlease HAVE_LIBCHARSET_H = YesPlease + NO_GETTEXT = YesPlease else NO_CURL = YesPlease endif From fb99070303e8e8af4438c0bad76d459af80d3bba Mon Sep 17 00:00:00 2001 From: Pierre le Riche Date: Mon, 28 May 2012 09:46:54 +0200 Subject: [PATCH 3/7] msysgit: Add the --large-address-aware linker directive to the makefile. This has the effect of increasing the address space from 2GB to 4GB under 64-bit Windows, reducing the likelihood of an "out of memory" error when e.g. repacking a large repository. The test suite passes with this patch, with and without the MEM_TOP_DOWN flag added to all VirtualAlloc calls. While this is no guarantee that there are no issues with large memory support (it could break Git on other setups than mine, for example), it at least increases the chance that nothing obvious goes wrong (such as errors introduced by faulty sign extension, say, with ssize_t). [PT: Resolves github issue #12] Signed-off-by: Pierre le Riche Signed-off-by: Pat Thoyts --- config.mak.uname | 1 + 1 file changed, 1 insertion(+) diff --git a/config.mak.uname b/config.mak.uname index e90ad12f90..c5518fe330 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -505,6 +505,7 @@ ifneq (,$(findstring MINGW,$(uname_S))) COMPAT_OBJS += compat/mingw.o compat/winansi.o \ compat/win32/pthread.o compat/win32/syslog.o \ compat/win32/dirent.o + BASIC_LDFLAGS += -Wl,--large-address-aware EXTLIBS += -lws2_32 PTHREAD_LIBS = NATIVE_CRLF = YesPlease From ce39c2e04ced177747d02de83f61989dcbcca44e Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Thu, 24 May 2012 00:56:24 +0100 Subject: [PATCH 4/7] Provide a Windows version resource for the git executables. Embeds the git version and description into the git executable thus implementing the request in issue #5. Acked-by: Heiko Voigt Acked-by: Sebastian Schuberth Acked-by: Johannes Schindelin Signed-off-by: Pat Thoyts --- .gitignore | 1 + Makefile | 8 +++++++- config.mak.uname | 2 ++ git.rc | 22 ++++++++++++++++++++++ 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 git.rc diff --git a/.gitignore b/.gitignore index 10aee94760..1640c3ad00 100644 --- a/.gitignore +++ b/.gitignore @@ -229,6 +229,7 @@ /cscope* *.obj *.lib +*.res *.sln *.suo *.ncb diff --git a/Makefile b/Makefile index 985598b014..7ba8640e18 100644 --- a/Makefile +++ b/Makefile @@ -1529,6 +1529,7 @@ ifndef V QUIET_MSGFMT = @echo ' ' MSGFMT $@; QUIET_GCOV = @echo ' ' GCOV $@; QUIET_SP = @echo ' ' SP $<; + QUIET_RC = @echo ' ' RC $@; QUIET_SUBDIR0 = +@subdir= QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \ $(MAKE) $(PRINT_DIR) -C $$subdir @@ -1774,6 +1775,11 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES $(QUIET_GEN)$(cmd_munge_script) && \ mv $@+ $@ +git.res: git.rc + $(QUIET_RC)$(RC) \ + $(join -DMAJOR= -DMINOR= -DPATCH=, $(wordlist 1,3,$(subst ., ,$(GIT_VERSION)))) \ + -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@ + ifndef NO_PERL $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak @@ -2474,7 +2480,7 @@ profile-clean: $(RM) $(addsuffix *.gcno,$(addprefix $(PROFILE_DIR)/, $(object_dirs))) clean: profile-clean coverage-clean - $(RM) *.o block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o vcs-svn/*.o \ + $(RM) *.o *.res block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o vcs-svn/*.o \ builtin/*.o $(LIB_FILE) $(XDIFF_LIB) $(VCSSVN_LIB) $(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X $(RM) $(TEST_PROGRAMS) diff --git a/config.mak.uname b/config.mak.uname index c5518fe330..04b97486a2 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -507,7 +507,9 @@ ifneq (,$(findstring MINGW,$(uname_S))) compat/win32/dirent.o BASIC_LDFLAGS += -Wl,--large-address-aware EXTLIBS += -lws2_32 + GITLIBS += git.res PTHREAD_LIBS = + RC = windres -O coff NATIVE_CRLF = YesPlease X = .exe SPARSE_FLAGS = -Wno-one-bit-signed-bitfield diff --git a/git.rc b/git.rc new file mode 100644 index 0000000000..bce6db96a3 --- /dev/null +++ b/git.rc @@ -0,0 +1,22 @@ +1 VERSIONINFO +FILEVERSION MAJOR,MINOR,PATCH,0 +PRODUCTVERSION MAJOR,MINOR,PATCH,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" /* LANG_ENGLISH/SUBLANG_ENGLISH_US, Unicode CP */ + BEGIN + VALUE "CompanyName", "The Git Development Community\0" + VALUE "FileDescription", "Git for Windows\0" + VALUE "InternalName", "git\0" + VALUE "OriginalFilename", "git.exe\0" + VALUE "ProductName", "Git\0" + VALUE "ProductVersion", GIT_VERSION "\0" + END + END + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END From 2be50eae75ef1d6c83a0546ebe7309f368b5824f Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 31 May 2012 12:53:45 -0500 Subject: [PATCH 5/7] Windows resource: handle dashes in the Git version gracefully Reported by postiffm as issue #14. Signed-off-by: Johannes Schindelin --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7ba8640e18..2f7a4f3674 100644 --- a/Makefile +++ b/Makefile @@ -1777,7 +1777,7 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES git.res: git.rc $(QUIET_RC)$(RC) \ - $(join -DMAJOR= -DMINOR= -DPATCH=, $(wordlist 1,3,$(subst ., ,$(GIT_VERSION)))) \ + $(join -DMAJOR= -DMINOR= -DPATCH=, $(wordlist 1,3,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \ -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@ ifndef NO_PERL From bbc284d6ecaa1974c142e95272e866287694ca17 Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Fri, 1 Jun 2012 23:29:33 +0100 Subject: [PATCH 6/7] Ensure the resource file is rebuilt when the version changes. Acked-by: Erik Faye-Lund Acked-by: Johannes Schindelin Signed-off-by: Pat Thoyts --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2f7a4f3674..a163a75b4e 100644 --- a/Makefile +++ b/Makefile @@ -1775,7 +1775,7 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES $(QUIET_GEN)$(cmd_munge_script) && \ mv $@+ $@ -git.res: git.rc +git.res: git.rc GIT-VERSION-FILE $(QUIET_RC)$(RC) \ $(join -DMAJOR= -DMINOR= -DPATCH=, $(wordlist 1,3,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \ -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@ From 65db0443710f59a1c05a85688cdccc215ff48333 Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Thu, 21 Jun 2012 12:24:14 +0100 Subject: [PATCH 7/7] Set the default help format to html for msys builds. This resolves issue #19 by setting the compiled default to html in msys builds following the changes introduced by commit 1cc8af0 "help: use HTML as the default help format on Windows" Signed-off-by: Pat Thoyts --- config.mak.uname | 1 + 1 file changed, 1 insertion(+) diff --git a/config.mak.uname b/config.mak.uname index 04b97486a2..5354007588 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -500,6 +500,7 @@ ifneq (,$(findstring MINGW,$(uname_S))) NO_INET_PTON = YesPlease NO_INET_NTOP = YesPlease NO_POSIX_GOODIES = UnfortunatelyYes + DEFAULT_HELP_FORMAT = html COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/win32 COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" COMPAT_OBJS += compat/mingw.o compat/winansi.o \