mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-08 08:09:42 -06:00
CPackIFW: Add support for DisableCommandLineInterface config attribute
This commit is contained in:
committed by
Brad King
parent
1c12694124
commit
6b12edfe82
@@ -195,6 +195,14 @@ Package
|
||||
|
||||
Is ``ON`` for QtIFW less 2.0 tools.
|
||||
|
||||
.. variable:: CPACK_IFW_PACKAGE_DISABLE_COMMAND_LINE_INTERFACE
|
||||
|
||||
.. versionadded:: 3.23
|
||||
|
||||
Set to ``ON`` if command line interface features should be disabled.
|
||||
|
||||
Is ``OFF`` by default, but will only have an effect if using QtIFW 4.0 or later.
|
||||
|
||||
.. variable:: CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
cpackifw-package-disable-command-line-interface
|
||||
-----------------------------------------------
|
||||
|
||||
* The :cpack_gen:`CPack IFW Generator` gained new
|
||||
:variable:`CPACK_IFW_PACKAGE_DISABLE_COMMAND_LINE_INTERFACE` variable to
|
||||
prevents the user from passing any consumer command to installer, like
|
||||
``install``, ``update``, and ``remove``.
|
||||
This feature is available for QtIFW 4.0 and newer.
|
||||
@@ -254,6 +254,16 @@ void cmCPackIFWInstaller::ConfigureFromOptions()
|
||||
}
|
||||
}
|
||||
|
||||
// DisableCommandLineInterface
|
||||
if (this->GetOption("CPACK_IFW_PACKAGE_DISABLE_COMMAND_LINE_INTERFACE")) {
|
||||
if (this->IsOn("CPACK_IFW_PACKAGE_DISABLE_COMMAND_LINE_INTERFACE")) {
|
||||
this->DisableCommandLineInterface = "true";
|
||||
} else if (this->IsSetToOff(
|
||||
"CPACK_IFW_PACKAGE_DISABLE_COMMAND_LINE_INTERFACE")) {
|
||||
this->DisableCommandLineInterface = "false";
|
||||
}
|
||||
}
|
||||
|
||||
// Space in path
|
||||
if (this->GetOption("CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH")) {
|
||||
if (this->IsOn("CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH")) {
|
||||
@@ -518,6 +528,12 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
|
||||
if (!this->WizardShowPageList.empty()) {
|
||||
xout.Element("WizardShowPageList", this->WizardShowPageList);
|
||||
}
|
||||
|
||||
// DisableCommandLineInterface
|
||||
if (!this->DisableCommandLineInterface.empty()) {
|
||||
xout.Element("DisableCommandLineInterface",
|
||||
this->DisableCommandLineInterface);
|
||||
}
|
||||
}
|
||||
|
||||
if (!this->RemoveTargetDir.empty()) {
|
||||
|
||||
@@ -109,6 +109,9 @@ public:
|
||||
/// uninstalling
|
||||
std::string RemoveTargetDir;
|
||||
|
||||
/// Set to true if command line interface features should be disabled
|
||||
std::string DisableCommandLineInterface;
|
||||
|
||||
/// Set to false if the installation path cannot contain space characters
|
||||
std::string AllowSpaceInPath;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user