diff options
author | Zaytsev Yuriy <ghare@mail.ru> | 2019-04-29 19:08:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-05-02 17:01:31 (GMT) |
commit | c474fb2777ea3e675237fccf23f64fe37371a5b0 (patch) | |
tree | 33a1edf67fe2301dc304c06c610a404ca81a7d04 /Source | |
parent | 1c7863a7654724af0afca6d20b80a50153f6d5f7 (diff) | |
download | CMake-c474fb2777ea3e675237fccf23f64fe37371a5b0.zip CMake-c474fb2777ea3e675237fccf23f64fe37371a5b0.tar.gz CMake-c474fb2777ea3e675237fccf23f64fe37371a5b0.tar.bz2 |
CPack/IFW: Add StyleSheet field
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWInstaller.cxx | 17 | ||||
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWInstaller.h | 3 |
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; |