Installer Update?

Jan 17, 2011 at 4:14 AM

Hi! I wrote you several days ago via the "contact codetools" link in the People area about some work I've been doing on the nHydrate database installer. Not the package installer, but the project installer assembly that gets built by the code generation tools. Basically, I was exploring it to see how it works, and have been writing a new version of it, for fun and to hone my WPF skills (I'm building it around a WPF-based wizard).

My goals are to have something that will do either a command line or UI-based install, with a wizard being used to gather whatever info wasn't specified on the command line, if using a UI is allowed via command line option (i.e., if it's not allowed, and the command line arguments are insufficient to do an install, the installation would abort). The wizard gathers information about the schema ID and version, if any, of all the accessible databases on a user-selected server and prevents overwriting a database with either an incompatible schema or a newer version of the correct schema unless the user specifically chooses to override that behavior (i.e., you can force an install, but you'll be warned that you're doing something that could cause problems).

One other thing: if I understand the design of the existing installer assembly correctly, I'm pretty sure the only thing that would need to be written by the code generation system is a concrete instance of a single class, with only two abstract properties (schema ID and version) requiring implementation. Everything else could be in a assembly that gets included along with the other core nHydrate assemblies (well, you'd also have to include some other utility assemblies that I've written, but I'm going to open source those).

I'd be happy to send this stuff along to you when I've gotten it reasonably stable for you to look over, if you want. If it ends up being of interest I'd be glad to open source it and have it included in the project. And if it's not of interest, that's fine, too. I'm having fun working on this regardless! Just let me know.

- Mark

p.s. I know that using a WPF-based UI in a custom installer is a little odd, but since nHydrate requires .NET 3.5 I figured it's not that much of a stretch to assume WPF can run on the host machine. Besides, adding a Windows Form-based UI wouldn't be all that hard.

Jan 20, 2011 at 12:42 AM

Thank you for the interest. We would be glad to look at this. We wrote the installer many years ago and I do not know all the specifics. It essentially copies the DLLs to a folder and write a few registry entries. That is really the bulk of it. If you open the WIX project you will notice there are a lot of files. The main component is the VSCodeTools2008 component. This is the piece loaded by VS.NET. It then lazy loads all assemblies with a particular interface after that. The install folder is a repository of assemblies that implement the generator base interface. Anyone can write a generator and drop it in this folder. So once you finish drop us a line.