Skip to content

Commit d9956f8

Browse files
committed
Merge branch 'resource-version'
This topic branch increases the precision of the version recorded in the resources of the .exe files from major/minor to include also the micro version and the patch level. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents 3dd8c48 + a26cc8d commit d9956f8

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
@@ -1784,9 +1784,14 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES
17841784
$(QUIET_GEN)$(cmd_munge_script) && \
17851785
mv $@+ $@
17861786

1787+
ifeq (,$(findstring .windows.,$(GIT_VERSION)))
1788+
RC_VERSION_DEFS := $(join -DMAJOR= -DMINOR= -DMICRO=, $(wordlist 1,3,$(subst -, ,$(subst ., ,$(subst .windows., ,$(GIT_VERSION)))))) -DPATCHLEVEL=0
1789+
else
1790+
RC_VERSION_DEFS := $(join -DMAJOR= -DMINOR= -DMICRO= -DPATCHLEVEL=, $(wordlist 1,4,$(subst -, ,$(subst ., ,$(subst .windows., ,$(GIT_VERSION))))))
1791+
endif
1792+
17871793
git.res: git.rc GIT-VERSION-FILE GIT-PREFIX
1788-
$(QUIET_RC)$(RC) \
1789-
$(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
1794+
$(QUIET_RC)$(RC) $(RC_VERSION_DEFS) \
17901795
-DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
17911796

17921797
# 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)