cmCPackDragNDropGenerator.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 cmCPackDragNDropGenerator_h
  11. #define cmCPackDragNDropGenerator_h
  12. #include "cmCPackGenerator.h"
  13. /** \class cmCPackDragNDropGenerator
  14. * \brief A generator for OSX drag-n-drop installs
  15. */
  16. class cmCPackDragNDropGenerator : public cmCPackGenerator
  17. {
  18. public:
  19. cmCPackTypeMacro(cmCPackDragNDropGenerator, cmCPackGenerator);
  20. cmCPackDragNDropGenerator();
  21. virtual ~cmCPackDragNDropGenerator();
  22. protected:
  23. virtual int InitializeInternal();
  24. virtual const char* GetOutputExtension();
  25. int PackageFiles();
  26. bool SupportsComponentInstallation() const;
  27. bool CopyFile(cmOStringStream& source, cmOStringStream& target);
  28. bool RunCommand(cmOStringStream& command, std::string* output = 0);
  29. std::string GetComponentInstallDirNameSuffix(const std::string& componentName);
  30. int CreateDMG(const std::string& src_dir, const std::string& output_file);
  31. std::string InstallPrefix;
  32. };
  33. #endif