cmake/Source/CPack/IFW/cmCPackIFWInstaller.h

160 lines
3.9 KiB
C
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
2021-09-14 00:13:48 +02:00
#pragma once
2015-04-27 22:25:09 +02:00
2017-07-20 19:35:53 +02:00
#include "cmConfigure.h" // IWYU pragma: keep
2016-10-30 18:24:19 +01:00
#include <map>
#include <string>
#include <vector>
2015-04-27 22:25:09 +02:00
2020-02-01 23:06:01 +01:00
#include "cmCPackIFWCommon.h"
2016-10-30 18:24:19 +01:00
class cmCPackIFWPackage;
2016-07-09 11:21:54 +02:00
class cmCPackIFWRepository;
2015-04-27 22:25:09 +02:00
/** \class cmCPackIFWInstaller
* \brief A binary installer to be created CPack IFW generator
*/
2017-07-20 19:35:53 +02:00
class cmCPackIFWInstaller : public cmCPackIFWCommon
2015-04-27 22:25:09 +02:00
{
2016-07-09 11:21:54 +02:00
public:
// Types
2015-04-27 22:25:09 +02:00
2020-02-01 23:06:01 +01:00
using PackagesMap = std::map<std::string, cmCPackIFWPackage*>;
using RepositoriesVector = std::vector<cmCPackIFWRepository*>;
2015-04-27 22:25:09 +02:00
2016-07-09 11:21:54 +02:00
public:
// Constructor
2015-04-27 22:25:09 +02:00
/**
* Construct installer
*/
cmCPackIFWInstaller();
2016-07-09 11:21:54 +02:00
public:
// Configuration
2015-04-27 22:25:09 +02:00
/// Name of the product being installed
std::string Name;
/// Version number of the product being installed
std::string Version;
/// Name of the installer as displayed on the title bar
std::string Title;
/// Publisher of the software (as shown in the Windows Control Panel)
std::string Publisher;
/// URL to a page that contains product information on your web site
std::string ProductUrl;
/// Filename for a custom installer icon
std::string InstallerApplicationIcon;
/// Filename for a custom window icon
std::string InstallerWindowIcon;
/// Filename for a logo
std::string Logo;
2017-04-14 19:02:05 +02:00
/// Filename for a watermark
std::string Watermark;
/// Filename for a banner
std::string Banner;
/// Filename for a background
std::string Background;
/// Wizard style name
std::string WizardStyle;
2019-11-11 23:01:05 +01:00
/// Filename for a style sheet
std::string StyleSheet;
2017-04-14 19:02:05 +02:00
/// Wizard width
std::string WizardDefaultWidth;
/// Wizard height
std::string WizardDefaultHeight;
2021-09-14 00:13:48 +02:00
/// Set to false if the widget listing installer pages on the left side
/// of the wizard should not be shown
std::string WizardShowPageList;
2017-04-14 19:02:05 +02:00
/// Title color
std::string TitleColor;
2015-08-17 11:37:30 +02:00
/// Name of the default program group in the Windows Start menu
std::string StartMenuDir;
2015-04-27 22:25:09 +02:00
/// Default target directory for installation
std::string TargetDir;
/// Default target directory for installation with administrator rights
std::string AdminTargetDir;
2015-08-17 11:37:30 +02:00
/// Filename of the generated maintenance tool
std::string MaintenanceToolName;
/// Filename for the configuration of the generated maintenance tool
std::string MaintenanceToolIniFile;
/// Set to true if the installation path can contain non-ASCII characters
std::string AllowNonAsciiCharacters;
2018-04-23 21:13:27 +02:00
/// Set to false if the target directory should not be deleted when
/// uninstalling
std::string RemoveTargetDir;
2022-03-29 21:10:50 +02:00
/// Set to true if command line interface features should be disabled
std::string DisableCommandLineInterface;
2015-08-17 11:37:30 +02:00
/// Set to false if the installation path cannot contain space characters
std::string AllowSpaceInPath;
/// Filename for a custom installer control script
std::string ControlScript;
2016-10-30 18:24:19 +01:00
/// List of resources to include in the installer binary
std::vector<std::string> Resources;
2022-03-29 21:10:50 +02:00
/// 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;
#ifdef __APPLE__
/// Code signing identity for signing the generated app bundle
std::string SigningIdentity;
#endif
2016-07-09 11:21:54 +02:00
public:
// Internal implementation
2015-04-27 22:25:09 +02:00
void ConfigureFromOptions();
void GenerateInstallerFile();
void GeneratePackageFiles();
PackagesMap Packages;
2016-07-09 11:21:54 +02:00
RepositoriesVector RemoteRepositories;
2015-04-27 22:25:09 +02:00
std::string Directory;
2015-08-17 11:37:30 +02:00
protected:
2017-04-14 19:02:05 +02:00
void printSkippedOptionWarning(const std::string& optionName,
const std::string& optionValue);
2015-04-27 22:25:09 +02:00
};