diff options
author | Brad King <brad.king@kitware.com> | 2019-05-03 15:46:05 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-05-03 15:46:25 (GMT) |
commit | 6f242acfcb72881d184f5b2468fd4ddcadce01d8 (patch) | |
tree | 68e7a7fd4a5a56ba38af0f7fa54a5886928a0d9b | |
parent | 9713154cf609691dfe9b8484c16cc034ea52d799 (diff) | |
parent | c474fb2777ea3e675237fccf23f64fe37371a5b0 (diff) | |
download | CMake-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
-rw-r--r-- | Help/cpack_gen/ifw.rst | 4 | ||||
-rw-r--r-- | Help/release/dev/cpackifw-package-style-sheet.rst | 6 | ||||
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWInstaller.cxx | 17 | ||||
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWInstaller.h | 3 |
4 files changed, 30 insertions, 0 deletions
diff --git a/Help/cpack_gen/ifw.rst b/Help/cpack_gen/ifw.rst index e43b1d6..feccd3d 100644 --- a/Help/cpack_gen/ifw.rst +++ b/Help/cpack_gen/ifw.rst @@ -135,6 +135,10 @@ Package Wizard style to be used ("Modern", "Mac", "Aero" or "Classic"). +.. variable:: CPACK_IFW_PACKAGE_STYLE_SHEET + + Filename for a stylesheet. + .. variable:: CPACK_IFW_PACKAGE_WIZARD_DEFAULT_WIDTH Default width of the wizard in pixels. Setting a banner image will override this. diff --git a/Help/release/dev/cpackifw-package-style-sheet.rst b/Help/release/dev/cpackifw-package-style-sheet.rst new file mode 100644 index 0000000..cf99244 --- /dev/null +++ b/Help/release/dev/cpackifw-package-style-sheet.rst @@ -0,0 +1,6 @@ +cpackifw-package-style-sheet +---------------------------- + +* The :cpack_gen:`CPack IFW Generator` gained a new + :variable:`CPACK_IFW_PACKAGE_STYLE_SHEET` variable to customize the + installer stylesheet. 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; |