[pubcookie-dev] Re: [auto-generating windows version files]

Jon Miner miner at doit.wisc.edu
Tue Nov 29 17:19:07 PST 2005


Well, I didn't get it done this weekend, but I got it done today.

What I've done is this:

   1) Created src/Win32/PubCookieFilter.h.in, from which
      src/Win32/PubCookieFilter.h is generated.  The only thing in the
      file that is changed is @PACKAGE_VERSION@ instead of the hard
      coded version string.

      This may not be the best thing, as there may be other code in that
      header file that will need to be changed on a machine that doesn't
      have the ability to run configure (ie, a Windows machine).
      Perhaps a better solution will be to move the definition of
      "Pubcookie_Version" (and rename it to PBC_ISAPI_VERSION or
      something) to pbc_version.h.in and undo generation of
      src/Win32/PubCookieFilter.h.  We'll see.

   2) Created src/Win32/PubCookieFilter.rc.in, from which
      src/Win32/PubCookieFilter.rc is generated by configure.  I
      substituted the PBC_VERSION_MAJOR, PBC_VERSION_MINOR and
      PBC_VERSION_PATCH for the first three digits in the "FILEVERSION"
      and "PRODUCTVERSION" (and "FileVersion" and "ProductVersion").
      
      I invented a "Build Number" for the fourth digit of those numbers,
      which is generated from the PBC_VERSION_TYPE (ie, beta1,
      pre-beta2, etc) by just stripping the non-numerics off.  If the
      result of stripping non-numerics is an empty string, it is set to
      0 (which means that "3.3.0 pre-beta2" is "3,3,0,2" and
      "3.3.0 final" is "3,3,0,0") which may be a problem, so we may want
      to make the default something crazy like 1000 (assuming that we
      will not have beta1000).

      The "Comments", as usual, contain "Pubcookie @PACKAGE_VERSION@".

Windows folks, please let me know if this doesn't work.  It seems like
it should, but I have no idea. :)

jon

* Jon Miner (miner at doit.wisc.edu) [051123 17:08]:
> OK.  I've got to head home tonight, but hopefully over the weekend I can
> make the changes and we can try it out.
> 
> jon
> 
> * Nathan Dors (dors at cac.washington.edu) [051123 16:39]:
> > I went in search of people to ask. But no one has tried to fiddle 
> > with .rc files outside of Visual Studio.
> > 
> > It looks and acts like a text file, and doesn't appear to have a 
> > checksum in it, so it doesn't surprise me that I can edit it in 
> > Notepad without Visual Studio complaining afterwards.
> > 
> > -Nathan
> > 
> > On Wed, 23 Nov 2005, Jon Miner wrote:
> > 
> > >Hmm...  I don't know how we would do that, since that file is edited by
> > >the Windows GUI, so I won't think we could just have a .in file and
> > >generate it..  The .h file is easy(er?) because it's not actually part
> > >of the runtime environment..
> > >
> > >I mean, theoretically, we just create a .in and reaplce the FILEVERSION,
> > >PRODUCTVERSION, Comments, FileVersion and ProductVersion ..  But I don't
> > >know what Windows will think of that. :)
> > >
> > >Is there a Windows guru around that has a any ideas?
> > >
> > >jon
> > >
> > >* Nathan Dors (dors at cac.washington.edu) [051123 14:15]:
> > >>It just hasn't been proposed. It would be handy.
> > >>
> > >>It would be even handier if it was possible (and safe!) to update
> > >>the version numbers in Win32/PubCookieFilter.rc. We normally have
> > >>to update the product and file version info for the dll by hand in
> > >>Visual Studio.
> > >>
> > >>-Nathan
> > >>
> > >>On Wed, 23 Nov 2005, Jon Miner wrote:
> > >>
> > >>>Is there any reason we don't have this file auto-generated from
> > >>>configure?
> > >>>
> > >>>jon
> > >>>
> > >>>* Nathan Dors (dors at cac.washington.edu) [051123 13:43]:
> > >>>>Update of /usr/local/cvsroot/webiso/pubcookie/src/Win32
> > >>>>In directory
> > >>>>webiso-cvs.cac.washington.edu:/var/tmp/cvs-serv2542/src/Win32
> > >>>>
> > >>>>Modified Files:
> > >>>>	PubCookieFilter.h
> > >>>>Log Message:
> > >>>>changed version numbers to 3.3.0 beta1
> > >
> > >-- 
> > >.Jonathan J. Miner------------------Division of Information Technology.
> > >|miner at doit.wisc.edu                 University Of Wisconsin - Madison|
> > >|608/262.9655                               Room 3146 Computer Science|
> > >`---------------------------------------------------------------------'
> > >
> > >What they need to teach in school is for people to think for themselves.
> > >:-)
> > >            -- Larry Wall in <199907010532.WAA12080 at kiev.wall.org>
> > >                                                            (296/718)
> > >
> 
> -- 
> .Jonathan J. Miner------------------Division of Information Technology.
> |miner at doit.wisc.edu                 University Of Wisconsin - Madison|
> |608/262.9655                               Room 3146 Computer Science|
> `---------------------------------------------------------------------'
> 
> Homer:  Hey, Flanders, it's no use praying.  I already did the same
>         thing, and we can't both win.
> Flanders: Actually, Simpson, we were praying that no one gets hurt.
>            Dead Putting Society
>                                                              (428/718)



> _______________________________________________
> pubcookie-dev mailing list
> pubcookie-dev at u.washington.edu
> http://mailman1.u.washington.edu/mailman/listinfo/pubcookie-dev


-- 
.Jonathan J. Miner------------------Division of Information Technology.
|miner at doit.wisc.edu                 University Of Wisconsin - Madison|
|608/262.9655                               Room 3146 Computer Science|
`---------------------------------------------------------------------'

Now, son, you don't want to drink beer.  That's for daddys, and kids
with fake IDs.
        -- Homer Simpson
           The Springfield Files
                                                             (498/718)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2132 bytes
Desc: not available
Url : http://mailman1.u.washington.edu/pipermail/pubcookie-dev/attachments/20051129/e60a0e34/smime-0001.bin


More information about the pubcookie-dev mailing list