Automate Advanced Installer with Ant

Having trouble running Advanced Installer? Got a bug to report? Post it all here.

Automate Advanced Installer with Ant

Postby mchristianson » Thu Jan 29, 2009 7:47 pm

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://blog.christiansons.net/2009/01/a ... -with-ant/

If anyone has other Ant scripts or tricks, I'd love to know about them.
mchristianson
 
Posts: 11
Joined: Sat Jan 10, 2009 1:43 am
Location: Phoenix, AZ, USA

Re: Automate Advanced Installer with Ant

Postby cosmin » Fri Jan 30, 2009 12:35 pm

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
http://www.advancedinstaller.com/
cosmin
 
Posts: 4985
Joined: Tue Jul 10, 2007 6:39 pm

Re: Automate Advanced Installer with Ant

Postby mchristianson » Mon Feb 02, 2009 8:28 pm

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?
mchristianson
 
Posts: 11
Joined: Sat Jan 10, 2009 1:43 am
Location: Phoenix, AZ, USA

Re: Automate Advanced Installer with Ant

Postby Kallex » Mon Feb 02, 2009 11:34 pm

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
Kallex
 
Posts: 19
Joined: Thu Aug 07, 2008 4:11 pm

Re: Automate Advanced Installer with Ant

Postby cosmin » Tue Feb 03, 2009 10:43 am

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
http://www.advancedinstaller.com/
cosmin
 
Posts: 4985
Joined: Tue Jul 10, 2007 6:39 pm

Re: Automate Advanced Installer with Ant

Postby Kallex » Tue Feb 03, 2009 1:36 pm

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
Kallex
 
Posts: 19
Joined: Thu Aug 07, 2008 4:11 pm

Re: Automate Advanced Installer with Ant

Postby mchristianson » Tue Feb 03, 2009 11:00 pm

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.
mchristianson
 
Posts: 11
Joined: Sat Jan 10, 2009 1:43 am
Location: Phoenix, AZ, USA


Return to Common Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests