Browse Source

Merge topic 'fix-13085-add-nsis-preinstall-hook'

aa8acea CPack/NSIS: Add CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS (#13085)
David Cole 13 years ago
parent
commit
d2230cdb5e
2 changed files with 12 additions and 3 deletions
  1. 11 3
      Modules/CPackNSIS.cmake
  2. 1 0
      Modules/NSIS.template.in

+ 11 - 3
Modules/CPackNSIS.cmake

@@ -31,13 +31,21 @@
 ##end
 #
 ##variable
-#   CPACK_NSIS_EXTRA_INSTALL_COMMANDS - Extra NSIS commands that will
-#   be added to the install Section.
+#   CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS - Extra NSIS commands that
+#   will be added to the beginning of the install Section, before your
+#   install tree is available on the target system.
+##end
+#
+##variable
+#   CPACK_NSIS_EXTRA_INSTALL_COMMANDS - Extra NSIS commands that
+#   will be added to the end of the install Section, after your
+#   install tree is available on the target system.
 ##end
 #
 ##variable
 #   CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS - Extra NSIS commands that will
-#   be added to the uninstall Section.
+#   be added to the uninstall Section, before your install tree is
+#   removed from the target system.
 ##end
 #
 ##variable

+ 1 - 0
Modules/NSIS.template.in

@@ -637,6 +637,7 @@ Section "-Core installation"
   ;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