← Back to team overview

maria-developers team mailing list archive

Windows installer, NSIS version

 

Hi everyone,

I'm currently working on a Windows installer for MariaDB, and I have two options for you to consider. This mail covers the first of them.

The first and currently biggest contender is CPack + NSIS. This combination has two very big things going for it: It's the same that MySQL uses, and it integrates really well with the CMake system. In fact, all you have to do with this solution is to install NSIS on your system and run "cpack.exe" in a directory where you already built the solution.

NSIS creates a single binary exe file that installs in C:\Program Files\MariaDB-5.1.47 (for example).

NSIS is very limited in what you can actually do with the system. For example, there is no support in there for asking the user if he wants to delete the database files, they just vanish. This is potentially *extremely* bad. However, I have a theory on how to work around this particular problem, by hacking the nsis.cmake file.

NSIS does not support upgrading of packages. Instead, it does "upgrades" by allowing packages with different versions to install next to each other. So if you installed the 5.1.47 version and want to upgrade to 5.1.49, you simply install 5.1.49, copy your database files over (over, even better, use database files in a different directory). When you are ready, you can remove the 5.1.47 package.

This clearly has some advantages, but it's just not the way most software updates run. When you update to a newer version of the software on most Windows software, and certainly on all systems using apt or RPM, you just replace the old version with the new one.

There is no support for setting up the database in the installer, or setting up MariaDB as a service. CMake+NSIS is just a dumb file copy system. MySQL works around this by running another executable at the end of the install process and this program does the setup. IMHO, that's a very good solution, and it also allows the user to run the setup program again later. But it's still a workaround due to the limited installer system.

NSIS would be my choice for an installer right now. But because of the limitations, I'd consider this a temporary solution until we have a better one. See my next mail for a better but much more complex system.

Comments, please.

Bo Thorsen.
Monty Program AB.

--

MariaDB: MySQL replacement
Community developed. Feature enhanced. Backward compatible.



Follow ups