delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/12/04/20:48:16

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-developers-unsubscribe-archive-cygwin-developers=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Message-Id: <199912050148.TAA01139@mercury.xraylith.wisc.edu>
To: Chris Faylor <cgf AT cygnus DOT com>
cc: Geoffrey Noer <noer AT cygnus DOT com>, cygwin-developers AT sourceware DOT cygnus DOT com
Subject: Re: Good suggestion from the Net...
In-Reply-To: Your message of "Sat, 04 Dec 1999 20:09:54 EST."
<19991204200954 DOT A9717 AT cygnus DOT com>
Date: Sat, 04 Dec 1999 19:48:00 -0600
From: Mumit Khan <khan AT nanotech DOT wisc DOT edu>

Chris Faylor <cgf AT cygnus DOT com> writes:
> 
> I'm confused.  How does this differ from mkvers.sh?  What kind of
> version information is being looked for that is not already in
> cygwin1.dll?  Are you talking about adding something in the version
> fields of the DLL itself?

Windows installers and various other tools look inside of the file 
for version resource, and can use that for example not to overwrite 
a newer version and so on.

You can look at the version resource with the explorer as well (except
for the w95 original, which needed a fix): right click on the dll, 
pick properties and then select the version tab (which only exists
if there is a version resource defined).

> FWIW, the command "grep '%% ' cygwin1.dll" should display all sorts of
> interesting stuff.  Adding this to cygcheck is one of those round tuit
> type of things.

Here's my current copy of cygwin_dll.rc (if you want it, I'll post the
makefile additions as well). I'd like to generate it automatically to
include the build date as well, but we can always pass that from the
Makefile as a macro.

=== CUT FROM HERE

  #include <winver.h>
  #include <cygwin/version.h>

  #define STRINGIFY1(x)   #x
  #define STRINGIFY(x)    STRINGIFY1(x)

  #define CYGWIN_VERSION \
    STRINGIFY(CYGWIN_VERSION_DLL_MAJOR) "." \
    STRINGIFY(CYGWIN_VERSION_DLL_MINOR)
  #define CYGWIN_DLL_NAME "cygwin1.dll"

  VS_VERSION_INFO VERSIONINFO
    FILEVERSION    CYGWIN_VERSION_DLL_MAJOR,CYGWIN_VERSION_DLL_MINOR,0,0
    PRODUCTVERSION CYGWIN_VERSION_DLL_MAJOR,CYGWIN_VERSION_DLL_MINOR,0,0
    FILEFLAGSMASK  0x3fL
  #ifdef DEBUGGING
    FILEFLAGS      VS_FF_DEBUG
  #else
    FILEFLAGS      0x0L
  #endif
    FILEOS         VOS__WINDOWS32
    FILETYPE       VFT_DLL
    FILESUBTYPE    0x0L
  BEGIN
    BLOCK "StringFileInfo"
    BEGIN
      BLOCK "040904B0"
      BEGIN
	VALUE "CompanyName", "Cygnus Solutions"
	VALUE "FileDescription", "Cygwin\256 POSIX Emulation DLL"
	VALUE "FileVersion", CYGWIN_VERSION
	VALUE "InternalName", CYGWIN_DLL_NAME
	VALUE "LegalCopyright", "Copyright \251 Cygnus Solutions. 1996-1999"
	VALUE "OriginalFilename", CYGWIN_DLL_NAME
	VALUE "ProductName", "Cygwin"
	VALUE "ProductVersion", CYGWIN_VERSION
      END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
  END

======================= END

Regards,
Mumit

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019