[cmake-developers] [CMake 0013202]: CPack fails with latest prerelease NSIS
Mantis Bug Tracker
mantis at public.kitware.com
Tue May 8 14:52:52 EDT 2012
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=13202
======================================================================
Reported By: David Golub
Assigned To:
======================================================================
Project: CMake
Issue ID: 13202
Category: CPack
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2012-05-08 14:52 EDT
Last Modified: 2012-05-08 14:52 EDT
======================================================================
Summary: CPack fails with latest prerelease NSIS
Description:
There have been some changes to NSIS that break compatibility with CPack since
the latest NSIS release. There is now a standard library function called
RemoveSection, which conflicts with the function with the same name in
CPack-generated NSIS scripts. Also, NSIS scripts must now explicitly specify
that they require administrator access. Therefore, CPack-generated installers
will give an error that they require elevation unless the user explicitly runs
them as administrator. I'd like to submit a patch to resolve these issues:
diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in
--- a/Modules/NSIS.template.in
+++ b/Modules/NSIS.template.in
@@ -37,6 +37,9 @@
;Set compression
SetCompressor @CPACK_NSIS_COMPRESSOR@
+ ;Require administrator access
+ RequestExecutionLevel admin
+
@CPACK_NSIS_DEFINES@
!include Sections.nsh
@@ -119,7 +122,7 @@
"exit_${SecName}:"
!macroend
-!macro RemoveSection SecName
+!macro RemoveSection_CPack SecName
; This macro is used to call section's Remove_... macro
;from the uninstaller.
;Input: section index constant name specified in Section command.
@@ -841,7 +844,7 @@
DeleteRegKey SHCTX
"Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
; Removes all optional components
- !insertmacro SectionList "RemoveSection"
+ !insertmacro SectionList "RemoveSection_CPack"
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
Steps to Reproduce:
Download the latest NSIS source code from the NSIS Subversion repository. Build
an installer for NSIS and install it. CPack will now fail to build NSIS
packages.
Additional Information:
Please note that there is an unrelated bug in NSIS itself that will also cause
CPack to fail. To fix this bug, edit Contrib\Language files\SimpChinese.nsh,
changing the line
!insertmacro LANGFILE "SimpChinese" "Chinese (Simplified)"
to
!insertmacro LANGFILE "SimpChinese" "Chinese (Simplified)" "Chinese
(Simplified)"
and similarly modifying the analogous line in TradChinese.nsh. This fix has
already been reported to NSIS.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-05-08 14:52 David Golub New Issue
======================================================================
More information about the cmake-developers
mailing list