cmCPackIFWInstaller.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmCPackIFWInstaller_h
  11. #define cmCPackIFWInstaller_h
  12. #include <cmStandardIncludes.h>
  13. class cmCPackIFWPackage;
  14. class cmCPackIFWGenerator;
  15. class cmXMLWriter;
  16. /** \class cmCPackIFWInstaller
  17. * \brief A binary installer to be created CPack IFW generator
  18. */
  19. class cmCPackIFWInstaller
  20. {
  21. public:
  22. // Types
  23. typedef std::map<std::string, cmCPackIFWPackage*> PackagesMap;
  24. struct RepositoryStruct
  25. {
  26. std::string Url;
  27. std::string Enabled;
  28. std::string Username;
  29. std::string Password;
  30. std::string DisplayName;
  31. };
  32. public:
  33. // Constructor
  34. /**
  35. * Construct installer
  36. */
  37. cmCPackIFWInstaller();
  38. public:
  39. // Configuration
  40. /// Name of the product being installed
  41. std::string Name;
  42. /// Version number of the product being installed
  43. std::string Version;
  44. /// Name of the installer as displayed on the title bar
  45. std::string Title;
  46. /// Publisher of the software (as shown in the Windows Control Panel)
  47. std::string Publisher;
  48. /// URL to a page that contains product information on your web site
  49. std::string ProductUrl;
  50. /// Filename for a custom installer icon
  51. std::string InstallerApplicationIcon;
  52. /// Filename for a custom window icon
  53. std::string InstallerWindowIcon;
  54. /// Filename for a logo
  55. std::string Logo;
  56. /// Name of the default program group in the Windows Start menu
  57. std::string StartMenuDir;
  58. /// Default target directory for installation
  59. std::string TargetDir;
  60. /// Default target directory for installation with administrator rights
  61. std::string AdminTargetDir;
  62. /// Filename of the generated maintenance tool
  63. std::string MaintenanceToolName;
  64. /// Filename for the configuration of the generated maintenance tool
  65. std::string MaintenanceToolIniFile;
  66. /// Set to true if the installation path can contain non-ASCII characters
  67. std::string AllowNonAsciiCharacters;
  68. /// Set to false if the installation path cannot contain space characters
  69. std::string AllowSpaceInPath;
  70. /// Filename for a custom installer control script
  71. std::string ControlScript;
  72. public:
  73. // Internal implementation
  74. const char* GetOption(const std::string& op) const;
  75. bool IsOn(const std::string& op) const;
  76. bool IsVersionLess(const char* version);
  77. bool IsVersionGreater(const char* version);
  78. bool IsVersionEqual(const char* version);
  79. void ConfigureFromOptions();
  80. void GenerateInstallerFile();
  81. void GeneratePackageFiles();
  82. cmCPackIFWGenerator* Generator;
  83. PackagesMap Packages;
  84. std::vector<RepositoryStruct> Repositories;
  85. std::string Directory;
  86. protected:
  87. void WriteGeneratedByToStrim(cmXMLWriter& xout);
  88. };
  89. #endif // cmCPackIFWInstaller_h