mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-15 14:00:40 -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").
|
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
|
.. variable:: CPACK_IFW_PACKAGE_WIZARD_DEFAULT_WIDTH
|
||||||
|
|
||||||
Default width of the wizard in pixels. Setting a banner image will override this.
|
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
|
// WizardDefaultWidth
|
||||||
if (const char* option =
|
if (const char* option =
|
||||||
this->GetOption("CPACK_IFW_PACKAGE_WIZARD_DEFAULT_WIDTH")) {
|
this->GetOption("CPACK_IFW_PACKAGE_WIZARD_DEFAULT_WIDTH")) {
|
||||||
@@ -381,6 +390,14 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
|
|||||||
xout.Element("WizardStyle", this->WizardStyle);
|
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
|
// WizardDefaultWidth
|
||||||
if (!this->WizardDefaultWidth.empty()) {
|
if (!this->WizardDefaultWidth.empty()) {
|
||||||
xout.Element("WizardDefaultWidth", this->WizardDefaultWidth);
|
xout.Element("WizardDefaultWidth", this->WizardDefaultWidth);
|
||||||
|
|||||||
@@ -72,6 +72,9 @@ public:
|
|||||||
/// Wizard style name
|
/// Wizard style name
|
||||||
std::string WizardStyle;
|
std::string WizardStyle;
|
||||||
|
|
||||||
|
/// Filename for a style sheet
|
||||||
|
std::string StyleSheet;
|
||||||
|
|
||||||
/// Wizard width
|
/// Wizard width
|
||||||
std::string WizardDefaultWidth;
|
std::string WizardDefaultWidth;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user