Merge topic 'wix-remember-install-dir'

e785fab5 CPackWiX: Teach WiX installers to remember the install location for upgrades
This commit is contained in:
Brad King 2014-09-22 09:13:21 -04:00 committed by CMake Topic Stage
commit 0ab2718448
1 changed files with 23 additions and 0 deletions

View File

@ -360,6 +360,29 @@ void cmCPackWIXGenerator::CreateWiXPropertiesIncludeFile()
includeFile.EndElement("Property");
}
}
if(GetOption("CPACK_WIX_PROPERTY_ARPINSTALLLOCATION") == 0)
{
includeFile.BeginElement("Property");
includeFile.AddAttribute("Id", "INSTALL_ROOT");
includeFile.AddAttribute("Secure", "yes");
includeFile.BeginElement("RegistrySearch");
includeFile.AddAttribute("Id", "FindInstallLocation");
includeFile.AddAttribute("Root", "HKLM");
includeFile.AddAttribute("Key", "Software\\Microsoft\\Windows\\"
"CurrentVersion\\Uninstall\\[WIX_UPGRADE_DETECTED]");
includeFile.AddAttribute("Name", "InstallLocation");
includeFile.AddAttribute("Type", "raw");
includeFile.EndElement("RegistrySearch");
includeFile.EndElement("Property");
includeFile.BeginElement("SetProperty");
includeFile.AddAttribute("Id", "ARPINSTALLLOCATION");
includeFile.AddAttribute("Value", "[INSTALL_ROOT]");
includeFile.AddAttribute("After", "CostFinalize");
includeFile.EndElement("SetProperty");
}
}
void cmCPackWIXGenerator::CopyDefinition(