Click here to Skip to main content
15,891,529 members
Articles / Desktop Programming / MFC
Article

Increment Private Build Number

Rate me:
Please Sign up or sign in to vote.
3.00/5 (2 votes)
8 Feb 2000 81.9K   1K   24   8
An add-in to automatically increment the PrivateBuild field in your applications resource file.
  • Download source files - 34 Kb
  • Many times you have to distinguish between two executable versions of the same file, and not only by version number. As all know, the version descriptor from the resource file contains a lot of fields: CompanyName, FileDescription, Files Version, and so on. Following these fields is the SpecialBuild field. I made this Add-In to increments this number. I found it very useful, the sources are free, and you can easy improve it to personalize one (or more) of the version resource descriptors.

    The Add-In has to be activated from the Add-In Manager in Developer Studio.

    How does this work? When you are in the current project, and call the Build (Rebuild) commands the Add-In increments the number found on SpecialBuild and saves it.

    It is not a big stuff but is still useful.

    License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here


    Written By
    Software Developer Exontrol
    Romania Romania
    This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

    Comments and Discussions

     
    GeneralNewer version Pin
    Jordan Walters29-Nov-04 22:01
    Jordan Walters29-Nov-04 22:01 
    GeneralRe: Newer version Pin
    Mihai Filimon30-Nov-04 1:53
    Mihai Filimon30-Nov-04 1:53 
    GeneralNew Version Pin
    Jordan Walters14-Oct-04 10:42
    Jordan Walters14-Oct-04 10:42 
    I have upgraded this (hope the original author doesn't mind).
    I have added in the fix for active project suggested by James Curran and the multi-version fix suggested by Gerolf Kuehnel.

    But more importantly, I was not willing to put up with DevStudio message about the resource file needing to be reloaded, as pointed out by Brian Shifrin and added support so that it will look in the rc2 file (in the res directory) first for the VERSIONINFO block(s). If it doesn't find the version stuff there it looks in the rc file as normal.
    This allows you to move the VERSIONINFO stuff to the rc2 file to avoid the annoying pop-ups. But for those who can't be bothered, the increment will still work on the rc file.

    The biggest change though is as a result of the comment made by Laurence Zaysser who said that the PrivateBuild and SpecialBuild fields are meant for comment text. So instead the increment takes place on the last digit of the FileVersion and ProductVersion fields.

    I have the new version available for anyone who's interested. Hopefully the original author will contact me so that he will update his article and post my fixes, to maintain the continuity.

    If I don't hear from hear, I will eventually submit this code in an article of my own.

    To get the new version, email me at: jordan dot walters at teleca dot com

    Jordan

    Ashes to Ashes,
    DOS to DOS
    GeneralBatch Build or Dependencies Pin
    19-Nov-01 11:13
    suss19-Nov-01 11:13 
    GeneralAn other small bug Pin
    Gerolf Reinwardt10-Jul-01 0:31
    Gerolf Reinwardt10-Jul-01 0:31 
    GeneralIncrement Private Build Number Pin
    18-Jan-01 1:57
    suss18-Jan-01 1:57 
    GeneralSuggestion Pin
    Brian V. Shifrin16-Feb-00 1:10
    sussBrian V. Shifrin16-Feb-00 1:10 
    GeneralSmall Bug found.... Pin
    James Curran10-Feb-00 6:09
    James Curran10-Feb-00 6:09 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.