cmCPackProductBuildGenerator.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmCPackProductBuildGenerator_h
  4. #define cmCPackProductBuildGenerator_h
  5. #include "cmCPackPKGGenerator.h"
  6. class cmCPackComponent;
  7. /** \class cmCPackProductBuildGenerator
  8. * \brief A generator for ProductBuild files
  9. *
  10. */
  11. class cmCPackProductBuildGenerator : public cmCPackPKGGenerator
  12. {
  13. public:
  14. cmCPackTypeMacro(cmCPackProductBuildGenerator, cmCPackPKGGenerator);
  15. /**
  16. * Construct generator
  17. */
  18. cmCPackProductBuildGenerator();
  19. virtual ~cmCPackProductBuildGenerator();
  20. protected:
  21. int InitializeInternal() CM_OVERRIDE;
  22. int PackageFiles() CM_OVERRIDE;
  23. const char* GetOutputExtension() CM_OVERRIDE { return ".pkg"; }
  24. // Run ProductBuild with the given command line, which will (if
  25. // successful) produce the given package file. Returns true if
  26. // ProductBuild succeeds, false otherwise.
  27. bool RunProductBuild(const std::string& command);
  28. // Generate a package in the file packageFile for the given
  29. // component. All of the files within this component are stored in
  30. // the directory packageDir. Returns true if successful, false
  31. // otherwise.
  32. bool GenerateComponentPackage(const std::string& packageFileDir,
  33. const std::string& packageFileName,
  34. const std::string& packageDir,
  35. const cmCPackComponent* component);
  36. const char* GetComponentScript(const char* script,
  37. const char* script_component);
  38. };
  39. #endif