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:
Clinton Stimpson
2011-07-29 12:23:22 -06:00
parent 5ef20b2dc5
commit e6d2bcfde2
3 changed files with 11 additions and 15 deletions

View File

@@ -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