summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackPackageMakerGenerator.h
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2008-06-17 15:39:26 (GMT)
committerDavid Cole <david.cole@kitware.com>2008-06-17 15:39:26 (GMT)
commit1105a86c520d34a59b482b86b6f288c11ff45b81 (patch)
tree6814d23047d44fe8c2c3d18e40b98143aca186c4 /Source/CPack/cmCPackPackageMakerGenerator.h
parent64498a1287e13e9f7ad3488c1050318030b18f8d (diff)
downloadCMake-1105a86c520d34a59b482b86b6f288c11ff45b81.zip
CMake-1105a86c520d34a59b482b86b6f288c11ff45b81.tar.gz
CMake-1105a86c520d34a59b482b86b6f288c11ff45b81.tar.bz2
ENH: Add patch for feature request #6847 - CPack components for NSIS and PackageMaker installers. Thanks to Doug Gregor for all the hard work involved with implementing this patch! Also added new test CPackComponents that is conditionally executed only when NSIS or PackageMaker installer builders are available.
Diffstat (limited to 'Source/CPack/cmCPackPackageMakerGenerator.h')
-rw-r--r--Source/CPack/cmCPackPackageMakerGenerator.h61
1 files changed, 60 insertions, 1 deletions
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.h b/Source/CPack/cmCPackPackageMakerGenerator.h
index 6c16c75..2be8a2c 100644
--- a/Source/CPack/cmCPackPackageMakerGenerator.h
+++ b/Source/CPack/cmCPackPackageMakerGenerator.h
@@ -21,6 +21,8 @@
#include "cmCPackGenerator.h"
+class cmCPackComponent;
+
/** \class cmCPackPackageMakerGenerator
* \brief A generator for PackageMaker files
*
@@ -38,6 +40,8 @@ public:
cmCPackPackageMakerGenerator();
virtual ~cmCPackPackageMakerGenerator();
+ virtual bool SupportsComponentInstallation() const;
+
protected:
int CopyInstallScript(const char* resdir,
const char* script,
@@ -49,8 +53,63 @@ protected:
virtual const char* GetOutputPostfix() { return "darwin"; }
bool CopyCreateResourceFile(const char* name);
- bool CopyResourcePlistFile(const char* name);
+ bool CopyResourcePlistFile(const char* name, const char* outName = 0);
+
+ // Run PackageMaker with the given command line, which will (if
+ // successful) produce the given package file. Returns true if
+ // PackageMaker succeeds, false otherwise.
+ bool RunPackageMaker(const char *command, const char *packageFile);
+
+ // Retrieve the name of package file that will be generated for this
+ // component. The name is just the file name with extension, and
+ // does not include the subdirectory.
+ std::string GetPackageName(const cmCPackComponent& component);
+
+ // 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
+ // otherwise.
+ bool GenerateComponentPackage(const char *packageFile,
+ const char *packageDir,
+ const cmCPackComponent& component);
+
+ // Writes a distribution.dist file, which turns a metapackage into a
+ // full-fledged distribution. This file is used to describe
+ // inter-component dependencies. metapackageFile is the name of the
+ // metapackage for the distribution. Only valid for a
+ // component-based install.
+ void WriteDistributionFile(const char* metapackageFile);
+
+ // Subroutine of WriteDistributionFile that writes out the
+ // dependency attributes for inter-component dependencies.
+ void AddDependencyAttributes(const cmCPackComponent& component,
+ cmOStringStream& out);
+
+ // Subroutine of WriteDistributionFile that writes out the
+ // reverse dependency attributes for inter-component dependencies.
+ void AddReverseDependencyAttributes(const cmCPackComponent& component,
+ cmOStringStream& out);
+
+ // Generates XML that encodes the hierarchy of component groups and
+ // their components in a form that can be used by distribution
+ // metapackages.
+ void CreateChoiceOutline(const cmCPackComponentGroup& group,
+ cmOStringStream& out);
+
+ /// Create the "choice" XML element to describe a component group
+ /// for the installer GUI.
+ void CreateChoice(const cmCPackComponentGroup& group,
+ cmOStringStream& out);
+
+ /// Create the "choice" XML element to describe a component for the
+ /// installer GUI.
+ void CreateChoice(const cmCPackComponent& component,
+ cmOStringStream& out);
+ // Escape the given string to make it usable as an XML attribute
+ // value.
+ std::string EscapeForXML(std::string str);
+
double PackageMakerVersion;
};