summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackGeneratorFactory.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CPack/cmCPackGeneratorFactory.cxx')
-rw-r--r--Source/CPack/cmCPackGeneratorFactory.cxx31
1 files changed, 23 insertions, 8 deletions
diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx
index b36c2a2..c8737f4 100644
--- a/Source/CPack/cmCPackGeneratorFactory.cxx
+++ b/Source/CPack/cmCPackGeneratorFactory.cxx
@@ -14,11 +14,14 @@
#include "cmCPackGenerator.h"
#include "cmCPackTGZGenerator.h"
+#include "cmCPackTXZGenerator.h"
#include "cmCPackTarBZip2Generator.h"
#include "cmCPackTarCompressGenerator.h"
#include "cmCPackZIPGenerator.h"
+#include "cmCPack7zGenerator.h"
#include "cmCPackSTGZGenerator.h"
#include "cmCPackNSISGenerator.h"
+#include "IFW/cmCPackIFWGenerator.h"
#ifdef __APPLE__
# include "cmCPackDragNDropGenerator.h"
@@ -56,6 +59,11 @@ cmCPackGeneratorFactory::cmCPackGeneratorFactory()
this->RegisterGenerator("TGZ", "Tar GZip compression",
cmCPackTGZGenerator::CreateGenerator);
}
+ if (cmCPackTXZGenerator::CanGenerate())
+ {
+ this->RegisterGenerator("TXZ", "Tar XZ compression",
+ cmCPackTXZGenerator::CreateGenerator);
+ }
if (cmCPackSTGZGenerator::CanGenerate())
{
this->RegisterGenerator("STGZ", "Self extracting Tar GZip compression",
@@ -68,6 +76,11 @@ cmCPackGeneratorFactory::cmCPackGeneratorFactory()
this->RegisterGenerator("NSIS64", "Null Soft Installer (64-bit)",
cmCPackNSISGenerator::CreateGenerator64);
}
+ if (cmCPackIFWGenerator::CanGenerate())
+ {
+ this->RegisterGenerator("IFW", "Qt Installer Framework",
+ cmCPackIFWGenerator::CreateGenerator);
+ }
#ifdef __CYGWIN__
if (cmCPackCygwinBinaryGenerator::CanGenerate())
{
@@ -86,6 +99,11 @@ cmCPackGeneratorFactory::cmCPackGeneratorFactory()
this->RegisterGenerator("ZIP", "ZIP file format",
cmCPackZIPGenerator::CreateGenerator);
}
+ if (cmCPack7zGenerator::CanGenerate())
+ {
+ this->RegisterGenerator("7Z", "7-Zip file format",
+ cmCPack7zGenerator::CreateGenerator);
+ }
#ifdef _WIN32
if (cmCPackWIXGenerator::CanGenerate())
{
@@ -151,7 +169,8 @@ cmCPackGeneratorFactory::~cmCPackGeneratorFactory()
}
//----------------------------------------------------------------------
-cmCPackGenerator* cmCPackGeneratorFactory::NewGenerator(const char* name)
+cmCPackGenerator* cmCPackGeneratorFactory::NewGenerator(
+ const std::string& name)
{
cmCPackGenerator* gen = this->NewGeneratorInternal(name);
if ( !gen )
@@ -165,12 +184,8 @@ cmCPackGenerator* cmCPackGeneratorFactory::NewGenerator(const char* name)
//----------------------------------------------------------------------
cmCPackGenerator* cmCPackGeneratorFactory::NewGeneratorInternal(
- const char* name)
+ const std::string& name)
{
- if ( !name )
- {
- return 0;
- }
cmCPackGeneratorFactory::t_GeneratorCreatorsMap::iterator it
= this->GeneratorCreators.find(name);
if ( it == this->GeneratorCreators.end() )
@@ -181,11 +196,11 @@ cmCPackGenerator* cmCPackGeneratorFactory::NewGeneratorInternal(
}
//----------------------------------------------------------------------
-void cmCPackGeneratorFactory::RegisterGenerator(const char* name,
+void cmCPackGeneratorFactory::RegisterGenerator(const std::string& name,
const char* generatorDescription,
CreateGeneratorCall* createGenerator)
{
- if ( !name || !createGenerator )
+ if ( !createGenerator )
{
cmCPack_Log(this->Logger, cmCPackLog::LOG_ERROR,
"Cannot register generator" << std::endl);