Skip to content

Commit

Permalink
Merge branch 'resource-version'
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
dscho committed Apr 19, 2016
2 parents d23e811 + 21d44fe commit ded00db
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 ded00db

Please sign in to comment.