Skip to content

Commit 0ed70fd

Browse files
committed
mingw: include the full version information in the resources
This fixes #723 Signed-off-by: Johannes Schindelin <[email protected]>
1 parent ffdf6cb commit 0ed70fd

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1828,9 +1828,14 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES
18281828
$(QUIET_GEN)$(cmd_munge_script) && \
18291829
mv $@+ $@
18301830

1831+
ifeq (,$(findstring .windows.,$(GIT_VERSION)))
1832+
RC_VERSION_DEFS := $(join -DMAJOR= -DMINOR= -DMICRO=, $(wordlist 1,3,$(subst -, ,$(subst ., ,$(subst .windows., ,$(GIT_VERSION)))))) -DPATCHLEVEL=0
1833+
else
1834+
RC_VERSION_DEFS := $(join -DMAJOR= -DMINOR= -DMICRO= -DPATCHLEVEL=, $(wordlist 1,4,$(subst -, ,$(subst ., ,$(subst .windows., ,$(GIT_VERSION))))))
1835+
endif
1836+
18311837
git.res: git.rc GIT-VERSION-FILE GIT-PREFIX
1832-
$(QUIET_RC)$(RC) \
1833-
$(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
1838+
$(QUIET_RC)$(RC) $(RC_VERSION_DEFS) \
18341839
-DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
18351840

18361841
# This makes sure we depend on the NO_PERL setting itself.

git.rc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
1 VERSIONINFO
2-
FILEVERSION MAJOR,MINOR,0,0
3-
PRODUCTVERSION MAJOR,MINOR,0,0
2+
FILEVERSION MAJOR,MINOR,MICRO,PATCHLEVEL
3+
PRODUCTVERSION MAJOR,MINOR,MICRO,PATCHLEVEL
44
BEGIN
55
BLOCK "StringFileInfo"
66
BEGIN

0 commit comments

Comments
 (0)