2014-08-06 19:23:00 +04: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
|
|
|
|
|
2016-09-07 01:21:35 +03:00
|
|
|
#include <cmConfigure.h> // IWYU pragma: keep
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2014-08-06 19:23:00 +04:00
|
|
|
|
|
|
|
class cmCPackIFWGenerator;
|
2016-09-07 01:21:35 +03:00
|
|
|
class cmCPackIFWPackage;
|
2016-05-17 17:00:29 +03:00
|
|
|
class cmCPackIFWRepository;
|
2015-07-16 22:53:57 +03:00
|
|
|
class cmXMLWriter;
|
2014-08-06 19:23:00 +04:00
|
|
|
|
|
|
|
/** \class cmCPackIFWInstaller
|
|
|
|
* \brief A binary installer to be created CPack IFW generator
|
|
|
|
*/
|
|
|
|
class cmCPackIFWInstaller
|
|
|
|
{
|
2016-05-06 21:49:44 +03:00
|
|
|
public:
|
|
|
|
// Types
|
2014-08-06 19:23:00 +04:00
|
|
|
|
|
|
|
typedef std::map<std::string, cmCPackIFWPackage*> PackagesMap;
|
2016-05-17 17:00:29 +03:00
|
|
|
typedef std::vector<cmCPackIFWRepository*> RepositoriesVector;
|
2014-10-05 12:52:57 +04:00
|
|
|
|
2016-05-06 21:49:44 +03:00
|
|
|
public:
|
|
|
|
// Constructor
|
2014-08-06 19:23:00 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Construct installer
|
|
|
|
*/
|
|
|
|
cmCPackIFWInstaller();
|
|
|
|
|
2016-05-06 21:49:44 +03:00
|
|
|
public:
|
|
|
|
// Configuration
|
2014-08-06 19:23:00 +04: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-04-27 17:02:49 +03:00
|
|
|
/// Name of the default program group in the Windows Start menu
|
|
|
|
std::string StartMenuDir;
|
|
|
|
|
2014-08-06 19:23:00 +04:00
|
|
|
/// Default target directory for installation
|
|
|
|
std::string TargetDir;
|
|
|
|
|
|
|
|
/// Default target directory for installation with administrator rights
|
|
|
|
std::string AdminTargetDir;
|
|
|
|
|
2015-04-27 17:02:49 +03: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-09-19 18:48:27 +03:00
|
|
|
/// List of resources to include in the installer binary
|
|
|
|
std::vector<std::string> Resources;
|
|
|
|
|
2016-05-06 21:49:44 +03:00
|
|
|
public:
|
|
|
|
// Internal implementation
|
2014-08-06 19:23:00 +04:00
|
|
|
|
|
|
|
const char* GetOption(const std::string& op) const;
|
2014-10-05 12:52:57 +04:00
|
|
|
bool IsOn(const std::string& op) const;
|
2014-08-06 19:23:00 +04:00
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
bool IsVersionLess(const char* version);
|
|
|
|
bool IsVersionGreater(const char* version);
|
|
|
|
bool IsVersionEqual(const char* version);
|
2015-04-27 17:02:49 +03:00
|
|
|
|
2014-08-06 19:23:00 +04:00
|
|
|
void ConfigureFromOptions();
|
|
|
|
|
|
|
|
void GenerateInstallerFile();
|
|
|
|
|
|
|
|
void GeneratePackageFiles();
|
|
|
|
|
|
|
|
cmCPackIFWGenerator* Generator;
|
|
|
|
PackagesMap Packages;
|
2016-05-17 17:00:29 +03:00
|
|
|
RepositoriesVector RemoteRepositories;
|
2014-08-06 19:23:00 +04:00
|
|
|
std::string Directory;
|
2015-04-27 17:02:49 +03:00
|
|
|
|
|
|
|
protected:
|
2015-07-16 22:53:57 +03:00
|
|
|
void WriteGeneratedByToStrim(cmXMLWriter& xout);
|
2014-08-06 19:23:00 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // cmCPackIFWInstaller_h
|