Tuesday, July 24, 2007

Installer Progress Report

Alright, today was a relatively productive day.

  • First, the dependency code now detects MySQL in the PATH as well as those not in the PATH but in standard install locations. The issue now is avoiding duplicates, and this won't be easy to handle. You see, on UNIX, the 'which' command tells you the full path that is resolved when you execute a certain command. Windows (by my searching) has no such command. This presents a situation in that we don't know which installation the binary located in the PATH points to. It could point to the only installation they have on their system, or it could point to 1 of any number of installations; we just simply don't know. The only real way to do this is if we find a MySQL located in the PATH AND we found an installation in a default location, we then have to check the PATH variable for the presence of any/all of the default install paths that we found. Just the thought of that program logic scares the crap out of me. Again, 90% of my thought/worry/planning/nightmares account for maybe 10% AT MOST of the end-user use-cases.

  • Moving on... The installer now supports the choice of installing the demo patient data, or not. The user is presented with a dialog, and based on the answer, the sql script responsible for loading the demo data is either executed or not.

  • I also cleaned up the organization of files, both for my own sanity, and for the cleanliness of the install. The next step in this area is adding in the code to clean up after the installation, removing files that aren't needed. I'm not sure there will be a large amount of those, aside from any dependencies that weren't needed (plus the Java installer exe), and maybe the sql scripts, but I can foresee it being helpful if the users had those on hand. I'll just have to poll the "suits" about what they think. A comforting discovery I made while looking into this tonight is that Windows does support a file moving itself to a new location (i.e a BATCH script that moves itself to another location as its last instruction). It also supports self-deletion as well. Given those two, this is a trivial feature to implement once I know what needs to go, or what needs to go where.

Well, I think that's about it for now. I also had a talk with Ben about the MySQL credentials that need to be addressed in the installer, so I have a better grip on that now. The key next few steps in the installer process are:
  1. Detect Tomcat - More difficult than the other 2 dependencies.
  2. MySQL Creds - Make sure all needed info is asked for, and presented in a clear fashion.
  3. Runtime Properties - This goes hand in hand with #2, and somewhat with the dependency checking.
Alright, I'll keep you guys updated. Take care.

No comments: