summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-05-03 15:46:05 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-05-03 15:46:25 (GMT)
commit6f242acfcb72881d184f5b2468fd4ddcadce01d8 (patch)
tree68e7a7fd4a5a56ba38af0f7fa54a5886928a0d9b /Source/CPack
parent9713154cf609691dfe9b8484c16cc034ea52d799 (diff)
parentc474fb2777ea3e675237fccf23f64fe37371a5b0 (diff)
downloadCMake-6f242acfcb72881d184f5b2468fd4ddcadce01d8.zip
CMake-6f242acfcb72881d184f5b2468fd4ddcadce01d8.tar.gz
CMake-6f242acfcb72881d184f5b2468fd4ddcadce01d8.tar.bz2
Merge topic 'cpack-ifw-stylesheet'
c474fb2777 CPack/IFW: Add StyleSheet field Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3270
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.cxx17
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.h3
2 files changed, 20 insertions, 0 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
index 01e3ea4..a075a17 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
@@ -152,6 +152,15 @@ void cmCPackIFWInstaller::ConfigureFromOptions()
}
}
+ // StyleSheet
+ if (const char* option = this->GetOption("CPACK_IFW_PACKAGE_STYLE_SHEET")) {
+ if (cmSystemTools::FileExists(option)) {
+ this->StyleSheet = option;
+ } else {
+ this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_STYLE_SHEET", option);
+ }
+ }
+
// WizardDefaultWidth
if (const char* option =
this->GetOption("CPACK_IFW_PACKAGE_WIZARD_DEFAULT_WIDTH")) {
@@ -381,6 +390,14 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
xout.Element("WizardStyle", this->WizardStyle);
}
+ // Stylesheet
+ if (!this->StyleSheet.empty()) {
+ std::string name = cmSystemTools::GetFilenameName(this->StyleSheet);
+ std::string path = this->Directory + "/config/" + name;
+ cmsys::SystemTools::CopyFileIfDifferent(this->StyleSheet, path);
+ xout.Element("StyleSheet", name);
+ }
+
// WizardDefaultWidth
if (!this->WizardDefaultWidth.empty()) {
xout.Element("WizardDefaultWidth", this->WizardDefaultWidth);
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.h b/Source/CPack/IFW/cmCPackIFWInstaller.h
index 37ad339..be51fa5 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.h
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.h
@@ -72,6 +72,9 @@ public:
/// Wizard style name
std::string WizardStyle;
+ /// Filename for a style sheet
+ std::string StyleSheet;
+
/// Wizard width
std::string WizardDefaultWidth;