mchristianson
Posts: 19
Joined: Sat Jan 10, 2009 1:43 am
Location: Phoenix, USA
Contact: Website

Automate Advanced Installer with Ant

I've written a short post about how I use Ant to automate Advanced Installer builds. I based my Ant script on the AI user guide; I hope others find my addition useful.

http://codeaweso.me/2009/01/automate-ad ... -with-ant/

If anyone has other Ant scripts or tricks, I'd love to know about them.
Last edited by mchristianson on Fri Aug 10, 2012 12:04 am, edited 2 times in total.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Automate Advanced Installer with Ant

Hi,
I've written a short post about how I use Ant to automate Advanced Installer builds. I based my Ant script on the AI user guide; I hope others find my addition useful.
Cool, thank you. I noticed that you are using the "-noprodcode" parameter for the "/SetVersion" command. This is recommended only when creating patches (the target and upgraded packages need to have the same Product Code). However, it is not recommended when using the automated upgrade feature (major upgrades).

I also noticed that the version pattern does not use the year. This is recommended so that the version does not get reseted when the year passes.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mchristianson
Posts: 19
Joined: Sat Jan 10, 2009 1:43 am
Location: Phoenix, USA
Contact: Website

Re: Automate Advanced Installer with Ant

Hi Cosmin,

Thanks for pointing out my use of "-noprodcode." I do this in order to "ensure that only one version of the product can be installed on the computer." In order to keep things closer to normal usage, I will remove "-noprodcode" from my blog post. Perhaps I should reconsider my own use of it...

The lack of a year in the version number is not a problem for us. Our dated installers are for daily builds which are never released. But, do you have any suggestions on how to fit the year into the version number format?
Kallex
Posts: 25
Joined: Thu Aug 07, 2008 4:11 pm

Re: Automate Advanced Installer with Ant

Hi!

We built in-house solution to get ever-increasing build numbers for the build number portion beyond major number. It is based on accuracy of one minute from some-odd date of year 2000, and it lasts somewhere around 2031 or something like that.

We didn't find any cleaner way to implement it, but this way we do get the automatic increments and upgrading installations without the need of trying to find out what the earlier build number exactly was.


Br,

Kalle
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Automate Advanced Installer with Ant

Hi Kalle,
mchristianson wrote:But, do you have any suggestions on how to fit the year into the version number format?
Since the version format has restrictions, you can try using another script to convert the current date and time to a valid version (something similar to what Kalle suggested). Another approach would be to use the "-increment" parameter for the "/SetVersion" command (it will increment the existing version automatically).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Kallex
Posts: 25
Joined: Thu Aug 07, 2008 4:11 pm

Re: Automate Advanced Installer with Ant

Hi Cosmin!

That's indeed a nice feature. That's something we may be using on some cases, however it does require checkout/checkin for each build to VCS to be accurate on multiple building environments, and to avoid constant modification on the AI project, we chose to have "dynamic" autoincrementer.

For the major version we use the .NET assembly information to get it per-product specific way, of course this major version number could come from any source.

Br,

Kalle
mchristianson
Posts: 19
Joined: Sat Jan 10, 2009 1:43 am
Location: Phoenix, USA
Contact: Website

Re: Automate Advanced Installer with Ant

Thanks, Kalle, that's an interesting approach. I think I will keep our current date-version scheme since only a glance is required to determine the build date. :lol:

We, too, had problems with constantly modified .aip files. I cannot count the number of times our build broke due to conflicts on the version xml element alone.

Return to “Common Problems”