Thread: Dealing with application automated versioning

  1. #1
    #define WORLD "sad place" LinuxCoder's Avatar
    Join Date
    Mar 2006
    Location
    Portugal
    Posts
    89

    Dealing with application automated versioning

    Hi everyone,

    I'm a hobbyist C++ coder mostly on Linux systems. Recently i developed a really small personal application and i wanted to see if i could get some automated version numberings in the app. At this moment i keep editing the VERSION.h file that i have created for that sole purpose but it's not actually good practice as it can happen that i forget to edit that file and all is broken. Does anyone here have any custom/special workflow for achieving this? I wanted to have some versioning in the lines of MajorVersion.MinorVersion.BuildNumber or so. Please share what tools/workflows you use for achieving this.

    Thanks to everyone for their time and help in advance. Cheers

  2. #2
    Registered User
    Join Date
    Sep 2004
    Posts
    197
    most of the time I have seen the version set in a configure.h file that simply #defines it. Its still edited by hand though some where. Normally though that is only done periodicly, not with every change.
    If any part of my post is incorrect, please correct me.

    This post is not guarantied to be correct, and is not to be taken as a matter of fact, but of opinion or a guess, unless otherwise noted.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    A simple perl script will update a file for you, as part of some make rule.

    This is easy for the build number, but you need to decide for yourself when to update major.minor.

    Compiling in __DATE__ and __TIME__ along with a version control system (say rcs or cvs) allows you to accurately see from the object files what is in the code and when it was built.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    #define WORLD "sad place" LinuxCoder's Avatar
    Join Date
    Mar 2006
    Location
    Portugal
    Posts
    89
    thank you for your posts ppl,

    in the end i am thinking about writting a small c++ app for doing all the version stuff i want done. After all it's easier to write such a thing myself since i know exactly what i want the app to do and what options i need implemented.

    Cheers

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Cleanup of the application...
    By Petike in forum Windows Programming
    Replies: 1
    Last Post: 08-16-2008, 05:23 PM
  2. Problem with com application
    By amardon in forum C++ Programming
    Replies: 3
    Last Post: 10-06-2005, 05:50 AM
  3. MFC run application by clicking on file...
    By dug in forum Windows Programming
    Replies: 4
    Last Post: 12-02-2004, 04:33 AM
  4. Win application not very portable
    By swed in forum Windows Programming
    Replies: 5
    Last Post: 10-01-2001, 11:17 AM