Page 1 of 1

New Version/Revision - automated

Posted: Thu Sep 05, 2024 3:41 am
by anja_laenge
Hi,

We have a setup that is created automatically by calling miabuild.exe with the appropriate parameters. Works great.
Now there is a new requirement and there should be an additional setup creation method: also script-driven, but a new version should be generated with a version number provided by the script.
For it to be a new version, the setup needs a new revision guid.
Both pieces of information are stored in the .mpr file and can be edited by the script.

At this point my problem is: I see the corresponding information when I look at the file, but there is no identifier like in an .ini file, the line number does not seem to remain constant when changes are made to the setup.
Is it safe to replace old with new version number and old with new revision guid or is there a unique and safe way to do thiss? Using the InstallAware UI is not an option here.
Is there a file format description available?

Kind regards
Anja

Re: New Version/Revision - automated

Posted: Thu Sep 05, 2024 8:33 am
by JohnGaver
This topic applies to InstallAware Multi Platform as well.

This command line build parameter for mia(x)build:

Code: Select all

/r          Generate new revision code

And using Compiler Variables for your software version:

Code: Select all

[COMPILERVAR1=VALUE1 ... COMPILERVARN=VALUEN]

Should take care of it!

Re: New Version/Revision - automated

Posted: Tue Sep 10, 2024 2:52 am
by anja_laenge
Hello John,

this works very well, thank you.

Is there a way to keep track of the generated revision code?
I could do this by running a powershell script in postbuild to retrieve the values from the msi database but if a build-in way is available I'd prefer to use that.

kind regards
Anja

Re: New Version/Revision - automated

Posted: Wed Sep 11, 2024 6:12 pm
by JohnGaver
Not really, the revision code isn't consumed anywhere else, unlike the product code.

Do you have a need for the revision code which we have failed to anticipate?

Re: New Version/Revision - automated

Posted: Thu Sep 12, 2024 2:54 am
by anja_laenge
Hello John,

no problem;
since the code is no longer persisted in the .mpr we will not be able to use the same method for logging of the results as in other projects but injecting a script call in the post-build should work as well.

kind regards
Anja

Re: New Version/Revision - automated

Posted: Thu Sep 12, 2024 9:56 am
by JohnGaver
Can you describe in a little more detail the logging you are trying to do?

The command line build tool will already report the success/failure of the build process.

The product code is used to query whether the product is currently installed (or not).

Where exactly are you trying to consume the revision code?