Saturday, July 14, 2007

Installer Update

Hello. After my meeting with the OpenMRS guys on Thursday, I was given some milestones to hit. You see, when I first started working on the project, my first plan of action was to improve upon what my mentor had already created. The major downfall of his work thus far was that it wasn't cognizant of the environment in terms of dependency applications. Actually, the installer failed if you had any of the dependencies installed. So, my main focus was 1. How to detect dependencies on Windows/Linux/OSX and 2. How to go about loading them. During this time, I was exposed to many different install builder options. It was at this point I began to look for something other than izpack to build the installer out of nothing more than curiosity if there may be something better.

Anyways, the point is that the BitRock installer that I demoed for the guys didn't do a whole lot. The interface that the user will see was pretty much set in stone, but behind the scenes not much actually got done in terms of installing anything. The reason for this was that I wanted to leave out all the easy stuff, such as launching dependency installers, running the sql scripts, etc... so that I could quickly test the installer while I was learning how to do the more advanced things such as edit files, interact with outside programs, etc. I knew how to do all of the easy stuff, but I just wanted to keep it out of the code until I had the hard stuff handled. Tonight I've achieved 85% of my imposed milestone for this week.

My BitRock installer now launches all dependency applications once it collects any necessary information from the user, such as the MySQL user name (either one they want to use, or the one they are currently using if they already have MySQl), MySQL password, MySQl port, etc... From here, I've been able to take advantage of BitRock's variable system to pass this information to a post-install script so that I can have access to these pieces of data when executing the dependency installers, the sql script, etc... This is a big step because these were some major issues to address. The main reason those variables are important is because they can aid me in performing silent installations of the dependency applications by passing them to said installers as command line arguments.

Once I get that achieved, the next step is to go back to dependency checking so that we are only installing what we need to install. I'm awaiting word back from BitRock in hopes to gain an understanding of the capabilities of their installer in terms of launching external applications during the install process at specified points and then continuing the installer process once those applications have completed. This will enable me to write my dependency checking code and then call it from within the BitRock installer. My application will pass some information back to BitRock (probably by writing to a file), and then BitRock will be aware of what dependencies need to be loaded.

Well, that's where I stand today. Hope this post was relatively easy to follow, I'm sort of scatterbrained at the moment! Take care, enjoy your weekend.

No comments: