diff options
author | Brad King <brad.king@kitware.com> | 2021-10-13 12:59:34 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-10-13 13:00:02 (GMT) |
commit | d7e9ad926a53815b6c9eabeb0c1b315ddd845a23 (patch) | |
tree | 1b18ae73c5f0f562704597970c43176915c8b113 /Source | |
parent | be544174310cd783cc40f435f7b77d5660658d6a (diff) | |
parent | 6d39c845eece813870e065802b4fd9b05ab212d9 (diff) | |
download | CMake-d7e9ad926a53815b6c9eabeb0c1b315ddd845a23.zip CMake-d7e9ad926a53815b6c9eabeb0c1b315ddd845a23.tar.gz CMake-d7e9ad926a53815b6c9eabeb0c1b315ddd845a23.tar.bz2 |
Merge topic 'ifw-product-images'
6d39c845ee CPackIFW: Add support for ProductImages config option
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6611
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWInstaller.cxx | 19 | ||||
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWInstaller.h | 3 |
2 files changed, 22 insertions, 0 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx index 90465d8..d356f7d 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx +++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx @@ -275,6 +275,13 @@ void cmCPackIFWInstaller::ConfigureFromOptions() this->Resources.clear(); cmExpandList(optIFW_PACKAGE_RESOURCES, this->Resources); } + + // ProductImages + if (cmValue productImages = + this->GetOption("CPACK_IFW_PACKAGE_PRODUCT_IMAGES")) { + this->ProductImages.clear(); + cmExpandList(productImages, this->ProductImages); + } } /** \class cmCPackIFWResourcesParser @@ -517,6 +524,18 @@ void cmCPackIFWInstaller::GenerateInstallerFile() xout.Element("RemoveTargetDir", this->RemoveTargetDir); } + // Product images (copy to config dir) + if (!this->IsVersionLess("4.0") && !this->ProductImages.empty()) { + xout.StartElement("ProductImages"); + for (auto const& srcImg : this->ProductImages) { + std::string name = cmSystemTools::GetFilenameName(srcImg); + std::string dstImg = this->Directory + "/config/" + name; + cmsys::SystemTools::CopyFileIfDifferent(srcImg, dstImg); + xout.Element("Image", name); + } + xout.EndElement(); + } + // Resources (copy to resources dir) if (!this->Resources.empty()) { std::vector<std::string> resources; diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.h b/Source/CPack/IFW/cmCPackIFWInstaller.h index a031fc2..ad2d472 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.h +++ b/Source/CPack/IFW/cmCPackIFWInstaller.h @@ -118,6 +118,9 @@ public: /// List of resources to include in the installer binary std::vector<std::string> Resources; + /// A list of images to be shown on PerformInstallationPage. + std::vector<std::string> ProductImages; + public: // Internal implementation |