From 43d3f01a2ffeefa5e5cc7fb2ac4497be2473c54d Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 20 Jan 2017 00:07:48 -0800 Subject: [PATCH] add .rc files for windows dll versioning BUG=webp:323 Change-Id: Id415a32b63618d39af2e599cec0d40f64c35bbce --- Makefile.vc | 17 ++++++++++++++-- src/demux/libwebpdemux.rc | 41 +++++++++++++++++++++++++++++++++++++++ src/libwebp.rc | 41 +++++++++++++++++++++++++++++++++++++++ src/libwebpdecoder.rc | 41 +++++++++++++++++++++++++++++++++++++++ src/mux/libwebpmux.rc | 41 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 179 insertions(+), 2 deletions(-) create mode 100644 src/demux/libwebpdemux.rc create mode 100644 src/libwebp.rc create mode 100644 src/libwebpdecoder.rc create mode 100644 src/mux/libwebpmux.rc diff --git a/Makefile.vc b/Makefile.vc index 7401b441..e0d833e3 100644 --- a/Makefile.vc +++ b/Makefile.vc @@ -37,6 +37,8 @@ LNKDLL = link.exe /DLL $(NOLOGO) LNKEXE = link.exe $(NOLOGO) LNKLIB = lib.exe $(NOLOGO) MT = mt.exe $(NOLOGO) +RCNODBG = rc.exe $(NOLOGO) /l"0x0409" # 0x409 = U.S. English +RCDEBUG = $(RCNODBG) /D_DEBUG !IF "$(ARCH)" == "ARM" CFLAGS = $(CFLAGS) /DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP /DWEBP_USE_THREAD @@ -101,9 +103,11 @@ LIBWEBPMUX_BASENAME = $(LIBWEBPMUX_BASENAME)_debug LIBWEBPDEMUX_BASENAME = $(LIBWEBPDEMUX_BASENAME)_debug !ELSE IF "$(CFG)" == "release-dynamic" CC = $(CCNODBG) +RC = $(RCNODBG) DLLBUILD = TRUE !ELSE IF "$(CFG)" == "debug-dynamic" CC = $(CCDEBUG) +RC = $(RCDEBUG) RTLIB = $(RTLIBD) DLLBUILD = TRUE LIBWEBPDECODER_BASENAME = $(LIBWEBPDECODER_BASENAME)_debug @@ -398,8 +402,17 @@ $(LIBWEBP_OBJS) $(LIBWEBPMUX_OBJS) $(LIBWEBPDEMUX_OBJS): \ {$(DIROBJ)}.c{$(DIROBJ)}.obj: $(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$@ $< -$(LIBWEBPMUX): $(LIBWEBP) -$(LIBWEBPDEMUX): $(LIBWEBP) +{src}.rc{$(DIROBJ)}.res: + $(RC) /fo$@ $< +{src\demux}.rc{$(DIROBJ)\demux}.res: + $(RC) /fo$@ $< +{src\mux}.rc{$(DIROBJ)\mux}.res: + $(RC) /fo$@ $< + +$(LIBWEBP): $(DIROBJ)\$(LIBWEBP_BASENAME).res +$(LIBWEBPDECODER): $(DIROBJ)\$(LIBWEBPDECODER_BASENAME).res +$(LIBWEBPMUX): $(LIBWEBP) $(DIROBJ)\mux\$(LIBWEBPMUX_BASENAME).res +$(LIBWEBPDEMUX): $(LIBWEBP) $(DIROBJ)\demux\$(LIBWEBPDEMUX_BASENAME).res $(LIBWEBPDECODER) $(LIBWEBP) $(LIBWEBPMUX) $(LIBWEBPDEMUX): $(LNKDLL) /out:$(DIRBIN)\$(@B:_dll=.dll) /implib:$@ $(LFLAGS) $** diff --git a/src/demux/libwebpdemux.rc b/src/demux/libwebpdemux.rc new file mode 100644 index 00000000..03abd8c6 --- /dev/null +++ b/src/demux/libwebpdemux.rc @@ -0,0 +1,41 @@ +#define APSTUDIO_READONLY_SYMBOLS +#include "winres.h" +#undef APSTUDIO_READONLY_SYMBOLS + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,3,0,1 + PRODUCTVERSION 0,3,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "Google, Inc." + VALUE "FileDescription", "libwebpdemux DLL" + VALUE "FileVersion", "0.3.1" + VALUE "InternalName", "libwebpdemux.dll" + VALUE "LegalCopyright", "Copyright (C) 2017" + VALUE "OriginalFilename", "libwebpdemux.dll" + VALUE "ProductName", "WebP Image Demuxer" + VALUE "ProductVersion", "0.3.1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // English (United States) resources diff --git a/src/libwebp.rc b/src/libwebp.rc new file mode 100644 index 00000000..5c0e21db --- /dev/null +++ b/src/libwebp.rc @@ -0,0 +1,41 @@ +#define APSTUDIO_READONLY_SYMBOLS +#include "winres.h" +#undef APSTUDIO_READONLY_SYMBOLS + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,5,0,2 + PRODUCTVERSION 0,5,0,2 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "Google, Inc." + VALUE "FileDescription", "libwebp DLL" + VALUE "FileVersion", "0.5.2" + VALUE "InternalName", "libwebp.dll" + VALUE "LegalCopyright", "Copyright (C) 2017" + VALUE "OriginalFilename", "libwebp.dll" + VALUE "ProductName", "WebP Image Codec" + VALUE "ProductVersion", "0.5.2" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // English (United States) resources diff --git a/src/libwebpdecoder.rc b/src/libwebpdecoder.rc new file mode 100644 index 00000000..40f8f8b5 --- /dev/null +++ b/src/libwebpdecoder.rc @@ -0,0 +1,41 @@ +#define APSTUDIO_READONLY_SYMBOLS +#include "winres.h" +#undef APSTUDIO_READONLY_SYMBOLS + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,5,0,2 + PRODUCTVERSION 0,5,0,2 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "Google, Inc." + VALUE "FileDescription", "libwebpdecoder DLL" + VALUE "FileVersion", "0.5.2" + VALUE "InternalName", "libwebpdecoder.dll" + VALUE "LegalCopyright", "Copyright (C) 2017" + VALUE "OriginalFilename", "libwebpdecoder.dll" + VALUE "ProductName", "WebP Image Decoder" + VALUE "ProductVersion", "0.5.2" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // English (United States) resources diff --git a/src/mux/libwebpmux.rc b/src/mux/libwebpmux.rc new file mode 100644 index 00000000..c2389915 --- /dev/null +++ b/src/mux/libwebpmux.rc @@ -0,0 +1,41 @@ +#define APSTUDIO_READONLY_SYMBOLS +#include "winres.h" +#undef APSTUDIO_READONLY_SYMBOLS + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,3,0,2 + PRODUCTVERSION 0,3,0,2 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "Google, Inc." + VALUE "FileDescription", "libwebpmux DLL" + VALUE "FileVersion", "0.3.2" + VALUE "InternalName", "libwebpmux.dll" + VALUE "LegalCopyright", "Copyright (C) 2017" + VALUE "OriginalFilename", "libwebpmux.dll" + VALUE "ProductName", "WebP Image Muxer" + VALUE "ProductVersion", "0.3.2" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // English (United States) resources