mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 13:19:51 -05:00
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
This commit is contained in:
@@ -248,6 +248,14 @@ Package
|
||||
By default is ``OFF`` or used value
|
||||
from ``CPACK_DOWNLOAD_ALL`` if set
|
||||
|
||||
.. variable:: CPACK_IFW_PACKAGE_PRODUCT_IMAGES
|
||||
|
||||
.. versionadded:: 3.23
|
||||
|
||||
A list of images to be shown on the ``PerformInstallationPage``.
|
||||
|
||||
This feature is available for QtIFW 4.0.0 or newer.
|
||||
|
||||
Components
|
||||
""""""""""
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
cpackifw-package-product-images
|
||||
-------------------------------
|
||||
|
||||
* The :cpack_gen:`CPack IFW Generator` gained the new
|
||||
:variable:`CPACK_IFW_PACKAGE_PRODUCT_IMAGES` variable for adding a list of
|
||||
images to be shown on the ``PerformInstallationPage``.
|
||||
This feature is available for QtIFW 4.0 and newer.
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user