Skip to content

Commit

Permalink
Windows file version components are 16-bit only. Our new version numb…
Browse files Browse the repository at this point in the history
…er (e.g. 20160623035) is too large for a single version component. Fix this by using all four components like this: 2016.6.23.315 Note that we ignore leading zeros because this would put us from decimal into the octal world in FILEVERSION. Yes, there is also the FILEVERSIONSTRING but this is apparently not used.

Thanks Tim (F.) for the help with the sed tool.
  • Loading branch information
marceltaeumel committed Jun 24, 2016
1 parent da3fafd commit 09048e7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build.win32x86/common/Makefile
Expand Up @@ -183,8 +183,11 @@ OBJCOPY:= objcopy
# Note: RC compiles the .rc files into linkable .o files
#
RC:= windres
SVNREV:= $(shell sed -e "s/^static.*GitRawRevisionString.*Rev: \([0-9][0-9]*\).*/\\1/p" -e d $(PLATDIR)/Cross/vm/sqSCCSVersion.h)
RCFLAGS:= --include-dir $(PLATDIR)/win32/misc -D_WIN32 -DFILEVERSIONVALUES=4,0,$(SVNREV),0 '-DFILEVERSIONSTRING=\"4.0.$(SVNREV)\\0\"'
SVNMAJOR := $(shell sed -e "s/^static.*GitRawRevisionString.*Rev: \([0-9][0-9][0-9][0-9]\).*/\\1/p" -e d $(PLATDIR)/Cross/vm/sqSCCSVersion.h | sed -e 's/^0*//')
SVNMINOR := $(shell sed -e "s/^static.*GitRawRevisionString.*Rev: [0-9][0-9][0-9][0-9]\([0-9][0-9]\).*/\\1/p" -e "s/^0*//" -e d $(PLATDIR)/Cross/vm/sqSCCSVersion.h | sed -e 's/^0*//')
SVNREV := $(shell sed -e "s/^static.*GitRawRevisionString.*Rev: [0-9][0-9][0-9][0-9][0-9][0-9]\([0-9][0-9]\).*/\\1/p" -e "s/^0*//" -e d $(PLATDIR)/Cross/vm/sqSCCSVersion.h | sed -e 's/^0*//')
SVNBUILD := $(shell sed -e "s/^static.*GitRawRevisionString.*Rev: [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\([0-9][0-9]*\).*/\\1/p" -e "s/^0*//" -e d $(PLATDIR)/Cross/vm/sqSCCSVersion.h | sed -e 's/^0*//')
RCFLAGS:= --include-dir $(PLATDIR)/win32/misc -D_WIN32 -DFILEVERSIONVALUES=$(SVNMAJOR),$(SVNMINOR),$(SVNREV),$(SVNBUILD) '-DFILEVERSIONSTRING=\"$(SVNMAJOR).$(SVNMINOR).$(SVNREV).$(SVNBUILD)\\0\"'

.SUFFIXES:
.SUFFIXES: .ccg .cc .c .o .s .i .rc .res .cg .hg .ccg .cpp
Expand Down

0 comments on commit 09048e7

Please sign in to comment.