How: Programmatically update version and release code.

Got a problem you cannot solve? Try here.
Thona
Posts: 23
Joined: Tue Dec 20, 2005 6:58 am

How: Programmatically update version and release code.

Postby Thona » Fri Feb 10, 2006 2:19 am

Playing with the program I find a problem for which I did not find the documentation yet. MAybe a hint is helpfull.

I need to update the version information and generate a new release code of a product programmatically, WITHOUT building it.

Reason: We use full version control over all of our files. Rule is: EVERY build must be reproducable. That includes having all ressources in version control. Our build script runs a preaparation phase for every build. During this, the sources are prepared for a new build, then checked in, and then labelled in source control. I need to update the internal build number during this step, and get a new release code assigned. SADLY the .mpr file is not a XML format (hey, that MAY be an idea - I have no clue what you use as programming language, but there propably is a good xml serializer for that), so I can not use XML to just update fields. I also miss methods for this in the automation API.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Fri Feb 10, 2006 8:22 am

Hi Thona,

If you want to update the code of an already built product, that will be difficult.

If, on the other hand, you want to update the code of a project file - that is easier. While the MPR files are not XML, they are "open" text files. You may freely modify the exact locations in the text files which correspond to the fields you are interested in, and save the remainder of the file untouched. Those file "slots" will remain unchanged in future versions...

...until we move to XML, at least :)
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Thona
Posts: 23
Joined: Tue Dec 20, 2005 6:58 am

Postby Thona » Fri Feb 10, 2006 9:32 am

No, not of an already build file.

Point is that I want all changes in the files to happen in the build preparation phase, not during build execution. And they should then go into source control.

For example, I can now put your files under source control (ok, you do not support it, but that is irrelevant - I just check in the directory).

I can also put /r behind the command line and put a new version number in through the command line.

Bad thing here: These changes are then not in source control. That is not wanted.

So, I look for a way to assign a new Guid and change the version before biuild during my install phase.

If, on the other hand, you want to update the code of a project file - that is easier. While the MPR files are not XML, they are "open" text files. You may freely modify the exact locations in the text files which correspond to the fields you are interested in, and save the remainder of the file untouched. Those file "slots" will remain unchanged in future versions...


I looked at the project format and I found it to be pretty disastrous. I mean, that is "every line a setting", and only the line number defines what it does, right? Ouch. Ok, I will look to write a tool that updates the file with a new verison number and a new release Guid :-)

What gaurantees do I have that the line numbers stay the same? I mean, they are not documented and not used anywhere. I suggest you at least move to an key=value type of form (ini file). Or to Xml directly :-) Some point at 5.2 or 6.0.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Fri Feb 10, 2006 11:44 am

You are right the project files would benefit from a move to XML! We're working on it. In the meantime, we have been using this format since the first version of InstallAware, it has never changed. Lines are added to the end - but starting lines are never changed. That is a guarantee.

Until we move to XML, that is :)
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 39 guests