cmCPackIFWInstaller.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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. /// Set to false if the widget listing installer pages on the left side
  59. /// of the wizard should not be shown
  60. std::string WizardShowPageList;
  61. /// Title color
  62. std::string TitleColor;
  63. /// Name of the default program group in the Windows Start menu
  64. std::string StartMenuDir;
  65. /// Default target directory for installation
  66. std::string TargetDir;
  67. /// Default target directory for installation with administrator rights
  68. std::string AdminTargetDir;
  69. /// Filename of the generated maintenance tool
  70. std::string MaintenanceToolName;
  71. /// Filename for the configuration of the generated maintenance tool
  72. std::string MaintenanceToolIniFile;
  73. /// Set to true if the installation path can contain non-ASCII characters
  74. std::string AllowNonAsciiCharacters;
  75. /// Set to false if the target directory should not be deleted when
  76. /// uninstalling
  77. std::string RemoveTargetDir;
  78. /// Set to true if command line interface features should be disabled
  79. std::string DisableCommandLineInterface;
  80. /// Set to false if the installation path cannot contain space characters
  81. std::string AllowSpaceInPath;
  82. /// Filename for a custom installer control script
  83. std::string ControlScript;
  84. /// List of resources to include in the installer binary
  85. std::vector<std::string> Resources;
  86. /// A list of images to be shown on PerformInstallationPage.
  87. std::vector<std::string> ProductImages;
  88. /// A list of associated URLs linked to images to be shown on
  89. /// PerformInstallationPage.
  90. std::vector<std::string> ProductImageUrls;
  91. /// Command executed after the installer is done if the user accepts the
  92. /// action
  93. std::string RunProgram;
  94. /// Arguments passed to the program specified in <RunProgram>
  95. std::vector<std::string> RunProgramArguments;
  96. /// Text shown next to the check box for running the program after the
  97. /// installation
  98. std::string RunProgramDescription;
  99. #ifdef __APPLE__
  100. /// Code signing identity for signing the generated app bundle
  101. std::string SigningIdentity;
  102. #endif
  103. public:
  104. // Internal implementation
  105. void ConfigureFromOptions();
  106. void GenerateInstallerFile();
  107. void GeneratePackageFiles();
  108. PackagesMap Packages;
  109. RepositoriesVector RemoteRepositories;
  110. std::string Directory;
  111. protected:
  112. void printSkippedOptionWarning(std::string const& optionName,
  113. std::string const& optionValue);
  114. };