A Django site.
September 4, 2007
» Installer Progress Report

Hello, and happy Labor Day! I've been delayed in my "final post" due to a few reasons. First, I thought the deadline was Wednesday but it turned out to be Friday. Then, Friday I made my submission and worked with the guys a bit over a GoToMeeting session (very cool) to address some small issues with the installer, particularly the issues with Tomcat and environment variables. I spent the better half of the evening Friday addressing those issues, adding in the changes, and beginning to test them.

  • We now create a net user account for OpenMRS, and this is the account that Tomcat is run as. This solves the issue of the environment variable because we will now copy the properties file to "C:\Documents And Settings\openmrs\Application Data\OpenMRS" where "openmrs" is the net user account we create. The WAR file knows to look here for the properties file, so prior to a reboot it will be able to locate it here in a hard coded fashion, and then after a reboot the updates to the environment variable will be visible to Tomcat and it can resolve the location from there.
  • For now, you can no longer change the name of the webapp. This is sort of tied into the environment variable issue in that the naming convention for the properties file variable is that is should be prefixed with the webapp name. This is an issue because if the user does in fact change it to something other than "openmrs", then the WAR file can't find it.
  • Due to bullet point one, there is no "Reboot Required" dialog since we are circumventing the environment variable issue.
The one last issue I'm having with this is that the password for the net user account isn't getting stored properly and Tomcat is failing to start under the rights of our newly created net user. I didn't get a change to get as far into this as I'd have liked to due some unexpected events over this holiday weekend, but after some testing I believe it may just be an error within BitRock or my script, rather than something more annoying relating to the actual service configuration. Once I get that ironed out I can upload another iteration of this installer.

Also, I've been working with BitRock to resolve a tiny bug in the dependency checking code. I've had 3-4 correspondences with them over the past 4 days, and we are trying to figure out why the bug is occuring. It deals with the drop-down boxes for selecting the MySQL / Tomcat installations the user would like to use for OpenMRS as detected by the dependency checker. Once the user selects one and then hits next, if they were to hit the "Back" button and drop the box down again, they'd see an additional 2 empty lines in the box. That isn't really holding me up much as I'm trying to complete these new additions /changes with respect to the webapp, environment variable, and net user account in the naive installer before diving back into the smart installer.

I hope to have an update for you within a few days, so until then take care!

August 16, 2007
» Installer Progress Report

Hi. Been a while since my last update, I've had a hectic week. School starts up again on Monday, and I've had a lot of things to get organized as far as that is concerned in terms of class registration, loan applications, shifting money from checking/savings/credit/loans etc etc etc... Basically I hate this time of year with a passion because it's the most stressful, the most expensive, and the most busy. Anyways...

I'm going to be about a day late on my release this week due in part to the above reasons, but mainly due to the added complexity that adding dependency checking adds to the installer. I put in some good time tonight and am close to completing the puzzle.

  • Now, the post-install script checks variables passed from BitRock to determine which actions to take in terms of installing the MySQL/Tomcat services, starting/stopping those services, resetting the MySQL password, and installing the JRE silently. I can't remember exactly *why* we can't run the JRE silent install from inside of BitRock, but I do remember that we can't. If I get time, this is on my list of things to investigate.
  • I cleaned up some "/" vs "\" issues in the dependency code to make Windows happy.
  • I cleaned up a lot of logic in the dependency checking BitRock code to properly handle some of the environment variables, as well as the PATH variable.
  • As far as dialog screens are concerned, the dependency checking version matches that of the "naive" installer. I'm still holding off a bit on adding in the MySQL/Tomcat/War to cut down on build-times, but that will all come tomorrow after I sort out a few last bugs.
The other reason this release is delayed is due to a tiny bug we're having with the "naive" installer (although it would be an issue with the "smart" installer as well). The issue concerns Windows refreshing environment variables. This poses an issue when the user changes some of the default data, forcing OpenMRS to read the runtime properties files. The idea was that forcing a reboot would solve the issue, but in my efforts today, that wasn't the case. Rebooting refreshed the environment variable pointing to the runtime properties, but Tomcat still had an issue loading OpenMRS.

The guys have been out of town, so it's been a bit harder to get assistance with these issues due to our schedules, so hopefully when they get back IRC will be back in full swing and we can get this issue ironed out. In the meantime I'll continue to work on my dependency code. There are a few improvements that will probably have to wait until next week because they will involve major additions to the C++ code, but I'll have some version of the dependency checking code out within the next day or so.

Stay tuned!

August 10, 2007
» Another day, Another Installer Release

Hi folks. I had a super-productive day today during my visit to OpenMRS headquarters in Indianapolis. Below you'll find a changelog for this release and the link for the download (eventually).

  • Added Start Menu link to the OpenMRS website
  • Fixed the custom Tomcat port issue. Now, whichever port you specify will be the port used when launching the browser
  • Added support for changing the webapp name (the name that Tomcat uses to identify OpenMRS)
  • Added option to allow/disallow loading of modules through the webapp
  • Fixed the custom OpenMRS database name issue. Now, if you specify a different name for the OpenMRS database (not the default 'openmrs'), this change will actually be respected.
  • Added option to change the MySQL OpenMRS account (only used internally). Previously if you changed it, it would ignore you. Sorry.
  • Full support for the runtime properties file. Up to this point we weren't using it at all. Now, every relevant option is reflected in the runtime properties file such as MySQL username/password/port/database name, boolean module upload, etc...
  • Fixed the top-right logo that was out of proportion. Thanks Ben.
  • Tomcat is now installed as an automatic service instead of a manual service.

If you tried out my previous installer, follow these steps to obtain a "clean" system to test this one.
  • Open a command prompt - Start, Run, "cmd"
  • net stop mysql
  • sc delete mysql
  • net stop "apache tomcat"
  • sc delete "tomcat6"
That will stop both MySQL and Tomcat, as well as delete them as Windows Services. Those are the main testing points for the installer as the silent Java install never fails, so don't worry about it. It may also be a good idea to delete the previous installation directory after executing those commands. If you try to do it before hand, chances are MySQL and/or Tomcat will still be running and it will fail.

I think that's about it. A few issues to keep in mind...

  • Somtimes, for no reason at all (most likely a timing issue), Tomcat does not get installed as a service. This will cause the net start "apache tomcat" command to fail, clearly, since it hasn't been registered as a service. I'm working on this, but it's random and it I'm nearing cluelessness on this one...
  • Again, sometimes the MySQL database does not get created. I'm confident this is a timing issue because it only happens for me when I'm at home on my laggy VMware image. Today at OpenMRS HQ, the only thing that gave me trouble was the occasional failed Tomcat Service install. The MySQL worked every single time
  • Sometimes, the browser will launch prior to Tomcat finishing starting. In this case you will see an error that you can't connect. Wait a few minutes and refresh the screen. If you continue to get the unable to connect error, Tomcat probably never installed as a service and thus didn't start. If you see a Tomcat error page stating that OpenMRS could not be loaded, this means that the MySQL database wasn't created. Let me know either way and I'll help you out.
If you encounter either one of these issues, please let me know. I'll have you up and running with very little effort. If you encounter any other issues, or you have suggestions, please let me know those as well. Thanks!

http://resources.openmrs.org/OpenMRS-1.0-windows-installer.exe

August 7, 2007
» Installer Release

Yay! I got it to work! Here were the major issues holding my progress up:

  • Timing of commands - When you execute commands in a script as opposed to on the command line, the behavior is completely different. The operating system essentially goes down the list of commands and spawns each one off. If a command takes longer to execute than you may expect, and your next command depends on the previous one: disaster. Normally you would fight this using the built-in 'start /wait ' mechanism, but the nature of how Bitrock executes post-install scripts really hinders this because sometimes the installer will just hang if you use the /wait switch. Couple this with the fact that Windows XP doesn't have a 'wait' or a 'sleep' command, and you've got yourself a headache. To fix this issue, I started the MySQL server first, then I did the silent install of Java to kill some time, and THEN I reset the root password for MySQL. That handled the timing, and fixed the SQL script issue.
  • Behavior of 'service.bat' - This script is provided with Tomcat for a simple way to install Tomcat as a Windows Service. The problem is, if you call it from within a script, nothing else in your script will get executed after 'service.bat' finishes. No combination of switches can save you here, the reason being is that while you may say '/wait', 'startup.bat' executes a number of other commands that don't use that method of execution. So, instead of calling 'startup.bat' as part of the post-install script, I call it from within Bitrock prior to the execution of the post-install script, and then I simply start the Tomcat service in the script.
  • Build times - As I've stated before, this really killed me. Any change I wanted to implement and test would take a total of 15 minutes before I would know if it worked or not. That's a lot of time lost, especially considering the hit-or-miss nature of the testing environment due to the issues I listed above. Something will behave one way locally in the script, but how it behaves in Bitrock is entirely different.
Well, those are a summary of the issues. I bottled them up nicely and it only seems like 3 things, but there are a number of painful individual things within each of them.

Installation Tips
  • This installer assumes you have none of the dependencies. Please make sure this is the case. No JRE, No Tomcat, and No MySQL.
  • At the MySQL Information screen, the dialog is a bit misleading. These will be cleaned up, but for now just know that the username MUST be 'root'. The password can be whatever you want it to be.
  • At the Tomcat Information screen, the dialog is on task, but to be safe and sure that you are experiencing the same installer that I did, leave the username as 'admin'. It shouldn't matter, but I can't recall how I setup the tomcat-users.xml file just now, so I make no guarantees. (Although, this would be good info for your bug report feedback).
  • When the installer tells you that it's executing the final installation script, be patient. It will take a relatively long time, but trust me, it does finish. You may see an error box pop-up that says something about "Error sending parameters to program..." and it will display the URL for the OpenMRS system. I'm not sure why this comes up, but just hit "OK" A browser should pop-up and display the OpenMRS system. You may have to refresh it, but probably not. Once the script finishes, you'll have the option of displaying a Readme, and then you'll be done.
  • The installer currently places Tomcat and MySQL inside of the installation directory. This is not permanent, but I have some issues to work out involving the dependency checking and setting path/environment variables accordingly, so that's why I'm not placing them in their proper locations just yet.
Strange Behavior
  • As seems to be par for the course, sometimes the script doesn't execute properly for seemingly no reason at all. If this is the case, you'll probably get an error saying the script didn't execute successfully, and you'll see an error page for Tomcat. For example, I just ran a new build of the installer that had no effect on the SQL scripts, but for some reason all of the SQL scripts failed saying that they couldn't find the "openmrs" database. I ran the SQL scripts manually, and guess what? No errors, I restarted Tomcat, and the system was fine. It honestly and truly makes no sense. There must be some strange timing issues going on, and I just don't have the time to waste fixing them right now. Let me know if you have this issue and I can get you up and running very easily. All you need to do is finish the installer (not cancel it), and then run the SQL scripts located in ${installdir}/model (where ${installdir} is the location you chose to install OpenMRS). You'll have to follow the instructions from the website on how to execute those scripts (if this becomes a widespread issue I'll type up an updated tutorial), but once you do, simply restart Tomcat and you're good to go. I'm not going to ignore this issue, I just need to focus on other elements of the installer currently; this isn't something that fails every time. I think the issue for me is that my Vmware image runs very slowly. Given that, if the createdb script doesn't finish in time, then the rest of the scripts will fail. I'm almost entirely certain that's what happened in my last run. I'd have to do some string modification to alter the SQL script commands to be executed using the 'start /wait' mechanism, but once that was in place it would solve the issue.
Update
I decided to re-run the first working version that I had tonight. This is a version that worked with no problems at all the first time I ran it. Guess what happened when I ran it this time? It never created the database. This version never had that issue, only the newer one did. This just goes to show you the ridiculousness I've been dealing with. It seems that it randomly just doesn't create the openmrs database. In fact, in other occasions outside of Bitrock, I've gotten strange SQL errors saying that certain "concepts" didn't exist. I think there is some sort of bug behind the scenes with MySQL or these scripts. I'm not losing my mind, I know for a FACT that the version I've uploaded worked on a bare system. I reset my VM, and surprise! It didn't work. Regardless, with the version I put up (the first working version), if you get a Tomcat error saying it can't find OpenMRS, just run the SQL scripts manually and restart Tomcat.

By the way, I decided to not upload the "newer" build. The one thing the newer build fixed was it made Tomcat's service "auto" start. So, for this build you'll have to change that start type in "Settings, Control Panel, Admin Tools, Services, Right-Click on Apache Tomcat, Properties, Startup, Auto".


Please let me know of any issues/bugs/suggestions you may have. Thanks!

resources.openmrs.org/OpenMRS-1.0-installer.exe

August 5, 2007
» Installer Progress Report

Wow. About 6 hours ago I thought I was ready to release. Then everything fell apart on me. By everything, I mean one single line in a 12 line BATCH script. Since that time I've been debugging myself to death over this thing, and it's been rough for a few reasons...

  • Vmware is sluggish as hell
  • 5 minute build times
  • 3 minute copy times to put the installer in the Vmware image
  • 5 minute install times
  • Different results when BitRock runs the post-install script than when you run it manually
  • Timing issues with commands, and how Bitrock handles that (all black box...)
  • When I address the timing issues using /w and/or /b, Bitrock will sit forever waiting for an application to exit that is in the background somewhere
I've got the situation narrowed down, and I know exactly what line is "failing". Bitrock is passing in a mis-quoted variable that points to a path. When I try to reset the root password in the script, it fails because of that mis-quoted variable. Thus, none of the SQL scripts get executed because of bad credentials. I spent hours debugging the BATCH script and running it manually, and I got the system running each and every time. So, believe me, the installer works on a bare system, all of my code is absolutely correct. I had issues with Bitrock's variable passing (how they handle spaces as opposed to how BATCH handles them) before, but this time the normal fix isn't cutting it. Combine that with the fact that half of the time I never see the post-install script result, I never see what command it's trying to execute. I have fixed that now, but it's 5:30am and I absolutely have to go to sleep. Once I get the variable into shape, everything will work just as flawlessly as it does when I run the script manually with data that I've fed it. IT WORKS! I PROMISE! You'll soon see it for yourself!

Yep, I've lost my mind. Goodni..morning.

August 4, 2007
» Installer Progress Report

Hello again. Well, I got cracking with Vmware this evening, and I have ironed out a few of the bugs with the "naive" installer.

  • When loading the MySQL package silently, some trickery is needed to set the root password since it is initially blank. This requires starting the MySQL server with the --skip-grant-tables (probably not exactly right, but that's the command in general) and then setting the password. After this process, the MySQL server needs to be restarted with the normal options prior to running the OpenMRS SQL scripts. This is something that I had missed earlier. Luckily, you can do process management on the command line with Windows XP; I never knew this. So, I added a "tskill mysqld" line to the BATCH file, and that problem is solved. I then found that the MySQL service was actually being installed properly via the BATCH file.
  • There were some hacky environment variable settings in use for this naive installer because at the time I added these features I was working on my production system on-site. Given that, I didn't want to un-install Java just to find out where the silent Java install was going to place the JRE (for use in setting the PATH variable, and the JRE_HOME variable for Tomcat's startup.bat). So, on-site I just hard coded the location of the current Java installation. This would explain why it wasn't working for Paul when he tested it, or myself in my Vmware image. I fixed that in terms of Java, but for some reason the environment variable for Tomcat doesn't seem to be taking effect.
Those are the 2 major things I was able to correct tonight. It took me a while to get the whole Vmware system up and running so I could take a decent snapshot of it. An important lesson I learned was to copy the installer exe from your primary source (flash drive/host operating system) to the Vmware image prior to running it. Otherwise, very strange things occurred with the file paths in Bitrock and there was an error generated, although the script seemed to execute fine.

The current issue is with Tomcat. For some reason it is requiring a JDK instead of just a JRE. My understanding up to this point was that OpenMRS only required the JRE... As I did some reading I learned that from Tomcat 5.X and up, Tomcat only requires a JRE and that you could set both JRE_HOME and JAVA_HOME to the location of a JRE's bin folder. This is contrary to the error startup.bat gives stating that JAVA_HOME must be set to a JDK and not a JRE. Feeling hopeful, I tried this, but it failed. If JDK is required instead of just a JRE, that changes things. A lot. The dependency checking code would have to be updated to search for the JDK command, which I believe is just "javac". Luckily the JDK bundles a JRE with it, so as long as the JDK was up to date, we could safely assume that the JRE was up to date as well. I would have to change the installer exe for the Java dependency to be that of the JDK instead of the JRE.

Once I get these questions answered, I'll move forward and get the Tomcat service issue fixed, and you guys will have a release of the "naive" installer tomorrow (Saturday). My goal is to release the dependency checking version on Sunday, but my mother has decided to come to town on Sunday, so it may be Monday depending on how well things go tomorrow with the "naive" installer.

As always I'll keep you updated. Thanks.

August 3, 2007
» Installer Progress Report

Hello. Well, I'm a bit short of my Thursday deadline. Due to some communication breakdown, I didn't receive any feedback on my previous week's installer which suffered from some Windows Service issues. Throughout this week, I focused on implementing the communication between BitRock and the dependency checking. I'm happy to say, that portion is working very well. Between my long hours last night, and today, the installer is very close to completion. However, there are a few kinks to work out; mainly the Windows Service issues. Below is a summary of the new features I've got implemented:

  • MySQL / Java Dependency Checking - The installer is now aware of these dependencies. If you have multiple MySQL installations, it allows you to choose which one you'd like to use for OpenMRS. If you don't have them, it presents you with a screen informing you of this, and asking if you'd like to specify the location to the dependency (maybe you have it installed in a custom location), or if you want the installer to load the dependency for you
  • User-Specified Dependency Validation - Since the installer allows the user to specify the location of all of the dependencies, I built in vaidation rules that verify the dependency exists where the user says it exists. It asks for the location to that particular dependencies binary, and then validates that it actually exists.
  • Smart Environment Variables - Depending on how the dependencies are installed (i.e they were detected, they were specified, they were loaded by the installer), the environment variables are handled accordingly using the given path.
  • Windows Services - This is a work in progress, but in my current installer I've implemented the code to create and start Windows Services for MySQL and Tomcat, provided that the user does not already have those dependencies installed. It's all very dynamic now that the dependency checking is in place because only things that need to happen, happen. I think this bullet point here will go a long way towards fixing the current "full" installer.
I've merged the "naive" installer with this current one with the exception of all of the bundled files. The reason is, with all of those files bundled in, it takes 5 minutes to build the installer every time I make a change, and then it takes 5 minutes to unpack those files during the installation (provided they need unpacked). Tonight, I put Vmware on my machine, and have started loading an XP image in it. This will simplify the process for me this weekend as I try to get the Windows Service issues fixed. My original thought was that they were failing due to not having an "empty" system in terms of dependencies, but I just found out tonight that's not the case. I do however feel strongly that using BitRock to install/start the services will fix a lot of issues, as opposed to executing awkward commands in a BATCH script.

There absolutely will be a release (or multiple) before the end of the weekend. I've been re-prioritized in that Paul wants the Windows Services fixed on the "naive" installer before I handle the dependencies, although the dependency work is in place and complete. So, I'll fight that battle tomorrow once Vmware is finished, and once the Windows Service issues are fixed, I'll release that. Then, I'll iron out a few things with the "smart" installer and release that as well. Promise.

This has been the most productive week by far, and it's really exciting. I have a kit things to show everyone, but Paul is adamant that he see the installer work on an "empty" system before he sees anything else, and I don't want to put out a release that doesn't get the system up and running just for the sake of showing off all of the cool features I've added. So please, bear with me on the slight delay and I'll update everyone tomorrow after the Vmware adventure. Thanks.

July 31, 2007
» Installer Progress Report

Hello. It's been a few days since my last update. I've made some good progress, and I'm on track for my Thursday release with the goals I've set for myself. The main focus of this release will be to incorporate the dependency checking to some degree so that only missing dependencies are installed. With this eventually will come germane dialog screens that inform the user of which dependencies were located (multiple MySQl/Tomcat/etc), and giving them the choice of which one to use, or to specify another one all together. At the very least this release will be able to detect MySQL and Java and proceed as necessary. I'd also like to implement the dialog logic so that the user can select which MySQL install to use, and actually that is fairly easy. Today I broke a lot of ground in way of achieving that goal, actually.

  • Screen Logic - I've got all of the dialog logic working so that I'm in full control of which screens get displayed to the user based on the value of any variable of my choice.
  • Dynamic Selection - With the help of BitRock support, I've figured out how to populate a drop-down selection menu with variable data representing valid dependency installs (i.e multiple MySQL installations).
  • Dynamic Components - Using similar logic to that of the screen control, I can now control which components of the OpenMRS system are actually installed. We bundle all of the depends with the installer, but depending on the result of the dependency check, only the needed ones are ever unpacked (installed) during the install process.
It may only be "three" things, but those three items are huge milestones in the installer. In fact, those three elements are the cornerstone to the dependency checking interface into BitRock; this is the stuff that makes the installer worth it's weight in gold. I'll hit it hard tomorrow evening and transition into Thursday morning preparing for my evening release. By then, I anticipate a lot of progress in a few other small areas such as:


  • Moving any dependencies we install to a standard location
  • Cleaning up the install folder after installation, not leaving behind any unnecessary files
  • Clean up the environment variable exporting so that it is determined by the information that the dependency checker determines or that the user selects.
I'll keep everyone updated, take care.

July 26, 2007
» OpenMRS Visit #2

Well, today I made my second visit to OpenMRS headquarters in Indianapolis. As usual, it was great to see the guys, but also great to be in a professional software development environment. The OpenMRS guys are truly bright individuals, and it's more apparent in person listening to them problem solve and go back and forth with each other trading solutions. While I did get a lot of work done today, there are still a few hangups that I'm trying to iron out. When I do so, I'll have a much improved beta-installer for you all to try out.

Just a little insight into how I work... The beta's I try to get ready for the weekly releases are 1 of maybe up to 3 different installers I'm working on. When I say "different" I mean, they all contain subsets of more advanced functionality that will eventually be part of the final product. I'm currently working on 2 major installers: First, an installer that is ignorant of the environment, but does silent installations of all of the dependencies and configures them silently as well given the data input during the BitRock installer. Second, I'm furthering the development on the dependency checking code and working that into a stripped down installer for testing purposes. Once the dependency checking is "complete" I'll then merge that into the "ignorant" installer, and everything will just mesh due to some logic rules within BitRock that determine what gets executed when, and why. So, while the next update (coming before Sunday) will only be a marginal improvement upon the last (actually, it's a huge improvement), it is only a subset of the work that I've actually completed.

The "delay" with the dependency checking came in that after the last beta was finished, I started programming the dependency checker. Then, yesterday I found out that the mechanism I'd hoped to use to read my dependency checking program's output wasn't going to work, and I had to find a new method. This was also in parallel with having to get some sort of demo ready for my visit today. So, it's been hectic going back and forth between the two installers while always trying to make progress in both areas, but it's really starting to come together. The source code for the dependency checking is essentially complete, and any little things that come up are easily added/modified since it's C++ and I have full control of what I do. As for getting that data into BitRock, I had started experimenting with that yesterday, but ran into some confusing issues. However, after my work today, I have a much better understanding of how to address those issues.

The current updated installer that I'll have out to everyone within the next day or so includes the following upgrades from the previous installer:

  • Multi-Input Dialog Screens - You can now enter all relevant data on one screen instead of 4 or 5
  • Silent installations of all dependency applications - I use command line switches for the JRE installer, and I've bundled zipped versions of MySQL and Tomcat with the installer. They are unpacked into their proper places, and then I use BitRock's file editing abilities to configure their settings files with the proper data (username/password/port/etc...)
  • Setting of needed environment variables - Certain env variables need to be set, such as the path to the JRE, CATALINA_HOME, etc... as well as adding MySQL to the path after it is installed.
  • Demo Data - You now have the option to forgo installation of the demo patient data. This is helpful for people that already have OpenMRS running, and just need to install it on another system.
  • Port Validation - The installer now verifies that it can bind an address to the port numbers you specify for MySQL and Tomcat. If not, it asks you to enter a new port.
  • Improved Error Detection - The installer now correctly enforces illegal empty data (i.e all of the input data during the installation process)
I think that's about it as far as the changelog is concerned. The current hangups both deal with adding MySQL and Tomcat as Windows Services. I got nothing but grief today when I tried to do this, such as error messages that didn't tell me why it failed... This was the main reason I didn't have a demo to show the guys today, and that really bothered me. I wanted to show them what I had done, and I suppose they can still see everything except for it successfully starting the system, but still... very frustrating, for everyone I'm sure. I think the issue may have been linked with the fact that the machine I was using already had MySQL and Tomcat installed as services, but I didn't want to wreck my development machine with a scavenger hunt that may have turned up nothing.

That's all for now, I'll get the update out as soon as possible. I've worked myself thin the past 3 days, even to the point I had to stay home from my other job due to illness, so I've got to step away from it for tonight and put in a LONG weekend of work and get this thing finished as soon as possible. I'll keep everyone updated, thanks.

July 25, 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.