cmCPackProductBuildGenerator.h 2.0 KB

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