Status & Roadmap
Authors & License
Funding Ultimate++
Search on this site
Search in forums

SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Versioning support utility
Versioning support utility [message #35383] Wed, 08 February 2012 22:44
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Recently I needed versioning support for my project which became large enough. After some googling I was unable to find good universal and crossplatform solution, so I decided to write one myself.

So I present a little utility called VerUpdate which does the thing. Let's say you have a project with a number of files containing version string. It may be .rc file or .cpp files.

Let's say you have a Silos.cpp file with some string containing name + version: "Silos;" where *.*.5 is incremental subversion number for your current version 3.1 and *.*.*.277 is a total build number since your first build. And you have more general name in the same file with the string: "Silos-master 3.1.5;"
No problem! Just edit VerUpdate.config:
				<item>Silos ##*.*.c.C##;</item>
				<item>Silos-master ##*.*.c##;</item>

Formatters supported are:
* - any user version
c - incremental counter for current version
C - incremental counter (total)
d - days since current version was created
D - days since project was created

d and D are very convenient ways to autoincrement on daily basis, not on per compile.

If you change your "user" version in ANY place in your project files (from VerUpdate.config), the utility automatically updates all other files to the new versions and will clear per-version counters automatically.

"User" version may not be completely digital. It may contain any symbols. Utility supports per-project configuration (updating only selected projects is run by enumerating them in command line).

The utility is intended to be used on pre-link (or pre-compile? don't know how to make it) stage in TheIDE.

The utility was not thoroughly tested, it is still in development but seems to be fully functional.
The source code, the binary and the sample config is attached.

P.S. Yes, XML config seems to be little overwhelming here. I'll use JSON-style config as soon as Mirek embeds completed Jsonize code to U++ Wink

Any comments, critics and suggestions are welcome!
  • Attachment: VerUpdate.zip
    (Size: 524.75KB, Downloaded 254 times)

[Updated on: Wed, 08 February 2012 23:56]

Report message to a moderator

Previous Topic: debugging MSC10x64 or MSC9x64
Next Topic: Disappearing menus and other weird MinGW stuff
Goto Forum:

Current Time: Sat Sep 25 08:22:42 CEST 2021

Total time taken to generate the page: 0.03175 seconds