diff options
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWPackage.cxx | 37 | ||||
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWPackage.h | 6 |
2 files changed, 43 insertions, 0 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx index 7b23005..d3ce15c 100644 --- a/Source/CPack/IFW/cmCPackIFWPackage.cxx +++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx @@ -482,6 +482,15 @@ int cmCPackIFWPackage::ConfigureFromPrefix(const std::string& prefix) this->ForcedInstallation = "false"; } + // Replaces + option = prefix + "REPLACES"; + if (this->IsSetToEmpty(option)) { + this->Replaces.clear(); + } else if (const char* value = this->GetOption(option)) { + this->Replaces.clear(); + cmSystemTools::ExpandListArgument(value, this->Replaces); + } + // Requires admin rights option = prefix + "REQUIRES_ADMIN_RIGHTS"; if (this->IsSetToEmpty(option)) { @@ -492,6 +501,16 @@ int cmCPackIFWPackage::ConfigureFromPrefix(const std::string& prefix) this->RequiresAdminRights = "false"; } + // Checkable + option = prefix + "CHECKABLE"; + if (this->IsSetToEmpty(option)) { + this->Checkable.clear(); + } else if (this->IsOn(option)) { + this->Checkable = "true"; + } else if (this->IsSetToOff(option)) { + this->Checkable = "false"; + } + return 1; } @@ -652,6 +671,19 @@ void cmCPackIFWPackage::GeneratePackageFile() xout.Element("ForcedInstallation", this->ForcedInstallation); } + // Replaces + if (!this->Replaces.empty()) { + std::ostringstream replaces; + std::vector<std::string>::iterator it = this->Replaces.begin(); + replaces << *it; + ++it; + while (it != this->Replaces.end()) { + replaces << "," << *it; + ++it; + } + xout.Element("Replaces", replaces.str()); + } + if (!this->RequiresAdminRights.empty()) { xout.Element("RequiresAdminRights", this->RequiresAdminRights); } @@ -672,6 +704,11 @@ void cmCPackIFWPackage::GeneratePackageFile() xout.Element("SortingPriority", this->SortingPriority); } + // Checkable + if (!this->Checkable.empty()) { + xout.Element("Checkable", this->Checkable); + } + xout.EndElement(); xout.EndDocument(); } diff --git a/Source/CPack/IFW/cmCPackIFWPackage.h b/Source/CPack/IFW/cmCPackIFWPackage.h index cec59b0..ae41146 100644 --- a/Source/CPack/IFW/cmCPackIFWPackage.h +++ b/Source/CPack/IFW/cmCPackIFWPackage.h @@ -114,9 +114,15 @@ public: /// Determines that the package must always be installed std::string ForcedInstallation; + /// List of components to replace + std::vector<std::string> Replaces; + /// Package needs to be installed with elevated permissions std::string RequiresAdminRights; + /// Set to false if you want to hide the checkbox for an item + std::string Checkable; + public: // Internal implementation |