CMake Nightly Date Stamp
[kiteware-cmake.git] / Source / CPack / IFW / cmCPackIFWInstaller.h
blobfb980d7c7658c73699b77ecac216e67ad5b0e6cc
1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
3 #pragma once
5 #include "cmConfigure.h" // IWYU pragma: keep
7 #include <map>
8 #include <string>
9 #include <vector>
11 #include "cmCPackIFWCommon.h"
13 class cmCPackIFWPackage;
14 class cmCPackIFWRepository;
16 /** \class cmCPackIFWInstaller
17 * \brief A binary installer to be created CPack IFW generator
19 class cmCPackIFWInstaller : public cmCPackIFWCommon
21 public:
22 // Types
24 using PackagesMap = std::map<std::string, cmCPackIFWPackage*>;
25 using RepositoriesVector = std::vector<cmCPackIFWRepository*>;
27 public:
28 // Constructor
30 /**
31 * Construct installer
33 cmCPackIFWInstaller();
35 public:
36 // Configuration
38 /// Name of the product being installed
39 std::string Name;
41 /// Version number of the product being installed
42 std::string Version;
44 /// Name of the installer as displayed on the title bar
45 std::string Title;
47 /// Publisher of the software (as shown in the Windows Control Panel)
48 std::string Publisher;
50 /// URL to a page that contains product information on your web site
51 std::string ProductUrl;
53 /// Filename for a custom installer icon
54 std::string InstallerApplicationIcon;
56 /// Filename for a custom window icon
57 std::string InstallerWindowIcon;
59 /// Filename for a logo
60 std::string Logo;
62 /// Filename for a watermark
63 std::string Watermark;
65 /// Filename for a banner
66 std::string Banner;
68 /// Filename for a background
69 std::string Background;
71 /// Wizard style name
72 std::string WizardStyle;
74 /// Filename for a style sheet
75 std::string StyleSheet;
77 /// Wizard width
78 std::string WizardDefaultWidth;
80 /// Wizard height
81 std::string WizardDefaultHeight;
83 /// Set to false if the widget listing installer pages on the left side
84 /// of the wizard should not be shown
85 std::string WizardShowPageList;
87 /// Title color
88 std::string TitleColor;
90 /// Name of the default program group in the Windows Start menu
91 std::string StartMenuDir;
93 /// Default target directory for installation
94 std::string TargetDir;
96 /// Default target directory for installation with administrator rights
97 std::string AdminTargetDir;
99 /// Filename of the generated maintenance tool
100 std::string MaintenanceToolName;
102 /// Filename for the configuration of the generated maintenance tool
103 std::string MaintenanceToolIniFile;
105 /// Set to true if the installation path can contain non-ASCII characters
106 std::string AllowNonAsciiCharacters;
108 /// Set to false if the target directory should not be deleted when
109 /// uninstalling
110 std::string RemoveTargetDir;
112 /// Set to true if command line interface features should be disabled
113 std::string DisableCommandLineInterface;
115 /// Set to false if the installation path cannot contain space characters
116 std::string AllowSpaceInPath;
118 /// Filename for a custom installer control script
119 std::string ControlScript;
121 /// List of resources to include in the installer binary
122 std::vector<std::string> Resources;
124 /// A list of images to be shown on PerformInstallationPage.
125 std::vector<std::string> ProductImages;
127 /// A list of associated URLs linked to images to be shown on
128 /// PerformInstallationPage.
129 std::vector<std::string> ProductImageUrls;
131 /// Command executed after the installer is done if the user accepts the
132 /// action
133 std::string RunProgram;
135 /// Arguments passed to the program specified in <RunProgram>
136 std::vector<std::string> RunProgramArguments;
138 /// Text shown next to the check box for running the program after the
139 /// installation
140 std::string RunProgramDescription;
142 #ifdef __APPLE__
143 /// Code signing identity for signing the generated app bundle
144 std::string SigningIdentity;
145 #endif
147 public:
148 // Internal implementation
150 void ConfigureFromOptions();
152 void GenerateInstallerFile();
154 void GeneratePackageFiles();
156 PackagesMap Packages;
157 RepositoriesVector RemoteRepositories;
158 std::string Directory;
160 protected:
161 void printSkippedOptionWarning(const std::string& optionName,
162 const std::string& optionValue);