summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-10-19 13:01:56 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-10-19 13:02:07 (GMT)
commit9f1ab65806a3d132ead1f8d964233b3c5cf6f197 (patch)
tree345cc5c54c3f8aff181d8a2373eef887027abfce /Source/CPack
parent239b280f7683c441249d1efb159b8c17ac6117de (diff)
parentf2f4e66f64c5bd574fd868af928bdd6ee39cfc86 (diff)
downloadCMake-9f1ab65806a3d132ead1f8d964233b3c5cf6f197.zip
CMake-9f1ab65806a3d132ead1f8d964233b3c5cf6f197.tar.gz
CMake-9f1ab65806a3d132ead1f8d964233b3c5cf6f197.tar.bz2
Merge topic 'ifw-run-program'
f2f4e66f64 CPackIFW: Add support for RunProgram* config variables Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Konstantin Podsvirov <konstantin@podsvirov.pro> Merge-request: !6610
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.cxx33
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.h11
2 files changed, 44 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()) {
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.h b/Source/CPack/IFW/cmCPackIFWInstaller.h
index 047f287..0ace099 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.h
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.h
@@ -124,6 +124,17 @@ public:
/// A list of images to be shown on PerformInstallationPage.
std::vector<std::string> ProductImages;
+ /// Command executed after the installer is done if the user accepts the
+ /// action
+ std::string RunProgram;
+
+ /// Arguments passed to the program specified in <RunProgram>
+ std::vector<std::string> RunProgramArguments;
+
+ /// Text shown next to the check box for running the program after the
+ /// installation
+ std::string RunProgramDescription;
+
public:
// Internal implementation