mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-14 13:30:29 -05:00
CPack/IFW: Add StyleSheet field
This commit is contained in:
@@ -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.
|
||||
|
||||
6
Help/release/dev/cpackifw-package-style-sheet.rst
Normal file
6
Help/release/dev/cpackifw-package-style-sheet.rst
Normal file
@@ -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.
|
||||
@@ -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);
|
||||
|
||||
@@ -72,6 +72,9 @@ public:
|
||||
/// Wizard style name
|
||||
std::string WizardStyle;
|
||||
|
||||
/// Filename for a style sheet
|
||||
std::string StyleSheet;
|
||||
|
||||
/// Wizard width
|
||||
std::string WizardDefaultWidth;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user