update Win32 ressource with Makefile

This commit is contained in:
Thomas Bernard 2018-06-27 21:34:00 +02:00
parent a81e0c1fb1
commit d5d518864f
2 changed files with 15 additions and 8 deletions

View File

@ -42,7 +42,7 @@ ifeq (true,$(shell git rev-parse --is-inside-work-tree))
GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
endif
ifneq (master,$(GIT_BRANCH))
GIT_REVISION := "$(GIT_REVISION)-$(GIT_BRANCH)"
GIT_REVISION := $(GIT_REVISION)-$(GIT_BRANCH)
endif
else
# outside git repository : get version stored in version.c
@ -824,8 +824,11 @@ depend :
$(CC) -MM *.c | sed 's:^[^ ]:$$(OBJDIR)/&:' > Makefile.dep
# Link the icons to the program under windows
$(OBJDIR)/winres.o : gfx2.ico
echo "1 ICON \"gfx2.ico\"" | $(WINDRES) -o $(OBJDIR)/winres.o
$(OBJDIR)/winres.o : gfx2.rc gfx2.ico $(REVISION_CACHE)
sed -e 's/\(VERSION [ ]*\([0-9]*,\)\{3\}\)\(.*\)/\1$(firstword $(subst -, ,$(GIT_REVISION)))/' \
-e 's/\(Version", "\([0-9]*\.\)\{2\}\)\(.*\)"/\1$(GIT_REVISION)"/' $< > $<.tmp
if ! diff -q -i $< $<.tmp ; then mv $<.tmp $< ; else rm $<.tmp ; fi
$(WINDRES) -i $< -o $(OBJDIR)/winres.o
# Compile the C++ file needed in Haiku to use the API
$(OBJDIR)/haiku.o : haiku.cpp

View File

@ -1,8 +1,12 @@
#ifdef _MSC_VER
#include <VerRsrc.h>
#else
#define VS_FF_DEBUG 0x00000001L
#endif
1 VERSIONINFO
FILEVERSION 2,5,0,1943
PRODUCTVERSION 2,5,0,1943
FILEVERSION 2,5,0,2047
PRODUCTVERSION 2,5,0,2047
FILEFLAGSMASK VS_FF_DEBUG
#ifdef DEBUG
FILEFLAGS VS_FF_DEBUG
@ -16,12 +20,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "The GrafX2 Team"
VALUE "FileDescription", "The ultimate 256-color painting programm"
VALUE "FileVersion", "2.5.1943"
VALUE "FileVersion", "2.5.2047"
VALUE "InternalName", "grafx2"
VALUE "LegalCopyright", "(c) 2007-2018 The GrafX2 Team, (c) 1996-2001 Sunset Design"
VALUE "OriginalFilename", "grafx2.exe"
VALUE "ProductName", "GrafX2"
VALUE "ProductVersion", "2.5.1943"
VALUE "ProductVersion", "2.5.2047"
END
END
BLOCK "VarFileInfo"
@ -30,4 +34,4 @@ BEGIN
END
END
100 ICON "gfx2.ico"
100 ICON "gfx2.ico"