cmCPackProductBuildGenerator.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 <cmConfigure.h>
  6. #include <string>
  7. #include "cmCPackGenerator.h"
  8. #include "cmCPackPKGGenerator.h"
  9. class cmCPackComponent;
  10. /** \class cmCPackProductBuildGenerator
  11. * \brief A generator for ProductBuild files
  12. *
  13. */
  14. class cmCPackProductBuildGenerator : public cmCPackPKGGenerator
  15. {
  16. public:
  17. cmCPackTypeMacro(cmCPackProductBuildGenerator, cmCPackPKGGenerator);
  18. /**
  19. * Construct generator
  20. */
  21. cmCPackProductBuildGenerator();
  22. virtual ~cmCPackProductBuildGenerator();
  23. protected:
  24. int InitializeInternal() CM_OVERRIDE;
  25. int PackageFiles() CM_OVERRIDE;
  26. const char* GetOutputExtension() CM_OVERRIDE { return ".pkg"; }
  27. // Run ProductBuild with the given command line, which will (if
  28. // successful) produce the given package file. Returns true if
  29. // ProductBuild succeeds, false otherwise.
  30. bool RunProductBuild(const std::string& command);
  31. // Generate a package in the file packageFile for the given
  32. // component. All of the files within this component are stored in
  33. // the directory packageDir. Returns true if successful, false
  34. // otherwise.
  35. bool GenerateComponentPackage(const std::string& packageFileDir,
  36. const std::string& packageFileName,
  37. const std::string& packageDir,
  38. const cmCPackComponent* component);
  39. const char* GetComponentScript(const char* script,
  40. const char* script_component);
  41. };
  42. #endif