[cmake-developers] [CMake 0013085]: Unable to run custom NSIS commands before installation

Mantis Bug Tracker mantis at public.kitware.com
Sat Mar 31 13:24:17 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=13085 
====================================================================== 
Reported By:                David Golub
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13085
Category:                   CPack
Reproducibility:            N/A
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-03-31 13:24 EDT
Last Modified:              2012-03-31 13:24 EDT
====================================================================== 
Summary:                    Unable to run custom NSIS commands before
installation
Description: 
CPack provides the ability to run custom NSIS commands at the end of the setup
process by setting the variable CPACK_NSIS_EXTRA_INSTALL_COMMANDS.  However,
there way to specify custom commands to run at the beginning of the setup
process before files are copied.  I'd like to submit a patch to address this
issue.

diff --git a/Modules/CPackNSIS.cmake b/Modules/CPackNSIS.cmake
--- a/Modules/CPackNSIS.cmake
+++ b/Modules/CPackNSIS.cmake
@@ -29,8 +29,13 @@
 ##end
 #
 ##variable
+#   CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS - Extra NSIS commands that will
+#   be added to the beginning of the install Section.
+##end
+#
+##variable
 #   CPACK_NSIS_EXTRA_INSTALL_COMMANDS - Extra NSIS commands that will
-#   be added to the install Section.
+#   be added to the end of the install Section.
 ##end
 #
 ##variable
diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in
--- a/Modules/NSIS.template.in
+++ b/Modules/NSIS.template.in
@@ -637,6 +637,7 @@
   ;Use the entire tree produced by the INSTALL target.  Keep the
   ;list of directories here in sync with the RMDir commands below.
   SetOutPath "$INSTDIR"
+  @CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS@
   @CPACK_NSIS_FULL_INSTALL@
   
   ;Store installation folder

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-03-31 13:24 David Golub    New Issue                                    
======================================================================




More information about the cmake-developers mailing list