2016-09-27 15:01:08 -04:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2006-01-01 23:21:05 -05:00
|
|
|
#ifndef cmCPackPackageMakerGenerator_h
|
|
|
|
#define cmCPackPackageMakerGenerator_h
|
|
|
|
|
2016-04-04 18:53:05 -06:00
|
|
|
#include "cmCPackPKGGenerator.h"
|
2006-01-01 23:21:05 -05:00
|
|
|
|
2008-06-17 11:39:26 -04:00
|
|
|
class cmCPackComponent;
|
|
|
|
|
2006-01-01 23:21:05 -05:00
|
|
|
/** \class cmCPackPackageMakerGenerator
|
|
|
|
* \brief A generator for PackageMaker files
|
|
|
|
*
|
2006-03-08 16:33:39 -05:00
|
|
|
* http://developer.apple.com/documentation/Darwin
|
|
|
|
* /Reference/ManPages/man1/packagemaker.1.html
|
2006-01-01 23:21:05 -05:00
|
|
|
*/
|
2016-04-04 18:53:05 -06:00
|
|
|
class cmCPackPackageMakerGenerator : public cmCPackPKGGenerator
|
2006-01-01 23:21:05 -05:00
|
|
|
{
|
|
|
|
public:
|
2016-04-04 18:53:05 -06:00
|
|
|
cmCPackTypeMacro(cmCPackPackageMakerGenerator, cmCPackPKGGenerator);
|
2006-01-01 23:21:05 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Construct generator
|
|
|
|
*/
|
|
|
|
cmCPackPackageMakerGenerator();
|
|
|
|
virtual ~cmCPackPackageMakerGenerator();
|
2016-07-22 10:42:37 -04:00
|
|
|
bool SupportsComponentInstallation() const CM_OVERRIDE;
|
2008-06-17 11:39:26 -04:00
|
|
|
|
2006-01-01 23:21:05 -05:00
|
|
|
protected:
|
2016-07-22 10:42:37 -04:00
|
|
|
int InitializeInternal() CM_OVERRIDE;
|
|
|
|
int PackageFiles() CM_OVERRIDE;
|
|
|
|
const char* GetOutputExtension() CM_OVERRIDE { return ".dmg"; }
|
2008-06-17 11: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 10:34:04 -04:00
|
|
|
bool RunPackageMaker(const char* command, const char* packageFile);
|
2008-06-17 11: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 13:42:58 -04:00
|
|
|
// otherwise.
|
2016-05-16 10:34:04 -04:00
|
|
|
bool GenerateComponentPackage(const char* packageFile,
|
|
|
|
const char* packageDir,
|
2008-06-17 11:39:26 -04:00
|
|
|
const cmCPackComponent& component);
|
|
|
|
|
2007-11-05 14:34:36 -05:00
|
|
|
double PackageMakerVersion;
|
2014-12-26 09:48:53 -08:00
|
|
|
unsigned int PackageCompatibilityVersion;
|
2006-01-01 23:21:05 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|