diff options
-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; |