cmake/Source/CPack/IFW/cmCPackIFWInstaller.h

141 lines
3.3 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. */
2015-04-27 22:25:09 +02:00
#ifndef cmCPackIFWInstaller_h
#define cmCPackIFWInstaller_h
2016-10-30 18:24:19 +01:00
#include <cmConfigure.h> // IWYU pragma: keep
#include <map>
#include <string>
#include <vector>
2015-04-27 22:25:09 +02:00
class cmCPackIFWGenerator;
2016-10-30 18:24:19 +01:00
class cmCPackIFWPackage;
2016-07-09 11:21:54 +02:00
class cmCPackIFWRepository;
class cmXMLWriter;
2015-04-27 22:25:09 +02:00
/** \class cmCPackIFWInstaller
* \brief A binary installer to be created CPack IFW generator
*/
class cmCPackIFWInstaller
{
2016-07-09 11:21:54 +02:00
public:
// Types
2015-04-27 22:25:09 +02:00
typedef std::map<std::string, cmCPackIFWPackage*> PackagesMap;
2016-07-09 11:21:54 +02:00
typedef std::vector<cmCPackIFWRepository*> RepositoriesVector;
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;
/// Wizard width
std::string WizardDefaultWidth;
/// Wizard height
std::string WizardDefaultHeight;
/// 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;
/// 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;
2016-07-09 11:21:54 +02:00
public:
// Internal implementation
2015-04-27 22:25:09 +02:00
const char* GetOption(const std::string& op) const;
bool IsOn(const std::string& op) const;
2016-07-09 11:21:54 +02:00
bool IsVersionLess(const char* version);
bool IsVersionGreater(const char* version);
bool IsVersionEqual(const char* version);
2015-08-17 11:37:30 +02:00
2015-04-27 22:25:09 +02:00
void ConfigureFromOptions();
void GenerateInstallerFile();
void GeneratePackageFiles();
cmCPackIFWGenerator* Generator;
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:
2016-07-09 11:21:54 +02:00
void WriteGeneratedByToStrim(cmXMLWriter& xout);
2017-04-14 19:02:05 +02:00
private:
void printSkippedOptionWarning(const std::string& optionName,
const std::string& optionValue);
2015-04-27 22:25:09 +02:00
};
#endif // cmCPackIFWInstaller_h