Hi,

I'm a user of the NSIS generator of CPack to generate nice windows
installers. Often lately I have embedded external installers with my
installer and then run them as part of my installer. This is working
really nice except for one thing; if you need to install drivers or
services the entire installer will require admin or power user
privileges. Thus I need to stop both the installer and the uninstaller
from running early if the user running it doesn't have proper
privileges. Until now I have manually post edited the generated
project.nsi file to add this functionlity and regenerated the
installer.
Now I hope that someone else is embedding external installers with
their installers and propose a new feature. It optionally adds an
abort message and installer abort if one sets
CPACK_NSIS_REQUIRE_POWERUSER prior to include(CPack).
Attached patch is against cmake master. In CPack.cmake it sets
CPACK_NSIS_REQUIRE_POWERUSER to "ON" if a user have defined or set
CPACK_NSIS_REQUIRE_POWERUSER to anything. This is because the NSIS
scripting language is assembler-like and I string compare (StrCmp) the
value of said variable to "ON" to perform a relative jump. Not setting
CPACK_NSIS_REQUIRE_POWERUSER will generate the same installer as
NSIS.template.in has generated since cmake 2.6. Feedback welcome.

cheers
Mattias
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to