[Maria-developers] 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.
Hi! On 17 Jun 2010, at 16:20, Bo Thorsen wrote:
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.
I'm for this solution. It seems to be closest to what MySQL offers upstream, and the workaround makes it simple and it would mean we can get an installer much quicker, thus helping those that use the Microsoft platform as an OS of choice Cheers, -c -- Colin Charles, http://bytebot.net/blog/ | twitter: @bytebot | skype: colincharles MariaDB: Community developed. Feature enhanced. Backward compatible. Download it at http://www.mariadb.com/
Den 18-06-2010 08:05, Colin Charles skrev:
Hi!
On 17 Jun 2010, at 16:20, Bo Thorsen wrote:
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.
I'm for this solution. It seems to be closest to what MySQL offers upstream,
Well, this is something I should have commented on in the first two mails. There are two parts to an installer setup in CPack, configuration and file setup. The configuration is of course going to be different between an NSIS and WiX version, but these are very few lines, and they can be put in a separate file for NSIS. For WiX, the setup is done in the .xsl file, which is probably going to be quite big. The file setup is lines like this: INSTALL(FILES libmysql/libmysql.def DESTINATION include COMPONENT headers) That's of course shared between any installer implementation, and these are the only type of lines spread out over the tree. So, even if choose a different road than MySQL, it's going to be a really small difference.
and the workaround makes it simple
Yes and no. I've been working on this workaround, and it's quite difficult to implement. Plus it means forking the NSIS implementation in CMake to a local version :( It's possible I can do this workaround in a generic way (this is what I intend) and get this patch into CMake, which would help a lot for us.
and it would mean we can get an installer much quicker, thus helping those that use the Microsoft platform as an OS of choice
To me, this is the winning argument for now. We need a usable solution *right now*, not a great solution in some months. Unless someone objects loudly, I'll continue with the NSIS implementation, and take another look at WiX sometime later. Bo Thorsen. Monty Program AB. -- MariaDB: MySQL replacement Community developed. Feature enhanced. Backward compatible.
Den 18-06-2010 08:44, Bo Thorsen skrev:
and the workaround makes it simple
Yes and no. I've been working on this workaround, and it's quite difficult to implement.
Plus it means forking the NSIS implementation in CMake to a local version :( It's possible I can do this workaround in a generic way (this is what I intend) and get this patch into CMake, which would help a lot for us.
Damn, looks like my intended solution isn't possible :( I came up with another one, though. I want the installer to add the database files to a separate directory and copy those to the main directory at the end. This way, the files aren't covered by the uninstaller. I can later add a page to the uninstaller asking if they should be removed too, but the main point is to avoid them being silently deleted. Bo Thorsen. Monty Program AB. -- MariaDB: MySQL replacement Community developed. Feature enhanced. Backward compatible.
participants (2)
-
Bo Thorsen
-
Colin Charles