From c03f15e89dc228f90c0c82f1be41987367a4faa4 Mon Sep 17 00:00:00 2001 From: inikep Date: Wed, 14 Sep 2016 16:16:24 +0200 Subject: [PATCH] zstd.exe has FileVersion and ProductVersion with 32-bit gcc (MinGW) --- .travis.yml | 6 +++--- programs/Makefile | 10 ++++++++-- .../zstd/{ => generate_res}/generate_res.bat | 2 +- projects/VS2010/zstd/{ => generate_res}/verrsrc.h | 0 projects/VS2010/zstd/generate_res/zstd32.res | Bin 0 -> 948 bytes .../zstd/{zstd.res => generate_res/zstd64.res} | Bin 6 files changed, 12 insertions(+), 6 deletions(-) rename projects/VS2010/zstd/{ => generate_res}/generate_res.bat (72%) rename projects/VS2010/zstd/{ => generate_res}/verrsrc.h (100%) create mode 100644 projects/VS2010/zstd/generate_res/zstd32.res rename projects/VS2010/zstd/{zstd.res => generate_res/zstd64.res} (100%) diff --git a/.travis.yml b/.travis.yml index 4e47ab1c..80cae76f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,9 @@ compiler: gcc matrix: fast_finish: true include: + # OS X Mavericks + - os: osx + env: PLATFORM="OS X Mavericks" CMD="make gnu90test && make clean && make test && make clean && make travis-install" # Container-based Ubuntu 12.04 LTS Server Edition 64 bit (doesn't support 32-bit includes) - os: linux sudo: false @@ -92,9 +95,6 @@ matrix: - gcc-5-multilib - gcc-6 - gcc-6-multilib - # OS X Mavericks - - os: osx - env: PLATFORM="OS X Mavericks" CMD="make gnu90test && make clean && make test && make clean && make travis-install" exclude: - compiler: gcc diff --git a/programs/Makefile b/programs/Makefile index ccd282c9..76130fe5 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -57,7 +57,13 @@ endif ifneq (,$(filter Windows%,$(OS))) EXT =.exe VOID = nul -RES_FILE = ..\projects\VS2010\zstd\zstd.res +RES64_FILE = ..\projects\VS2010\zstd\generate_res\zstd64.res +RES32_FILE = ..\projects\VS2010\zstd\generate_res\zstd32.res +ifneq (,$(filter x86_64%,$(shell $(CC) -dumpmachine))) + RES_FILE = $(RES64_FILE) +else + RES_FILE = $(RES32_FILE) +endif else EXT = VOID = /dev/null @@ -83,7 +89,7 @@ zstd : $(ZSTDDECOMP_O) $(ZSTD_FILES) $(ZSTDLEGACY_FILES) $(ZDICT_FILES) \ zstd32 : $(ZSTDDECOMP32_O) $(ZSTD_FILES) $(ZSTDLEGACY_FILES) $(ZDICT_FILES) \ zstdcli.c fileio.c bench.c datagen.c dibio.c - $(CC) -m32 $(FLAGS) -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT) $^ -o $@$(EXT) + $(CC) -m32 $(FLAGS) -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT) $^ $(RES32_FILE) -o $@$(EXT) zstd_nolegacy : diff --git a/projects/VS2010/zstd/generate_res.bat b/projects/VS2010/zstd/generate_res/generate_res.bat similarity index 72% rename from projects/VS2010/zstd/generate_res.bat rename to projects/VS2010/zstd/generate_res/generate_res.bat index 4dfa075f..b552dcc3 100644 --- a/projects/VS2010/zstd/generate_res.bat +++ b/projects/VS2010/zstd/generate_res/generate_res.bat @@ -1,3 +1,3 @@ REM http://stackoverflow.com/questions/708238/how-do-i-add-an-icon-to-a-mingw-gcc-compiled-executable REM copy "c:\Program Files (x86)\Windows Kits\8.1\Include\um\verrsrc.h" . -windres -I ..\..\..\lib -O coff -i zstd.rc -o zstd.res +windres -I ..\..\..\..\lib -O coff -I . -i ..\zstd.rc -o zstd.res diff --git a/projects/VS2010/zstd/verrsrc.h b/projects/VS2010/zstd/generate_res/verrsrc.h similarity index 100% rename from projects/VS2010/zstd/verrsrc.h rename to projects/VS2010/zstd/generate_res/verrsrc.h diff --git a/projects/VS2010/zstd/generate_res/zstd32.res b/projects/VS2010/zstd/generate_res/zstd32.res new file mode 100644 index 0000000000000000000000000000000000000000..362d9c22df2cd8fcfd98134449f1eff466c293e6 GIT binary patch literal 948 zcmZ{j(P|S>5QhIXOC{n(FTKn~1q&LIG>9z$i^gK1v_(rvds9QQNdxI7?5@z}%7^gU zXYd6C-^e!*znN^<#HO>HbLPzXXXc+dXODtFCO=BjTnmG0k|sU3&ZiD%E!6L5ZP^ z`yR}Vrs{&fgH4xRb3R6Wl>g~y0^vHKt3pJJ(aoIYy= zqXCE>BLZb-y*z*7anju1e8yBW@wl0;VP*1C8%w#*@kz*0{eaIXa zd(5K3nX~JIj&#c~iS-sadtEzvm20nIT+u_F zl=htCNgm&B(CS|F)^_vTSjV-gCvZK*ccQ+&(#dS){w}>fyVpK(5@x~9`nT%ye;1c~ u*v2Q|)tdi;Rq?W