summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend.aasland@innova.no>2021-10-07 21:31:03 (GMT)
committerErlend E. Aasland <erlend.aasland@innova.no>2021-10-08 20:20:06 (GMT)
commit6d39c845eece813870e065802b4fd9b05ab212d9 (patch)
treed48d14648ef9b1368f17bfc13fcb62575243f3fa /Source/CPack
parent3068ea834ff17bd5d2e8438c1a8d3a6331d10f62 (diff)
downloadCMake-6d39c845eece813870e065802b4fd9b05ab212d9.zip
CMake-6d39c845eece813870e065802b4fd9b05ab212d9.tar.gz
CMake-6d39c845eece813870e065802b4fd9b05ab212d9.tar.bz2
CPackIFW: Add support for ProductImages config option
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.cxx19
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.h3
2 files changed, 22 insertions, 0 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
index 7ee6300..2442c4f 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
@@ -508,6 +515,18 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
xout.Element("ControlScript", name);
}
+ // 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