cmCPackIFWInstaller.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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 cmCPackIFWInstaller
  16. * \brief A binary installer to be created CPack IFW generator
  17. */
  18. class cmCPackIFWInstaller
  19. {
  20. public: // Types
  21. typedef std::map<std::string, cmCPackIFWPackage*> PackagesMap;
  22. struct RepositoryStruct
  23. {
  24. std::string Url;
  25. std::string Enabled;
  26. std::string Username;
  27. std::string Password;
  28. std::string DisplayName;
  29. };
  30. public: // Constructor
  31. /**
  32. * Construct installer
  33. */
  34. cmCPackIFWInstaller();
  35. public: // Configuration
  36. /// Name of the product being installed
  37. std::string Name;
  38. /// Version number of the product being installed
  39. std::string Version;
  40. /// Name of the installer as displayed on the title bar
  41. std::string Title;
  42. /// Publisher of the software (as shown in the Windows Control Panel)
  43. std::string Publisher;
  44. /// URL to a page that contains product information on your web site
  45. std::string ProductUrl;
  46. /// Filename for a custom installer icon
  47. std::string InstallerApplicationIcon;
  48. /// Filename for a custom window icon
  49. std::string InstallerWindowIcon;
  50. /// Filename for a logo
  51. std::string Logo;
  52. /// Default target directory for installation
  53. std::string TargetDir;
  54. /// Default target directory for installation with administrator rights
  55. std::string AdminTargetDir;
  56. public: // Internal implementation
  57. const char* GetOption(const std::string& op) const;
  58. bool IsOn(const std::string& op) const;
  59. void ConfigureFromOptions();
  60. void GenerateInstallerFile();
  61. void GeneratePackageFiles();
  62. cmCPackIFWGenerator* Generator;
  63. PackagesMap Packages;
  64. std::vector<RepositoryStruct> Repositories;
  65. std::string Directory;
  66. };
  67. #endif // cmCPackIFWInstaller_h