cmake/Source/CPack/IFW/cmCPackIFWInstaller.h

119 lines
3.1 KiB
C
Raw Normal View History

2015-04-27 22:25:09 +02:00
/*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
#ifndef cmCPackIFWInstaller_h
#define cmCPackIFWInstaller_h
#include <cmStandardIncludes.h>
class cmCPackIFWPackage;
class cmCPackIFWGenerator;
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;
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-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);
2015-04-27 22:25:09 +02:00
};
#endif // cmCPackIFWInstaller_h