Managing DLL files, deployment, and ease of use for the end user

dependenciesdeploymentdllusersversion control

I've been thinking recently about being an end-user who wishes to download one of my own projects and use it on a perfectly average machine. Having an equal background in Unix as well as Windows, I know that package management on Unix makes it FAR easier for the programmer to make it easy for the end-user. If a package is required, it's simply required, and all the required libraries are just there.

However, it's a different story on Windows. I have a project that I store on GitHub that is basically a C++ GUI application to interface with the Wii Remote. Nothing much. However, early on, I separated some of my initial project into a separate library project, because I could foresee that it would be useful to do so. The end result of all this is that I have the actual application project on GitHub, which requires both some wxWidgets DLL files and the DLL from my separate library project, which in turn requires a boost DLL file (threading) and the wiiuse DLL file, none of which the normal user is going to have on their computer, much less their PATH. I could take ALL those DLL files, zip them up, and put them with the application, but I'd have to remember to replace my separate library DLL file whenever I did work on the library.

Anyway, what is the common approach for dealing with this on Windows? Are there installer tools that can help me with the kind of issues described above?

Best Answer

It's actually not a different story on Windows. You'd typically create an installer for your application. The user runs the installer, the application gets installed. That's it.

There's two main approaches to use on Windows.

You can use Windows Installer, which is the installer service that runs on Windows and installs .msi files (kind of like .rpm's or .deb's). In this case, the file you distribute is not an executable per se. This is actually the 'recommended' method of installation on Windows. There's a couple of different tools you can use to create installation packages for this. WiX is one that comes to mind, but there are others.

The other option is to create a self-contained installer. This is your typical 'setup.exe'. You can use tools such as the excellent InnoSetup to create these kinds of installers.

When you do make the installer, install the DLL files into the application's directory. It'll be the easiest for you. Windows will search the local directory first when loading DLL files. This prevents conflicts that might arise when the same DLL file is installed multiple times on the machine.

Related Topic