mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-28 19:58:34 -06:00
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.
This commit is contained in:
@@ -672,9 +672,6 @@ CreateComponentDescription(cmCPackComponent *component,
|
||||
}
|
||||
componentCode += " SetOutPath \"$INSTDIR\"\n";
|
||||
|
||||
componentCode += " IntCmp $" + component->Name
|
||||
+ "_was_installed ${SF_SELECTED} noinstall_" + component->Name + "\n";
|
||||
|
||||
// Create the actual installation commands
|
||||
if (component->IsDownloaded)
|
||||
{
|
||||
@@ -824,7 +821,6 @@ CreateComponentDescription(cmCPackComponent *component,
|
||||
componentCode += " File /r \"${INST_DIR}\\" +
|
||||
component->Name + "\\*.*\"\n";
|
||||
}
|
||||
componentCode += " noinstall_" + component->Name + ":\n";
|
||||
componentCode += "SectionEnd\n";
|
||||
|
||||
// Macro used to remove the component
|
||||
|
||||
Reference in New Issue
Block a user