cmCPackIFWInstaller.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include "cmConfigure.h" // IWYU pragma: keep
  5. #include <map>
  6. #include <string>
  7. #include <vector>
  8. #include "cmCPackIFWCommon.h"
  9. class cmCPackIFWPackage;
  10. class cmCPackIFWRepository;
  11. /** \class cmCPackIFWInstaller
  12. * \brief A binary installer to be created CPack IFW generator
  13. */
  14. class cmCPackIFWInstaller : public cmCPackIFWCommon
  15. {
  16. public:
  17. // Types
  18. using PackagesMap = std::map<std::string, cmCPackIFWPackage*>;
  19. using RepositoriesVector = std::vector<cmCPackIFWRepository*>;
  20. public:
  21. // Constructor
  22. /**
  23. * Construct installer
  24. */
  25. cmCPackIFWInstaller();
  26. public:
  27. // Configuration
  28. /// Name of the product being installed
  29. std::string Name;
  30. /// Version number of the product being installed
  31. std::string Version;
  32. /// Name of the installer as displayed on the title bar
  33. std::string Title;
  34. /// Publisher of the software (as shown in the Windows Control Panel)
  35. std::string Publisher;
  36. /// URL to a page that contains product information on your web site
  37. std::string ProductUrl;
  38. /// Filename for a custom installer icon
  39. std::string InstallerApplicationIcon;
  40. /// Filename for a custom window icon
  41. std::string InstallerWindowIcon;
  42. /// Filename for a logo
  43. std::string Logo;
  44. /// Filename for a watermark
  45. std::string Watermark;
  46. /// Filename for a banner
  47. std::string Banner;
  48. /// Filename for a background
  49. std::string Background;
  50. /// Wizard style name
  51. std::string WizardStyle;
  52. /// Filename for a style sheet
  53. std::string StyleSheet;
  54. /// Wizard width
  55. std::string WizardDefaultWidth;
  56. /// Wizard height
  57. std::string WizardDefaultHeight;
  58. /// Title color
  59. std::string TitleColor;
  60. /// Name of the default program group in the Windows Start menu
  61. std::string StartMenuDir;
  62. /// Default target directory for installation
  63. std::string TargetDir;
  64. /// Default target directory for installation with administrator rights
  65. std::string AdminTargetDir;
  66. /// Filename of the generated maintenance tool
  67. std::string MaintenanceToolName;
  68. /// Filename for the configuration of the generated maintenance tool
  69. std::string MaintenanceToolIniFile;
  70. /// Set to true if the installation path can contain non-ASCII characters
  71. std::string AllowNonAsciiCharacters;
  72. /// Set to false if the target directory should not be deleted when
  73. /// uninstalling
  74. std::string RemoveTargetDir;
  75. /// Set to false if the installation path cannot contain space characters
  76. std::string AllowSpaceInPath;
  77. /// Filename for a custom installer control script
  78. std::string ControlScript;
  79. /// List of resources to include in the installer binary
  80. std::vector<std::string> Resources;
  81. public:
  82. // Internal implementation
  83. void ConfigureFromOptions();
  84. void GenerateInstallerFile();
  85. void GeneratePackageFiles();
  86. PackagesMap Packages;
  87. RepositoriesVector RemoteRepositories;
  88. std::string Directory;
  89. protected:
  90. void printSkippedOptionWarning(const std::string& optionName,
  91. const std::string& optionValue);
  92. };