[CMake] customize cpack windows installer

Bo Thorsen bo at askmonty.org
Fri Jun 25 08:10:56 EDT 2010


Den 23-06-2010 23:39, Alexandre Gramfort skrev:
> I'm deploying a cmake project on windows and I have a few questions
> concerning the
> installer generated by cpack using NSIS
>
> - is it possible to remove the mention "create desktop icon" since the
> installer contains only command line tools?
>
> - is it possible to provide an installer that works even if the user
> does not have admin rights?
>
> - is it possible to add to the folder in the start menu a link that
> points to the web site of the project?

Hi Alexandre,

I recently started using CPack for the MariaDB installer, and it's been 
a kind-of bumpy ride so far.

First of all, it's incredibly easy to build a simple installer with 
CPack and NSIS. But as soon as you step beyond the glorified zip file 
structure, it starts getting really hairy.

I can't answer any of your questions, because I haven't tried to do 
those things. But I can tell you what I do when I try to find solutions 
to problems:

1) Search the net
2) Ask questions on the mailing list. One question per mail only! This 
looks like it gives the best answers, when answers are given.
3) Read the file ...\CMake 2.8\share\cmake-2.8\Modules\NSIS.template.in 
to try and figure out what happens and what you can or can't do.

Be aware that NSIS is actually in some ways quite limited in what it can 
do. And the CPack template doesn't always provide the freedom I'd like 
to have. For example, just adding new functions or macros seem difficult 
(i might be wrong about this, though).

An alternative to NSIS is to use CPack with the WiX patch. This can 
pretty much do everything you'd expect an installer system to do. But it 
means depending on an external CMake patch plus you have to write a very 
complicated .xsl file for it to do anything useful.

Another thing: If you find the answers to your questions, please answer 
your own mail here on the list. Google results from answers on this list 
is certainly one of the more useful resources on the net.

Bo Thorsen.
Monty Program AB.

-- 

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


More information about the CMake mailing list