summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-09-22 13:13:21 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-09-22 13:13:21 (GMT)
commit0ab2718448fbcdd1f85b76a7186b65a818a5cd1c (patch)
tree0175a0d156828e07a36e22d6dbcede67693fdca2 /Source
parent6771c0bbdbfcbcf2a217118f28162918e969bfc5 (diff)
parente785fab54b17349f01bc791d808de3319a30d95a (diff)
downloadCMake-0ab2718448fbcdd1f85b76a7186b65a818a5cd1c.zip
CMake-0ab2718448fbcdd1f85b76a7186b65a818a5cd1c.tar.gz
CMake-0ab2718448fbcdd1f85b76a7186b65a818a5cd1c.tar.bz2
Merge topic 'wix-remember-install-dir'
e785fab5 CPackWiX: Teach WiX installers to remember the install location for upgrades
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index a2995d1..b221ab4 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -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(