| 435 | } |
| 436 | |
| 437 | void cmCPackWIXGenerator::CreateWiXPropertiesIncludeFile() |
| 438 | { |
| 439 | std::string includeFilename = |
| 440 | cmStrCat(this->CPackTopLevel, "/properties.wxi"); |
| 441 | |
| 442 | cmWIXSourceWriter includeFile(this->WixVersion, this->Logger, |
| 443 | includeFilename, this->ComponentGuidType, |
| 444 | cmWIXSourceWriter::INCLUDE_ELEMENT_ROOT); |
| 445 | InjectXmlNamespaces(includeFile); |
| 446 | |
| 447 | std::string prefix = "CPACK_WIX_PROPERTY_"; |
| 448 | std::vector<std::string> options = GetOptions(); |
| 449 | |
| 450 | for (std::string const& name : options) { |
| 451 | if (cmHasPrefix(name, prefix)) { |
| 452 | std::string id = name.substr(prefix.length()); |
| 453 | std::string value = GetOption(name); |
| 454 | |
| 455 | includeFile.BeginElement("Property"); |
| 456 | includeFile.AddAttribute("Id", id); |
| 457 | includeFile.AddAttribute("Value", value); |
| 458 | includeFile.EndElement("Property"); |
| 459 | } |
| 460 | } |
| 461 | |
| 462 | if (!GetOption("CPACK_WIX_PROPERTY_ARPINSTALLLOCATION")) { |
| 463 | includeFile.BeginElement("Property"); |
| 464 | includeFile.AddAttribute("Id", "INSTALL_ROOT"); |
| 465 | includeFile.AddAttribute("Secure", "yes"); |
| 466 | |
| 467 | includeFile.BeginElement("RegistrySearch"); |
| 468 | includeFile.AddAttribute("Id", "FindInstallLocation"); |
| 469 | includeFile.AddAttribute("Root", "HKLM"); |
| 470 | includeFile.AddAttribute( |
| 471 | "Key", |
| 472 | "Software\\Microsoft\\Windows\\" |
| 473 | "CurrentVersion\\Uninstall\\[WIX_UPGRADE_DETECTED]"); |
| 474 | includeFile.AddAttribute("Name", "InstallLocation"); |
| 475 | includeFile.AddAttribute("Type", "raw"); |
| 476 | includeFile.EndElement("RegistrySearch"); |
| 477 | includeFile.EndElement("Property"); |
| 478 | |
| 479 | includeFile.BeginElement("SetProperty"); |
| 480 | includeFile.AddAttribute("Id", "ARPINSTALLLOCATION"); |
| 481 | includeFile.AddAttribute("Value", "[INSTALL_ROOT]"); |
| 482 | includeFile.AddAttribute("After", "CostFinalize"); |
| 483 | includeFile.EndElement("SetProperty"); |
| 484 | } |
| 485 | } |
| 486 | |
| 487 | void cmCPackWIXGenerator::CreateWiXProductFragmentIncludeFile() |
| 488 | { |
nothing calls this directly
no test coverage detected