summaryrefslogtreecommitdiff
path: root/Source/CPack/cmCPackZIPGenerator.h
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-04-02 11:20:58 -0400
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-04-02 11:20:58 -0400
commitd342d51c0cc2ab2dc0f1053817a5a98b14a3fcf4 (patch)
tree31ee8a0969c5a3538d178a9dfa207f6fc26838dd /Source/CPack/cmCPackZIPGenerator.h
parentc0fe6aa97af5fa668fecf839e3baaafe4ffc2ad0 (diff)
downloadcmake-d342d51c0cc2ab2dc0f1053817a5a98b14a3fcf4.tar.gz
ENH: Add ZIP generator and add support for including or excluding the toplevel directory
Diffstat (limited to 'Source/CPack/cmCPackZIPGenerator.h')
-rw-r--r--Source/CPack/cmCPackZIPGenerator.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackZIPGenerator.h b/Source/CPack/cmCPackZIPGenerator.h
new file mode 100644
index 0000000000..2bb75fe706
--- /dev/null
+++ b/Source/CPack/cmCPackZIPGenerator.h
@@ -0,0 +1,59 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc. All rights reserved.
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+
+#ifndef cmCPackZIPGenerator_h
+#define cmCPackZIPGenerator_h
+
+#include "cmCPackGenericGenerator.h"
+
+class cmCPackZIPGeneratorForward;
+
+/** \class cmCPackZIPGenerator
+ * \brief A generator for ZIP files
+ */
+class cmCPackZIPGenerator : public cmCPackGenericGenerator
+{
+public:
+ friend class cmCPackZIPGeneratorForward;
+ cmCPackTypeMacro(cmCPackZIPGenerator, cmCPackGenericGenerator);
+
+ /**
+ * Initialize generator
+ */
+ virtual int Initialize(const char* name, cmMakefile* mf);
+ /**
+ * Construct generator
+ */
+ cmCPackZIPGenerator();
+ virtual ~cmCPackZIPGenerator();
+
+ enum ZipStyles
+ {
+ StyleUnkown,
+ StyleWinZip,
+ StyleUnixZip
+ };
+
+protected:
+ int CompressFiles(const char* outFileName, const char* toplevel,
+ const std::vector<std::string>& files);
+ virtual const char* GetOutputExtension() { return "zip"; }
+
+ int ZipStyle;
+};
+
+#endif