Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Source/CPack/IFW/cmCPackIFWInstaller.h
5020 views
1
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2
file LICENSE.rst or https://cmake.org/licensing for details. */
3
#pragma once
4
5
#include "cmConfigure.h" // IWYU pragma: keep
6
7
#include <map>
8
#include <string>
9
#include <vector>
10
11
#include "cmCPackIFWCommon.h"
12
13
class cmCPackIFWPackage;
14
class cmCPackIFWRepository;
15
16
/** \class cmCPackIFWInstaller
17
* \brief A binary installer to be created CPack IFW generator
18
*/
19
class cmCPackIFWInstaller : public cmCPackIFWCommon
20
{
21
public:
22
// Types
23
24
using PackagesMap = std::map<std::string, cmCPackIFWPackage*>;
25
using RepositoriesVector = std::vector<cmCPackIFWRepository*>;
26
27
public:
28
// Constructor
29
30
/**
31
* Construct installer
32
*/
33
cmCPackIFWInstaller();
34
35
public:
36
// Configuration
37
38
/// Name of the product being installed
39
std::string Name;
40
41
/// Version number of the product being installed
42
std::string Version;
43
44
/// Name of the installer as displayed on the title bar
45
std::string Title;
46
47
/// Publisher of the software (as shown in the Windows Control Panel)
48
std::string Publisher;
49
50
/// URL to a page that contains product information on your web site
51
std::string ProductUrl;
52
53
/// Filename for a custom installer icon
54
std::string InstallerApplicationIcon;
55
56
/// Filename for a custom window icon
57
std::string InstallerWindowIcon;
58
59
/// Filename for a logo
60
std::string Logo;
61
62
/// Filename for a watermark
63
std::string Watermark;
64
65
/// Filename for a banner
66
std::string Banner;
67
68
/// Filename for a background
69
std::string Background;
70
71
/// Wizard style name
72
std::string WizardStyle;
73
74
/// Filename for a style sheet
75
std::string StyleSheet;
76
77
/// Wizard width
78
std::string WizardDefaultWidth;
79
80
/// Wizard height
81
std::string WizardDefaultHeight;
82
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;
86
87
/// Title color
88
std::string TitleColor;
89
90
/// Name of the default program group in the Windows Start menu
91
std::string StartMenuDir;
92
93
/// Default target directory for installation
94
std::string TargetDir;
95
96
/// Default target directory for installation with administrator rights
97
std::string AdminTargetDir;
98
99
/// Filename of the generated maintenance tool
100
std::string MaintenanceToolName;
101
102
/// Filename for the configuration of the generated maintenance tool
103
std::string MaintenanceToolIniFile;
104
105
/// Set to true if the installation path can contain non-ASCII characters
106
std::string AllowNonAsciiCharacters;
107
108
/// Set to false if the target directory should not be deleted when
109
/// uninstalling
110
std::string RemoveTargetDir;
111
112
/// Set to true if command line interface features should be disabled
113
std::string DisableCommandLineInterface;
114
115
/// Set to false if the installation path cannot contain space characters
116
std::string AllowSpaceInPath;
117
118
/// Filename for a custom installer control script
119
std::string ControlScript;
120
121
/// List of resources to include in the installer binary
122
std::vector<std::string> Resources;
123
124
/// A list of images to be shown on PerformInstallationPage.
125
std::vector<std::string> ProductImages;
126
127
/// A list of associated URLs linked to images to be shown on
128
/// PerformInstallationPage.
129
std::vector<std::string> ProductImageUrls;
130
131
/// Command executed after the installer is done if the user accepts the
132
/// action
133
std::string RunProgram;
134
135
/// Arguments passed to the program specified in <RunProgram>
136
std::vector<std::string> RunProgramArguments;
137
138
/// Text shown next to the check box for running the program after the
139
/// installation
140
std::string RunProgramDescription;
141
142
#ifdef __APPLE__
143
/// Code signing identity for signing the generated app bundle
144
std::string SigningIdentity;
145
#endif
146
147
public:
148
// Internal implementation
149
150
void ConfigureFromOptions();
151
152
void GenerateInstallerFile();
153
154
void GeneratePackageFiles();
155
156
PackagesMap Packages;
157
RepositoriesVector RemoteRepositories;
158
std::string Directory;
159
160
protected:
161
void printSkippedOptionWarning(std::string const& optionName,
162
std::string const& optionValue);
163
};
164
165