CMake/Source/CPack/IFW/cmCPackIFWInstaller.h

116 lines
2.8 KiB
C
Raw Normal View History

Simplify CMake per-source license notices Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
2016-09-27 22:01:08 +03:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#ifndef cmCPackIFWInstaller_h
#define cmCPackIFWInstaller_h
2016-09-07 01:21:35 +03:00
#include <cmConfigure.h> // IWYU pragma: keep
#include <map>
#include <string>
#include <vector>
class cmCPackIFWGenerator;
2016-09-07 01:21:35 +03:00
class cmCPackIFWPackage;
class cmCPackIFWRepository;
2015-07-16 22:53:57 +03:00
class cmXMLWriter;
/** \class cmCPackIFWInstaller
* \brief A binary installer to be created CPack IFW generator
*/
class cmCPackIFWInstaller
{
public:
// Types
typedef std::map<std::string, cmCPackIFWPackage*> PackagesMap;
typedef std::vector<cmCPackIFWRepository*> RepositoriesVector;
public:
// Constructor
/**
* Construct installer
*/
cmCPackIFWInstaller();
public:
// Configuration
/// 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;
/// Name of the default program group in the Windows Start menu
std::string StartMenuDir;
/// Default target directory for installation
std::string TargetDir;
/// Default target directory for installation with administrator rights
std::string AdminTargetDir;
/// 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;
/// List of resources to include in the installer binary
std::vector<std::string> Resources;
public:
// Internal implementation
const char* GetOption(const std::string& op) const;
bool IsOn(const std::string& op) const;
bool IsVersionLess(const char* version);
bool IsVersionGreater(const char* version);
bool IsVersionEqual(const char* version);
void ConfigureFromOptions();
void GenerateInstallerFile();
void GeneratePackageFiles();
cmCPackIFWGenerator* Generator;
PackagesMap Packages;
RepositoriesVector RemoteRepositories;
std::string Directory;
protected:
2015-07-16 22:53:57 +03:00
void WriteGeneratedByToStrim(cmXMLWriter& xout);
};
#endif // cmCPackIFWInstaller_h