BuildCount Add-In

Here is an add-in module for Developer Studio which automatically creates and modifies the file "AutoBuildCount.h" that contains a macros with a build count values. The file can be inserted into your current project. 

For example, if your project is on build 6, the contents of the file look like this:

// 6
#ifndef AUTOBUILDCOUNT_H
#define AUTOBUILDCOUNT_H
#define BUILDCOUNT_NUM 6
#define BUILDCOUNT_STR "6"
#endif

At the next build, the content will be updated to:


// 7
#ifndef AUTOBUILDCOUNT_H
#define AUTOBUILDCOUNT_H
#define BUILDCOUNT_NUM 7
#define BUILDCOUNT_STR "7"
#endif

You can use the macros BUILDCOUNT_NUM and/or BUILDCOUNT_STR in the code to refer to the automatically generated build number. For example, to use the build number in your about box, you could use the macro as follows:

#include "AutoBuildCount.h"

//...

CAboutDlg::CAboutDlg()
{
    m_strBuild.Format(_T("Build %d"), BFCBUILDCOUNT_NUM);
}

Installation:

  1. Copy the file BuildCount.dll to a local folder (DevStudio\SharedIDE\AddIns if the preferred folder).
  2. At the Developer Studio, choose Customize from the Tools menu.
  3. Select Browse from the Add-ins and Macro Files page.
  4. Select 'Add-ins (.dll)' from the 'Files of type' combo-box.
  5. Select the BuildCount.dll from its folder and click on Open.

Recent Updates/Fixes

1. MSDEV has a failure when exiting.
2. GPF when the file AutoBuildCount.h is read-only.

Download File - 11.7KB



Comments

  • how to stop file modified out of source editor ?

    Posted by Legacy on 10/18/2000 12:00am

    Originally posted by: lee

    how do i stop it showing this message every time i recompile, because the autobuildcount.h has been updated ?

    thanks
    lee.

    Reply
  • source please

    Posted by Legacy on 05/25/2000 12:00am

    Originally posted by: Mike McCanney

    Where can I get the source for this?

    Reply
  • Inaccurate build number using more than one project in one workspace

    Posted by Legacy on 04/18/2000 12:00am

    Originally posted by: J�rg Schlingmann

    Hi there,

    I' m using a workspace containing more than 120 projects.
    If I compile only one project everything works fine. (I accept the buildcount increasing 2)
    Rebuilding the whole workspace causes increasing the buildcount number of the currently active project
    > 120 times not increasing any other buildcount number.
    Does anyone know a workaround? (VC++ 5.0 Servicepack 3, NT4 Servicepack 5)

    J�rg


    Reply
  • Increment only for release builds

    Posted by Legacy on 01/19/2000 12:00am

    Originally posted by: Gene Koesling

    To increment only during release builds it should work 
    
    if you just wrap the include in a preprocessor if test:

    #ifndef _DEBUG
    #include "AutoBuildCount.h"
    #endif//_DEBUG

    Reply
  • Nice, but big feature needed...

    Posted by Legacy on 09/10/1999 12:00am

    Originally posted by: Thelonious Georgia

    Hi, as DevStudio knows when a build did not complete due to an error, it would be nice if somehow the build number could 'unwind', as it wasn't really a build in the first place.

    Reply
  • Source Again

    Posted by Legacy on 08/02/1999 12:00am

    Originally posted by: Paul Hartness

    Having the source for this would be good. I'd like to have a version of this that would only increment for release builds also some method of synchronising these numbers in a multi-user environment. Maybe by having a global network location for AutoBuildCount.h which had counts for different projects.

    Reply
  • Unicode/MBCS Support + Release/Debug

    Posted by Legacy on 07/29/1999 12:00am

    Originally posted by: Victor Boctor

    I think this is a very nice add-on. The only comments I have are:

    1. The header file should have two counters one for the release and one for the debug. The one that is to be incremented should depend on the current configuration. However, the current constants should map to one of them according to the definition of the _DEBUG preprocessor. By this we will have a separate counter for the debug and another for the release.

    2. For the string, I think the macro _T should be used so that the compilation would work ok with normal, unicode, and MBCS.

    Thanks!

    Reply
  • Great Job! .. Feature Request

    Posted by Legacy on 06/16/1999 12:00am

    Originally posted by: David Berman

    Thank you very much for making this add-in. You did
    a great job.

    It seems that the file AutoBuildCount.h must be in
    the same directory as the project file. It would
    be nice if we could put that file wherever we wanted
    to and add it to the project. If the plugin scans
    the project and found the specified location of
    this header, it should use that file instead of
    creating a new one.

    Thanks again.

    David

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Instead of only managing projects organizations do need to manage value! "Doing the right things" and "doing things right" are the essential ingredients for successful software and systems delivery. Unfortunately, with distributed delivery spanning multiple disciplines, geographies and time zones, many organizations struggle with teams working in silos, broken lines of communication, lack of collaboration, inadequate traceability, and poor project visibility. This often results in organizations "doing the …

  • With JRebel, developers get to see their code changes immediately, fine-tune their code with incremental changes, debug, explore and deploy their code with ease (both locally and remotely), and ultimately spend more time coding instead of waiting for the dreaded application redeploy to finish. Every time a developer tests a code change it takes minutes to build and deploy the application. JRebel keeps the app server running at all times, so testing is instantaneous and interactive.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds