Skip to content

Commit

Permalink
mingw: include the full version information in the resources
Browse files Browse the repository at this point in the history
This fixes git-for-windows#723

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Apr 19, 2016
1 parent d23e811 commit 21d44fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1783,9 +1783,14 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES
$(QUIET_GEN)$(cmd_munge_script) && \
mv $@+ $@

ifeq (,$(findstring .windows.,$(GIT_VERSION)))
RC_VERSION_DEFS := $(join -DMAJOR= -DMINOR= -DMICRO=, $(wordlist 1,3,$(subst -, ,$(subst ., ,$(subst .windows., ,$(GIT_VERSION)))))) -DPATCHLEVEL=0
else
RC_VERSION_DEFS := $(join -DMAJOR= -DMINOR= -DMICRO= -DPATCHLEVEL=, $(wordlist 1,4,$(subst -, ,$(subst ., ,$(subst .windows., ,$(GIT_VERSION))))))
endif

git.res: git.rc GIT-VERSION-FILE GIT-PREFIX
$(QUIET_RC)$(RC) \
$(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
$(QUIET_RC)$(RC) $(RC_VERSION_DEFS) \
-DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@

# This makes sure we depend on the NO_PERL setting itself.
Expand Down
4 changes: 2 additions & 2 deletions git.rc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
1 VERSIONINFO
FILEVERSION MAJOR,MINOR,0,0
PRODUCTVERSION MAJOR,MINOR,0,0
FILEVERSION MAJOR,MINOR,MICRO,PATCHLEVEL
PRODUCTVERSION MAJOR,MINOR,MICRO,PATCHLEVEL
BEGIN
BLOCK "StringFileInfo"
BEGIN
Expand Down

0 comments on commit 21d44fe

Please sign in to comment.