Commit Graph

55 Commits

Author SHA1 Message Date
Colin Tracey 3758af12fa CPackNSIS: Add options to set the bitmap for NSIS installer left side
set MUI_WELCOMEFINISHPAGE_BITMAP
set MUI_UNWELCOMEFINISHPAGE_BITMAP
2015-10-06 09:08:37 -04:00
David Golub 40566ef2f8 CPack/NSIS: Obtain path from which to uninstall from registry (#14124)
Without this, when CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL is set,
the installer tries to uninstall the old version from the default
installation path for the new version, rather than using the path from
the registry where the old version is installed.
2013-05-02 10:22:20 -04:00
David Golub 51da766a6d CPack/NSIS: Fix compatibility issues with prerelease NSIS (#13202) 2012-11-19 19:53:29 -05:00
David Cole 12c092cf67 NSIS: Fix incorrect uninstall registry key name (#13578)
Thanks to Alexander for the bug report.
2012-10-16 07:53:59 -04:00
Brad King 6c2c483ef9 Remove trailing TAB from NSIS.template.in
This was missed by commit 7bbaa428 (Remove trailing whitespace from most
CMake and C/C++ code, 2012-08-13) which only removed trailing spaces,
not TABs.
2012-08-14 08:05:41 -04:00
Kitware Robot 7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
David Cole 419f561b2f Merge topic 'fix-9946-uninstall-before-install'
fe58b67 Added CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL
2012-04-25 14:06:29 -04:00
Patrick Gansterer fe58b67e24 Added CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL
If CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL is set to ON the NSIS installer will look for a previous installed version and ask the user about uninstall.
2012-04-22 11:30:34 -04:00
David Cole aa8acea398 CPack/NSIS: Add CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS (#13085)
Allows custom NSIS commands to run prior to any installation
actions. Projects that need to run an uninstaller first,
especially one from a non-NSIS previous revision of a project
that is NOW using CPack and NSIS, may do so by putting custom
NSIS commands into this variable.

Inspired-by: David Golub
2012-04-21 11:36:25 -04:00
Mattias Helsing c4a0bcea77 CPack: Fix NSIS handling of privileged users (#12923)
When using the NSIS generator from CPack the file NSIS.template.in is
used to generate a project.nsi file for NSIS to process.  The file
consists code in the NSIS scripting language.  Among other functions
there is an onInit function the initializes the installer.  The function
(tries to) recognise admin and power users but fails since NSIS
scripting language relative includes the jump from the current command
so +3 means "run the third command after this one", so a failed check
for admin completely skips the check for a power user and goes directly
to "done:".

User permission lookup was added in initial NSIS support by commit
a11b9a4c (Merge from CPack branch, 2006-01-01).  Later commit b1b052fd
(Several changes to for NSIS, 2006-03-01) added a line inside a block
that should be skipped by a jump without updating the jump length.
Update the jump length to correct the behavior.
2012-02-01 08:18:49 -05:00
Clinton Stimpson e6d2bcfde2 CPack/NSIS: Fix reinstall and multiple install issues when using components.
Fix NSIS template to more thoroughly use CPACK_PACKAGE_INSTALL_REGISTRY_KEY.
This allows different versions of software to have a separate sections in the
registry to keep track of things (installed components, and uninstall stuff).

Change default of CPACK_PACKAGE_INSTALL_REGISTRY_KEY to follow the value of
CPACK_PACKAGE_INSTALL_DIRECTORY so if an installation overwrites another installation,
the proper registry entries are more likely to be overwritten.

Fix CPack/NSIS generator to not insert code in the NSIS template to skip installation
of already installed components.  This enables a repair like behavior and also enables
installing patch releases on top of an older installation.
2011-07-29 12:23:22 -06:00
Brad King b524f864ca Merge topic 'fix-9148-cpack-nsis-installer-root'
5a9e8e7 CPack: Add CPACK_NSIS_INSTALL_ROOT variable (#9148)
2011-01-11 15:48:34 -05:00
David Cole 5a9e8e701e CPack: Add CPACK_NSIS_INSTALL_ROOT variable (#9148)
Control the root directory of the default directory presented to
the end user of an NSIS installer by a CPack variable.

Previously, the value used in the NSIS script was $PROGRAMFILES,
which is equivalent to the "ProgramFiles" environment variable.
That default value is still the same, but now a project may
override the value by setting this new variable.
2011-01-11 15:42:42 -05:00
Mike McQuaid bee514c361 Add CPack NSIS MUI_FINISHPAGE_RUN support (#11144)
MUI_FINISHPAGE_RUN is frequently used with NSIS and provides a checkbox
on the finish page of an installer which specifies whether the specified
executable should be run when the installer exits. This commit adds support
for this setting in CPack.
2011-01-06 16:21:36 -05:00
Bill Hoffman 0619813e03 Fix for bug #10257, NSIS could remove a PATH if it was too long 2010-02-09 13:57:46 -05:00
David Cole ece03cadc4 Fix issue #9011 - eliminate unnecessary uses of CPACK_PACKAGE_INSTALL_DIRECTORY.
Replace them with CPACK_PACKAGE_NAME. The registry keys involved in this commit are used by Windows to track things in the Add/Remove programs portion of the Control Panel. With '\' characters in the keyname, the calls do not do what they are intended to do and the installed program never shows up in the control panel view. (Details noted in the issue itself.) Thanks to 'killerfox' for the patch.
2009-12-15 13:12:05 -05:00
Bill Hoffman 7d9e5b88ff Allow for /D to change install directory on the command line. 2009-10-26 17:14:56 -04:00
David Cole b272c61945 Fix issue #8649 - move the location of CPACK_NSIS_EXTRA_INSTALL_COMMANDS so that it is not excluded from execution when 'Do not create shortcuts' is checked. 2009-10-04 14:19:43 -04:00
David Cole c181408ad8 BUG: Fix issue #8177. Modify the system PATH for all users when requested during an NSIS based installer run. Thanks to Bart Janssens for the patch. 2009-09-24 14:59:24 -04:00
David Cole 85733c17c5 BUG: Re-fix issue #8682. Use new variable CPACK_NSIS_PACKAGE_NAME in appropriate places rather than CPACK_NSIS_DISPLAY_NAME. CPACK_NSIS_DISPLAY_NAME is the Add/Remove control panel's description string for the installed package. Using it as the "Name" of the NSIS installer package made the CMake installer itself use really long strings in the installer GUI. This fix still allows for the original intent of the first fix for #8682 -- the ability to separate the installer name from the default install directory, but it uses a new/different variable to achieve the separation. 2009-07-16 11:48:30 -04:00
David Cole 698cf0c886 BUG: Fix issue #8682. Use CPACK_NSIS_DISPLAY_NAME in appropriate places rather than CPACK_PACKAGE_INSTALL_DIRECTORY. Clean separation of these two variables (which have the same value by default) allows an easy workaround for issue #7881, too. 2009-04-07 15:31:51 -04:00
Bill Hoffman 9fef50d56f BUG: remove Catalan as 2.29 does not have it 2008-09-02 14:46:45 -04:00
David Cole 862b3cae2c BUG: Do not use "Default" as a language, remove 2nd occurence of "English", and remove three other languages not supported by older versions of NSIS. Tested with version 2.18 of NSIS on gaia.kitware. 2008-08-26 16:43:27 -04:00
Bill Hoffman 532e5d144c BUG: remove extension from inserts 2008-08-22 06:56:51 -04:00
Bill Hoffman 2739331c95 ENH: sort languages and use list from NSIS 2.22 2008-08-21 15:13:22 -04:00
Bill Hoffman 2d7893180c BUG: remove some languages that are not supported in older versions of NSIS 2008-08-21 13:55:57 -04:00
Bill Hoffman 08cb1db528 ENH: try to fix error 2008-08-20 18:00:57 -04:00
Bill Hoffman 1d57093baf BUG: fix for 7446 NSIS support for other languages 2008-08-19 14:07:10 -04:00
David Cole 83ec8c3593 ENH: Further refinement of the CPack components functionality from Doug Gregor.
Details:
==========

 - New cpack_add_component, cpack_add_component_group, and
cpack_add_install_type "commands" defined as macros in the CPack
module.
 - Documentation for all of the variables and commands in the CPack module.
 - Added get_cmake_property(... COMPONENTS) to CMake to ask for the
names of all components. Used in the CPack module to automatically
build component-based installers. (Set CPACK_MONOLITHIC_INSTALL to
turn off component-based installation).
 - A group can declare its PARENT_GROUP, to build an arbitrary
hierarchy of groups.
 - New CPack command cpack_configure_downloads, which creates an
installer that downloads only the selected components on-the-fly.
Those components marked DOWNLOADED will be separate packages
downloaded on-the-fly (or, all packages can be marked as such with the
ALL option to cpack_configure_downloads). Individual components are
compressed with ZIP at installer-creation time and
downloaded/uncompressed by the installer as needed. This feature is
only available on Windows with NSIS at the moment.
 - NSIS installers can install themselves and enable the "Change"
button in Add/Remove programs, allowing users to go back and install
or remove components. This can be disabled through
cpack_configure_downloads, because it's only really useful is most of
the application's functionality is in downloaded components.
 - Bug fix: automatically install everything whose COMPONENT was not
specified (it's a hidden, required group)
 - Bug fix: fixed removal of components when re-running the NSIS
installer and unchecking components
 - Bug fix: NSIS installers now only install/remove the minimal
number of files when re-run to update the installation (or by clicking
"Change" in Add/Remove programs)
2008-07-08 11:52:25 -04:00
David Cole 1105a86c52 ENH: Add patch for feature request #6847 - CPack components for NSIS and PackageMaker installers. Thanks to Doug Gregor for all the hard work involved with implementing this patch! Also added new test CPackComponents that is conditionally executed only when NSIS or PackageMaker installer builders are available. 2008-06-17 11:39:26 -04:00
Bill Hoffman 8d88da106f BUG: if CPACK_NSIS_MODIFY_PATH was OFF then the PATH was automatically modified 2008-05-13 16:57:49 -04:00
Bill Hoffman 02f79c7242 ENH: add ability to set installer icons, links to web pages, nsis code in the icon section of the template, and ability to escape variables correctly 2007-10-29 08:11:44 -04:00
Bill Hoffman cfb84d8562 ENH: allow CPACK_PACKAGE_ICON to be not set 2007-10-22 11:40:07 -04:00
Bill Hoffman 3e03bca2cd ENH: add ability to create links on the start menu 2007-10-18 09:40:10 -04:00
Bill Hoffman 0eba9b638f ENH: allow for desktop link to be created and fix chop of last char in PATH on uninstall 2007-09-18 15:16:21 -04:00
Brad King bf74cd9d83 BUG: Compression must be set before any output is created. 2006-10-13 15:04:18 -04:00
Andy Cedilnik b548e2db1f ENH: Add NSIS compression 2006-10-12 14:59:43 -04:00
Bill Hoffman 5b3a2c84fc ENH: use radio buttons to choose PATH options 2006-05-10 12:15:00 -04:00
Andy Cedilnik e1b163d4db ENH: Some cleanups and fix installing as a non-admin 2006-05-08 13:34:16 -04:00
Andy Cedilnik f816c4e09b ENH: Handle the no-icon case 2006-04-30 03:10:55 -04:00
Andy Cedilnik de4127cdda ENH: Add more install registry options 2006-04-29 20:01:34 -04:00
Andy Cedilnik 619ebce6cf ENH: Add NSIS options page for path selection, fix adding and removing from path, add welcome page and license page 2006-04-29 19:22:21 -04:00
Andy Cedilnik 8d2c78f43c ENH: Better support for adding and removing path 2006-04-27 16:20:07 -04:00
Andy Cedilnik 4e9564a0f1 ENH: Propagate system name and handle win32/win64 name 2006-04-23 19:45:43 -04:00
Andy Cedilnik 8bb82f430c ENH: Add a line to Add/Remove programs to uninstall 2006-04-23 18:23:42 -04:00
Andy Cedilnik b1b052fd23 ENH: Several changes to for NSIS 2006-03-01 15:00:07 -05:00
Andy Cedilnik ee227d3af5 ENH: Several packaging issues. Allow random variables to be passed to cpack (anything starting with CPACK_, add preinstall to the list of dependencies for package, fix typos 2006-02-27 10:58:20 -05:00
Andy Cedilnik 1d96f839d7 ENH: Several NSIS features 2006-02-23 09:38:40 -05:00
Andy Cedilnik b07ece004c ENH: More work on NSI to improve installing and uninstalling 2006-02-16 15:20:23 -05:00
Andy Cedilnik 21975ceda5 ENH: Better handling of executables on windows 2006-02-14 14:29:15 -05:00