[CMake] Fix and feature for NSIS template

Mattias Helsing helsing72 at gmail.com
Tue Jan 31 10:50:10 EST 2012


Hi all

I found a bug in NSIS.template.in thats been bothering me for a while.
The NSIS scripting language allows relative jumps that are relative to
the _current_ command and an error in said file bypasses users
permission check.
Also my installer runs an external installer for a driver and thus the
entire installer requires admin or power user privileges. I want to do
this check directly on startup of the nsis installer. The code to do
this have been manually added by me enough times to suggest an
improvement to the NSIS packaging module. It adds the option to set
CPACK_NSIS_REQUIRE_POWERUSER to get a user permission check at install
and uninstall time.

The following patch addresses both the fix for relative jumps and
fixes my feature request. Please consider and provide feedback. The
patch is against files in master but testing has been done with
cmake-2.8.7, NSIS 2. on WinXP.

This is my first submission here so please point me in the right
direction if submissions aren't appropriate here.

cheers
Mattias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NSIS.template.in.patch
Type: application/octet-stream
Size: 711 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120131/78d03255/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CPack.cmake.patch
Type: application/octet-stream
Size: 128 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120131/78d03255/attachment-0001.obj>


More information about the CMake mailing list