Difference between revisions of "AutoVersioning plugin"
Line 74: | Line 74: | ||
===Output of version.h=== | ===Output of version.h=== | ||
+ | <pre> | ||
#ifndef VERSION_H | #ifndef VERSION_H | ||
#define VERSION_H | #define VERSION_H | ||
Line 103: | Line 104: | ||
} | } | ||
#endif //VERSION_h | #endif //VERSION_h | ||
+ | </pre> |
Revision as of 20:38, 15 September 2007
Developer(s): | JGM |
Maintainer(s): | JGM |
Version: | 0.7 |
Introduction
The idea of the Auto Versioning plugin was made during the development of a pre-alpha software that required the version info and status. Been to busy coding, without time to maintain the version number, just decided to develop a plugin that could do all this with little intervention as possible.
Summary:
Auto increments the version and build number of your application every time a change has been made and stores it in version.h with easy to use variable declarations. Also have a feature for committing changes a la SVN style, a version scheme editor and a change log generator.
Features
Here is the list of features the plugin covers:
- Generates and auto increment version variables
- Software status editor
- Integrated scheme editor for changing the behavior of the auto incrementation of version values
- Date declarations as month, date and year
- Ubuntu style version
- Svn revision check
- Change log generator.
Sources
Usually source and news about new releases are posted on the Code::Blocks forums on the plugins development section. You can access this plugin topic over [/index.php/topic,6294.msg48225.html#msg48225 here], recent sources are attached on the first post (you have to be logged in to download attachments on the forum.
The plugin also have a project page at www.berlios.de. The link is http://developer.berlios.de/projects/autoversioning/. Submit all features request and bugs on the project page.
Svn check out: svn://svn.berlios.de/autoversioning/trunk
Using it
After downloading the sources, compiling them and installing the plugin to Code::Blocks just go to the Project->Auto Versioning menu. A pop up window like this will appear:
When hitting yes on the ask to configure message box the main autoversioning configuration dialog will open. To let you configure the version info of your project. Each editable control has a tool tip with information that explains you its features, so if you put the mouse on the control the tool tip will pop up. Below is a screenshot showing all the tabs:
Version Values:
Here you just enter the corresponding version values or let the autoversioning plugin increment them by himself.
- Major - Increments by 1 when the minor version reaches its maximun
- Minor - Increments by one when the build number pass the barrier of build times, the the value is reset to 0 when it reach its maximun value.
- Build Number (also equivalent to Release) - Increments by one every time that the revision number is incremented.
- Revision - Increment randomly when the project has been modified and then compiled.
Status:
Some fields to keep track of your software status with predefined values for convenience.
- Software Status - The typical example should be v1.0 Alpha
- Abbreviation - Same as software status but like this v1.0a
Scheme:
Let you edit how the plugin will increment the version values.
- Minor maximun
- Build Number maximun
- Revision maximun
- Revision random maximun
- Build times before incrementing Minor
Settings:
- Autoincrement Major and Minor - lets the plugin increments this values by you using the scheme
- Create date declarations - create entries in the version.h file with dates and ubuntu style version.
- Commit Changes - to increment the changes manually when you feel that is the right moment, just using the menu Project->Commit Changes.
- Ask to commit changes - if marked Commit Changes it ask you before compilation (if changes has been made) to increment the version values.
- svn enabled - search for the svn revision and in the current folder and generates the correct entries in version.h
Changes Log This lets you enter every change made to the project to generate a CHANGES.txt file
- Title Format - a formatable title with a list of predefined values.
Including in your code
To use the variables generated by the plugin just #include <version.h> an example line of code would be like the following: cout<<AutoVersion::Major<<endl;
Output of version.h
#ifndef VERSION_H #define VERSION_H namespace AutoVersion{ //Date Version Types static char DATE[] = "15"; static char MONTH[] = "09"; static char YEAR[] = "2007"; static double UBUNTU_VERSION_STYLE = 7.09; //Software Status static char STATUS[] = "Pre-alpha"; static char STATUS_SHORT[] = "pa"; //Standard Version Type static long MAJOR = 0; static long MINOR = 10; static long BUILD = 1086; static long REVISION = 6349; //Miscellaneous Version Types static long BUILDS_COUNT = 1984; #define RC_FILEVERSION 0,10,1086,6349 #define RC_FILEVERSION_STRING "0, 10, 1086, 6349\0" static char FULLVERSION_STRING[] = "0.10.1086.6349"; } #endif //VERSION_h