diff options
author | Brad King <brad.king@kitware.com> | 2016-09-19 12:55:12 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-09-19 12:55:12 (GMT) |
commit | 34b49df564be8b779ea8a3d5d4a3c3a70bc51510 (patch) | |
tree | 8036820149426fc1ea881105cc7eb40e101d8866 /Source | |
parent | 0a4d15a9e2c6605ad22b61fd3ede697bef17b366 (diff) | |
parent | c2f0f41f6372a6a810f43cab3ebba70261231c70 (diff) | |
download | CMake-34b49df564be8b779ea8a3d5d4a3c3a70bc51510.zip CMake-34b49df564be8b779ea8a3d5d4a3c3a70bc51510.tar.gz CMake-34b49df564be8b779ea8a3d5d4a3c3a70bc51510.tar.bz2 |
Merge topic 'ifw-user-interfaces'
c2f0f41f CPackIFW: Add USER_INTERFACES option
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWPackage.cxx | 30 | ||||
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWPackage.h | 3 |
2 files changed, 33 insertions, 0 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx index bc503fc..2d3cf12 100644 --- a/Source/CPack/IFW/cmCPackIFWPackage.cxx +++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx @@ -153,6 +153,7 @@ void cmCPackIFWPackage::DefaultConfiguration() ReleaseDate = ""; Script = ""; Licenses.clear(); + UserInterfaces.clear(); SortingPriority = ""; Default = ""; Essential = ""; @@ -229,6 +230,12 @@ int cmCPackIFWPackage::ConfigureFromComponent(cmCPackComponent* component) Script = option; } + // User interfaces + if (const char* option = this->GetOption(prefix + "USER_INTERFACES")) { + UserInterfaces.clear(); + cmSystemTools::ExpandListArgument(option, UserInterfaces); + } + // CMake dependencies if (!component->Dependencies.empty()) { std::vector<cmCPackComponent*>::iterator dit; @@ -322,6 +329,12 @@ int cmCPackIFWPackage::ConfigureFromGroup(cmCPackComponentGroup* group) Script = option; } + // User interfaces + if (const char* option = this->GetOption(prefix + "USER_INTERFACES")) { + UserInterfaces.clear(); + cmSystemTools::ExpandListArgument(option, UserInterfaces); + } + // Licenses if (const char* option = this->GetOption(prefix + "LICENSES")) { Licenses.clear(); @@ -417,6 +430,23 @@ void cmCPackIFWPackage::GeneratePackageFile() xout.Element("Script", name); } + // User Interfaces (copy to meta dir) + std::vector<std::string> userInterfaces = UserInterfaces; + for (size_t i = 0; i < userInterfaces.size(); i++) { + std::string name = cmSystemTools::GetFilenameName(userInterfaces[i]); + std::string path = Directory + "/meta/" + name; + cmsys::SystemTools::CopyFileIfDifferent(userInterfaces[i].data(), + path.data()); + userInterfaces[i] = name; + } + if (!userInterfaces.empty()) { + xout.StartElement("UserInterfaces"); + for (size_t i = 0; i < userInterfaces.size(); i++) { + xout.Element("UserInterface", userInterfaces[i]); + } + xout.EndElement(); + } + // Dependencies std::set<DependenceStruct> compDepSet; for (std::set<DependenceStruct*>::iterator ait = AlienDependencies.begin(); diff --git a/Source/CPack/IFW/cmCPackIFWPackage.h b/Source/CPack/IFW/cmCPackIFWPackage.h index 579eeb8..739ae3e 100644 --- a/Source/CPack/IFW/cmCPackIFWPackage.h +++ b/Source/CPack/IFW/cmCPackIFWPackage.h @@ -99,6 +99,9 @@ public: /// List of license agreements to be accepted by the installing user std::vector<std::string> Licenses; + /// List of pages to load + std::vector<std::string> UserInterfaces; + /// Priority of the component in the tree std::string SortingPriority; |