summaryrefslogtreecommitdiffstats
path: root/Source/CPack/IFW/cmCPackIFWInstaller.cxx
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend.aasland@innova.no>2021-10-07 20:56:44 (GMT)
committerErlend E. Aasland <erlend.aasland@innova.no>2021-10-17 19:15:57 (GMT)
commitf2f4e66f64c5bd574fd868af928bdd6ee39cfc86 (patch)
tree35aa12aa591a6ea0f5abce3c246c61968eb25802 /Source/CPack/IFW/cmCPackIFWInstaller.cxx
parent47cc20fc67357f796b1a51583a9e182bf78bfb69 (diff)
downloadCMake-f2f4e66f64c5bd574fd868af928bdd6ee39cfc86.zip
CMake-f2f4e66f64c5bd574fd868af928bdd6ee39cfc86.tar.gz
CMake-f2f4e66f64c5bd574fd868af928bdd6ee39cfc86.tar.bz2
CPackIFW: Add support for RunProgram* config variables
This patch adds support for specifying <RunProgram>, <RunProgramArguments>, and <RunProgramDescription> in the IFW configuration file.
Diffstat (limited to 'Source/CPack/IFW/cmCPackIFWInstaller.cxx')
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.cxx33
1 files changed, 33 insertions, 0 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
index 0948a84..a94ca48 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
@@ -292,6 +292,20 @@ void cmCPackIFWInstaller::ConfigureFromOptions()
this->ProductImages.clear();
cmExpandList(productImages, this->ProductImages);
}
+
+ // Run program, run program arguments, and run program description
+ if (cmValue program = this->GetOption("CPACK_IFW_PACKAGE_RUN_PROGRAM")) {
+ this->RunProgram = *program;
+ }
+ if (cmValue arguments =
+ this->GetOption("CPACK_IFW_PACKAGE_RUN_PROGRAM_ARGUMENTS")) {
+ this->RunProgramArguments.clear();
+ cmExpandList(arguments, this->RunProgramArguments);
+ }
+ if (cmValue description =
+ this->GetOption("CPACK_IFW_PACKAGE_RUN_PROGRAM_DESCRIPTION")) {
+ this->RunProgramDescription = *description;
+ }
}
/** \class cmCPackIFWResourcesParser
@@ -542,6 +556,25 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
xout.Element("DisableCommandLineInterface",
this->DisableCommandLineInterface);
}
+
+ // RunProgram
+ if (!this->RunProgram.empty()) {
+ xout.Element("RunProgram", this->RunProgram);
+ }
+
+ // RunProgramArguments
+ if (!this->RunProgramArguments.empty()) {
+ xout.StartElement("RunProgramArguments");
+ for (const auto& arg : this->RunProgramArguments) {
+ xout.Element("Argument", arg);
+ }
+ xout.EndElement();
+ }
+
+ // RunProgramDescription
+ if (!this->RunProgramDescription.empty()) {
+ xout.Element("RunProgramDescription", this->RunProgramDescription);
+ }
}
if (!this->RemoveTargetDir.empty()) {