cmCPackTarBZip2Generator.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 cmCPackTarBZip2Generator_h
  11. #define cmCPackTarBZip2Generator_h
  12. #include "cmCPackTGZGenerator.h"
  13. /** \class cmCPackTarBZip2Generator
  14. * \brief A generator for TarBZip2 files
  15. */
  16. class cmCPackTarBZip2Generator : public cmCPackTGZGenerator
  17. {
  18. public:
  19. friend class cmCPackTarBZip2GeneratorForward;
  20. cmCPackTypeMacro(cmCPackTarBZip2Generator, cmCPackTGZGenerator);
  21. /**
  22. * Construct generator
  23. */
  24. cmCPackTarBZip2Generator();
  25. virtual ~cmCPackTarBZip2Generator();
  26. protected:
  27. virtual int InitializeInternal();
  28. int CompressFiles(const char* outFileName, const char* toplevel,
  29. const std::vector<std::string>& files);
  30. virtual const char* GetOutputExtension() { return ".tar.bz2"; }
  31. int BZip2File(const char* filename);
  32. int RenameFile(const char* oldname, const char* newname);
  33. };
  34. #endif