2016-09-27 22:01:08 +03:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2006-01-02 07:21:05 +03:00
|
|
|
#ifndef cmCPackPackageMakerGenerator_h
|
|
|
|
#define cmCPackPackageMakerGenerator_h
|
|
|
|
|
2016-04-05 03:53:05 +03:00
|
|
|
#include "cmCPackPKGGenerator.h"
|
2006-01-02 07:21:05 +03:00
|
|
|
|
2008-06-17 19:39:26 +04:00
|
|
|
class cmCPackComponent;
|
|
|
|
|
2006-01-02 07:21:05 +03:00
|
|
|
/** \class cmCPackPackageMakerGenerator
|
|
|
|
* \brief A generator for PackageMaker files
|
|
|
|
*
|
2006-03-09 00:33:39 +03:00
|
|
|
* http://developer.apple.com/documentation/Darwin
|
|
|
|
* /Reference/ManPages/man1/packagemaker.1.html
|
2006-01-02 07:21:05 +03:00
|
|
|
*/
|
2016-04-05 03:53:05 +03:00
|
|
|
class cmCPackPackageMakerGenerator : public cmCPackPKGGenerator
|
2006-01-02 07:21:05 +03:00
|
|
|
{
|
|
|
|
public:
|
2016-04-05 03:53:05 +03:00
|
|
|
cmCPackTypeMacro(cmCPackPackageMakerGenerator, cmCPackPKGGenerator);
|
2006-01-02 07:21:05 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Construct generator
|
|
|
|
*/
|
|
|
|
cmCPackPackageMakerGenerator();
|
|
|
|
virtual ~cmCPackPackageMakerGenerator();
|
2016-07-22 17:42:37 +03:00
|
|
|
bool SupportsComponentInstallation() const CM_OVERRIDE;
|
2008-06-17 19:39:26 +04:00
|
|
|
|
2006-01-02 07:21:05 +03:00
|
|
|
protected:
|
2016-07-22 17:42:37 +03:00
|
|
|
int InitializeInternal() CM_OVERRIDE;
|
|
|
|
int PackageFiles() CM_OVERRIDE;
|
|
|
|
const char* GetOutputExtension() CM_OVERRIDE { return ".dmg"; }
|
2008-06-17 19:39:26 +04:00
|
|
|
|
|
|
|
// Run PackageMaker with the given command line, which will (if
|
|
|
|
// successful) produce the given package file. Returns true if
|
|
|
|
// PackageMaker succeeds, false otherwise.
|
2016-05-16 17:34:04 +03:00
|
|
|
bool RunPackageMaker(const char* command, const char* packageFile);
|
2008-06-17 19:39:26 +04:00
|
|
|
|
|
|
|
// Generate a package in the file packageFile for the given
|
|
|
|
// component. All of the files within this component are stored in
|
|
|
|
// the directory packageDir. Returns true if successful, false
|
2012-08-13 21:42:58 +04:00
|
|
|
// otherwise.
|
2016-05-16 17:34:04 +03:00
|
|
|
bool GenerateComponentPackage(const char* packageFile,
|
|
|
|
const char* packageDir,
|
2008-06-17 19:39:26 +04:00
|
|
|
const cmCPackComponent& component);
|
|
|
|
|
2007-11-05 22:34:36 +03:00
|
|
|
double PackageMakerVersion;
|
2014-12-26 20:48:53 +03:00
|
|
|
unsigned int PackageCompatibilityVersion;
|
2006-01-02 07:21:05 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|