Macy
Posts: 18
Joined: Sun Nov 25, 2007 2:02 am

Updating prerequisites...

We have come to rely very heavily on software prerequisites. We often build shell installs that do nothing other than include a combination of prerequisites to other components that we have. We don't register these installs with Windows installer. This lets us install a base application plus a set of drivers that are specific to individual customers. Works great.

I would like to automate the build process, though. So, here is the scenario...

I create a shell install that has a prerequisite for another of our installs. I define the URL to the prerequisite (which is named based upon a version number), and browse to it locally to set the MD5 values, etc. Everything is good.

A week later, I update the prerequisite install. This means that I need to rebuild the shell install to point to the updated version specific url, and I need to browse to the local copy of the prerequisite to get the current size and MD5 value. I usually forget to to that, and my shell install gets a "file size error" on the found prerequisite.

I could live with keeping the URL of the prerequisite always the same, but it sure is nice to embed the version number in the URL. But, even if I did keep the URL the same, the MD5 and size values will change.

My question: Is there a way to automate the build of the shell project to automatically update the size and MD5 value of the prerequisites? I guess the prerequisite definition would have to point to a local file, from which the value can be updated, and that's not part of the prerequisite definition, is it :(

If I wanted to write my own application to edit these values automatically in a batch build process, can you point to a doc on how to calculate the MD5 value?

I guess I could turn of the size check, too. That's probably an easier way to go, isn't it.
hmxchooch
Posts: 24
Joined: Tue Apr 07, 2009 6:55 pm

Re: Updating prerequisites...

I do a lot of manual updating of the .aip file for our build system that does exactly what you're describing. I don't work for Caphyon, just poking my head in to say it's do-able.

I write most of our stuff in python, which has very easy md5 hashing:
http://docs.python.org/library/hashlib.html

Getting the size is just:
os.path.getsize("setup.exe")

Write a good regex to find the line you want to insert the hash/size into and setup a script to do this update automatically. :)
Macy
Posts: 18
Joined: Sun Nov 25, 2007 2:02 am

Re: Updating prerequisites...

Thank you. I had to create a separate install for all 50 states of the United States. We did as you suggested there... created a template with a pattern that was very easy to find, read it, changed out the embedded patterns, and saved the edited file for each state. I'll look into CodeProject or something for an MD5 generator, and we should be good to go.

Thanks!

Return to “Common Problems”