[cmake-commits] hoffman committed bills-comments.txt 1.1 1.2 cmCPackCygwinBinaryGenerator.cxx 1.1 1.2 cmCPackCygwinBinaryGenerator.h 1.1 1.2 cmCPackCygwinSourceGenerator.cxx 1.1 1.2 cmCPackCygwinSourceGenerator.h 1.1 1.2 cmCPackGenerators.cxx 1.13 1.14 cmCPackGenericGenerator.cxx 1.42 1.43 cmCPackGenericGenerator.h 1.16 1.17 cmCPackNSISGenerator.h 1.8 1.9 cmCPackOSXX11Generator.h 1.1 1.2 cmCPackPackageMakerGenerator.h 1.7 1.8 cmCPackSTGZGenerator.h 1.7 1.8 cmCPackTGZGenerator.h 1.9 1.10 cmCPackTarBZip2Generator.cxx 1.2 1.3 cmCPackTarBZip2Generator.h 1.1 1.2 cmCPackTarCompressGenerator.h 1.3 1.4 cmCPackZIPGenerator.h 1.2 1.3 cygwin.readme 1.1 1.2

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Feb 2 14:40:28 EST 2007


Update of /cvsroot/CMake/CMake/Source/CPack
In directory public:/mounts/ram/cvs-serv6154/Source/CPack

Modified Files:
	bills-comments.txt cmCPackCygwinBinaryGenerator.cxx 
	cmCPackCygwinBinaryGenerator.h 
	cmCPackCygwinSourceGenerator.cxx 
	cmCPackCygwinSourceGenerator.h cmCPackGenerators.cxx 
	cmCPackGenericGenerator.cxx cmCPackGenericGenerator.h 
	cmCPackNSISGenerator.h cmCPackOSXX11Generator.h 
	cmCPackPackageMakerGenerator.h cmCPackSTGZGenerator.h 
	cmCPackTGZGenerator.h cmCPackTarBZip2Generator.cxx 
	cmCPackTarBZip2Generator.h cmCPackTarCompressGenerator.h 
	cmCPackZIPGenerator.h cygwin.readme 
Log Message:
ENH: add support for cygwin source and binary packaging


Index: cygwin.readme
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cygwin.readme,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cygwin.readme	9 Jun 2006 17:45:09 -0000	1.1
+++ cygwin.readme	2 Feb 2007 19:40:26 -0000	1.2
@@ -37,8 +37,8 @@
 
 Here is the bootstrap command used:
 
-  ${SOURCE_DIR}/bootstrap --prefix=${PREFIX} --datadir=/share/${PKG}-${VER} \
-                          --docdir=/share/doc/${PKG}-${VER} --mandir=/share/man
+  ${SOURCE_DIR}/bootstrap --prefix=/usr --datadir=/share/cmake-${VER} \
+                          --docdir=/share/doc/cmake-${VER} --mandir=/share/man
 
 CMAKE_DOC_DIR    /share/doc/${PKG}-${VER}
 CMAKE_MAN_DIR    /share/man

Index: cmCPackSTGZGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackSTGZGenerator.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cmCPackSTGZGenerator.h	18 Apr 2006 12:25:24 -0000	1.7
+++ cmCPackSTGZGenerator.h	2 Feb 2007 19:40:26 -0000	1.8
@@ -41,7 +41,7 @@
     const std::vector<std::string>& files);
   virtual int InitializeInternal();
   int GenerateHeader(std::ostream* os);
-  virtual const char* GetOutputExtension() { return "sh"; }
+  virtual const char* GetOutputExtension() { return ".sh"; }
 };
 
 #endif

Index: cmCPackGenericGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackGenericGenerator.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- cmCPackGenericGenerator.h	11 Jan 2007 15:49:18 -0000	1.16
+++ cmCPackGenericGenerator.h	2 Feb 2007 19:40:26 -0000	1.17
@@ -94,7 +94,7 @@
   int PrepareNames();
   int InstallProject();
   int CleanTemporaryDirectory();
-  virtual const char* GetOutputExtension() { return "cpack"; }
+  virtual const char* GetOutputExtension() { return ".cpack"; }
   virtual const char* GetOutputPostfix() { return 0; }
   virtual int CompressFiles(const char* outFileName, const char* toplevel,
     const std::vector<std::string>& files);

Index: cmCPackTarCompressGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackTarCompressGenerator.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cmCPackTarCompressGenerator.h	21 Aug 2006 16:37:40 -0000	1.3
+++ cmCPackTarCompressGenerator.h	2 Feb 2007 19:40:26 -0000	1.4
@@ -39,7 +39,7 @@
   virtual int InitializeInternal();
   int CompressFiles(const char* outFileName, const char* toplevel,
     const std::vector<std::string>& files);
-  virtual const char* GetOutputExtension() { return "tar.Z"; }
+  virtual const char* GetOutputExtension() { return ".tar.Z"; }
 
   int RenameFile(const char* oldname, const char* newname);
   int GenerateHeader(std::ostream* os);

Index: cmCPackCygwinBinaryGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackCygwinBinaryGenerator.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cmCPackCygwinBinaryGenerator.cxx	9 Jun 2006 17:45:09 -0000	1.1
+++ cmCPackCygwinBinaryGenerator.cxx	2 Feb 2007 19:40:25 -0000	1.2
@@ -41,7 +41,7 @@
 //----------------------------------------------------------------------
 int cmCPackCygwinBinaryGenerator::InitializeInternal()
 {
-  this->SetOptionIfNotSet("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", "1");
+  this->SetOptionIfNotSet("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", "0");
   std::vector<std::string> path;
   std::string pkgPath = cmSystemTools::FindProgram("bzip2", path, false);
   if ( pkgPath.empty() )
@@ -62,13 +62,16 @@
   const char* toplevel, const std::vector<std::string>& files)
 {
   std::string packageName = this->GetOption("CPACK_PACKAGE_NAME");
+  packageName += "-";
   packageName += this->GetOption("CPACK_PACKAGE_VERSION");
   packageName = cmsys::SystemTools::LowerCase(packageName);
-  std::string manifest = "/share/doc/";
+  std::string manifest = "/usr/share/doc/";
   manifest += packageName;
   manifest += "/MANIFEST";
   std::string manifestFile 
     = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
+  // Create a MANIFEST file that contains all of the files in
+  // the tar file
   std::string tempdir = manifestFile;
   manifestFile += manifest;
   // create an extra scope to force the stream
@@ -78,18 +81,23 @@
   for(std::vector<std::string>::const_iterator i = files.begin();
       i != files.end(); ++i)
     {
-#undef cerr
     // remove the temp dir and replace with /usr
-    ofs << "/usr" << (*i).substr(tempdir.size()) << "\n";
-    std::cerr << "/usr" << (*i).substr(tempdir.size()) << "\n";
-    
+    ofs << (*i).substr(tempdir.size()) << "\n";
     }
-  ofs << "/usr" << manifest << "\n";
+  ofs << manifest << "\n";
   }
-  // Now compress up everything
+  // add the manifest file to the list of all files
   std::vector<std::string> filesWithManifest = files;
   filesWithManifest.push_back(manifestFile);
+  // create the bzip2 tar file 
   return this->Superclass::CompressFiles(outFileName, toplevel, 
                                          filesWithManifest);
 }
 
+const char* cmCPackCygwinBinaryGenerator::GetOutputExtension()
+{
+  this->OutputExtension = "-";
+  this->OutputExtension += this->GetOption("CPACK_CYGWIN_PATCH_NUMBER");
+  this->OutputExtension += ".tar.bz2";
+  return this->OutputExtension.c_str();
+}

Index: cmCPackTGZGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackTGZGenerator.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- cmCPackTGZGenerator.h	2 May 2006 21:34:27 -0000	1.9
+++ cmCPackTGZGenerator.h	2 Feb 2007 19:40:26 -0000	1.10
@@ -44,7 +44,7 @@
   virtual int GenerateHeader(std::ostream* os);
   int CompressFiles(const char* outFileName, const char* toplevel,
     const std::vector<std::string>& files);
-  virtual const char* GetOutputExtension() { return "tar.gz"; }
+  virtual const char* GetOutputExtension() { return ".tar.gz"; }
 
   bool Compress;
 };

Index: cmCPackCygwinSourceGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackCygwinSourceGenerator.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cmCPackCygwinSourceGenerator.cxx	31 Jan 2007 21:50:24 -0000	1.1
+++ cmCPackCygwinSourceGenerator.cxx	2 Feb 2007 19:40:25 -0000	1.2
@@ -69,36 +69,29 @@
 int cmCPackCygwinSourceGenerator::CompressFiles(const char* outFileName,
   const char* toplevel, const std::vector<std::string>& files)
 {
+  // Create a tar file of the sources
   std::string packageDirFileName
     = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
   packageDirFileName += ".tar";
   std::string output;
   int retVal = -1;
-  if ( !this->Superclass::CompressFiles(packageDirFileName.c_str(),
+  // skip one parent up to the cmCPackTGZGenerator to create tar file
+  this->Compress = false; // just create tar not tar.gz
+  if ( !this->cmCPackTGZGenerator::CompressFiles(packageDirFileName.c_str(),
       toplevel, files) )
     {
     return 0;
     }
-  cmOStringStream dmgCmd1;
-  dmgCmd1 << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM")
-    << "\" \"" << packageDirFileName
-    << "\"";
-  retVal = -1;
-  int res = cmSystemTools::RunSingleCommand(dmgCmd1.str().c_str(), &output,
-    &retVal, toplevel, this->GeneratorVerbose, 0);
-  if ( !res || retVal )
-    {
-    std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
-    tmpFile += "/CompressBZip2.log";
-    cmGeneratedFileStream ofs(tmpFile.c_str());
-    ofs << "# Run command: " << dmgCmd1.str().c_str() << std::endl
-      << "# Output:" << std::endl
-      << output.c_str() << std::endl;
-    cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running BZip2 command: "
-      << dmgCmd1.str().c_str() << std::endl
-      << "Please check " << tmpFile.c_str() << " for errors" << std::endl);
+  // Now bzip2 the source tar file
+  if(!this->BZip2File(packageDirFileName.c_str()))
+    { 
+    cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running BZip2 on file: "
+                  << packageDirFileName.c_str());
     return 0;
     }
+  // Now create a tar file that contains the above .tar.bz2 file
+  // and the CPACK_CYGWIN_PATCH_FILE and CPACK_TOPLEVEL_DIRECTORY
+  // files
   std::string compressOutFile = packageDirFileName + ".bz2";
   // at this point compressOutFile is the full path to 
   // _CPack_Package/.../package-2.5.0.tar.bz2
@@ -108,7 +101,8 @@
   //   _CPack_Package/.../package-2.5.0-1.sh
   //   _CPack_Package/.../package-2.5.0.tar.bz2
   // the -1 is CPACK_CYGWIN_PATCH_NUMBER
-  if(!cmSystemTools::CopyFileIfDifferent(
+  // copy the patch file into place
+  if(!cmSystemTools::CopyFileAlways(
        this->GetOption("CPACK_CYGWIN_PATCH_FILE"),
        this->GetOption("CPACK_TOPLEVEL_DIRECTORY")))
     {
@@ -117,7 +111,8 @@
                   << this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "]\n");
     return 0;
     }
-  if(!cmSystemTools::CopyFileIfDifferent(
+  // copy the build script into place
+  if(!cmSystemTools::CopyFileAlways(
        this->GetOption("CPACK_CYGWIN_BUILD_SCRIPT"),
        this->GetOption("CPACK_TOPLEVEL_DIRECTORY")))
     {
@@ -126,7 +121,7 @@
                   << this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "]\n");
     return 0;
     }
-                                     
+  // create the tar file 
   std::string outerTarFile
     = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
   outerTarFile += "-";
@@ -151,6 +146,7 @@
   cmSystemTools::CreateTar(outerTarFile.c_str(),
                            outerFiles, false, false);
   cmSystemTools::ChangeDirectory(saveDir.c_str());
+  // now compress the outer tar file
   if(!this->BZip2File(outerTarFile.c_str()))
     {
     return 0;
@@ -168,7 +164,6 @@
       return 0;
       }
     }
-
   return 1;
 }
 

Index: cmCPackPackageMakerGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackPackageMakerGenerator.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cmCPackPackageMakerGenerator.h	15 Apr 2006 17:02:17 -0000	1.7
+++ cmCPackPackageMakerGenerator.h	2 Feb 2007 19:40:26 -0000	1.8
@@ -42,7 +42,7 @@
   virtual int InitializeInternal();
   int CompressFiles(const char* outFileName, const char* toplevel,
     const std::vector<std::string>& files);
-  virtual const char* GetOutputExtension() { return "dmg"; }
+  virtual const char* GetOutputExtension() { return ".dmg"; }
   virtual const char* GetOutputPostfix() { return "darwin"; }
   virtual const char* GetInstallPrefix() { return "/usr"; }
 

Index: cmCPackNSISGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackNSISGenerator.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- cmCPackNSISGenerator.h	15 Apr 2006 17:02:17 -0000	1.8
+++ cmCPackNSISGenerator.h	2 Feb 2007 19:40:26 -0000	1.9
@@ -41,7 +41,7 @@
   virtual int InitializeInternal();
   int CompressFiles(const char* outFileName, const char* toplevel,
     const std::vector<std::string>& files);
-  virtual const char* GetOutputExtension() { return "exe"; }
+  virtual const char* GetOutputExtension() { return ".exe"; }
   virtual const char* GetOutputPostfix() { return "win32"; }
 
   bool GetListOfSubdirectories(const char* dir,

Index: cmCPackOSXX11Generator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackOSXX11Generator.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cmCPackOSXX11Generator.h	10 Jan 2007 20:30:26 -0000	1.1
+++ cmCPackOSXX11Generator.h	2 Feb 2007 19:40:26 -0000	1.2
@@ -40,7 +40,7 @@
   virtual int InitializeInternal();
   int CompressFiles(const char* outFileName, const char* toplevel,
     const std::vector<std::string>& files);
-  virtual const char* GetOutputExtension() { return "dmg"; }
+  virtual const char* GetOutputExtension() { return ".dmg"; }
   virtual const char* GetInstallPrefix() { return ".app/Contents/Resources"; }
 
   //bool CopyCreateResourceFile(const char* name, const char* dir);

Index: cmCPackTarBZip2Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackTarBZip2Generator.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cmCPackTarBZip2Generator.cxx	30 Oct 2006 16:22:48 -0000	1.2
+++ cmCPackTarBZip2Generator.cxx	2 Feb 2007 19:40:26 -0000	1.3
@@ -66,27 +66,17 @@
 }
 
 //----------------------------------------------------------------------
-int cmCPackTarBZip2Generator::CompressFiles(const char* outFileName,
-  const char* toplevel, const std::vector<std::string>& files)
+int cmCPackTarBZip2Generator::BZip2File(const char* packageDirFileName)
 {
-  std::string packageDirFileName
-    = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
-  packageDirFileName += ".tar";
-  std::string output;
-  int retVal = -1;
-  if ( !this->Superclass::CompressFiles(packageDirFileName.c_str(),
-      toplevel, files) )
-    {
-    return 0;
-    }
-
+  int retVal = 0;
   cmOStringStream dmgCmd1;
   dmgCmd1 << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM")
     << "\" \"" << packageDirFileName
     << "\"";
   retVal = -1;
+  std::string output;
   int res = cmSystemTools::RunSingleCommand(dmgCmd1.str().c_str(), &output,
-    &retVal, toplevel, this->GeneratorVerbose, 0);
+    &retVal, 0, this->GeneratorVerbose, 0);
   if ( !res || retVal )
     {
     std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
@@ -100,7 +90,29 @@
       << "Please check " << tmpFile.c_str() << " for errors" << std::endl);
     return 0;
     }
+  return 1;
+}
+
+//----------------------------------------------------------------------
+int cmCPackTarBZip2Generator::CompressFiles(const char* outFileName,
+  const char* toplevel, const std::vector<std::string>& files)
+{
+  std::string packageDirFileName
+    = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
+  packageDirFileName += ".tar";
+  std::string output;
+  int retVal = -1;
+  if ( !this->Superclass::CompressFiles(packageDirFileName.c_str(),
+      toplevel, files) )
+    {
+    return 0;
+    }
 
+  if(!this->BZip2File(packageDirFileName.c_str()))
+    {
+    return 0;
+    }
+  
   std::string compressOutFile = packageDirFileName + ".bz2";
   if ( !cmSystemTools::SameFile(compressOutFile.c_str(), outFileName ) )
     {

Index: cmCPackZIPGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackZIPGenerator.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cmCPackZIPGenerator.h	15 Apr 2006 17:02:18 -0000	1.2
+++ cmCPackZIPGenerator.h	2 Feb 2007 19:40:26 -0000	1.3
@@ -48,7 +48,7 @@
   virtual int InitializeInternal();
   int CompressFiles(const char* outFileName, const char* toplevel,
     const std::vector<std::string>& files);
-  virtual const char* GetOutputExtension() { return "zip"; }
+  virtual const char* GetOutputExtension() { return ".zip"; }
 
   int ZipStyle;
 };

Index: cmCPackGenericGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackGenericGenerator.cxx,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- cmCPackGenericGenerator.cxx	15 Jan 2007 17:31:29 -0000	1.42
+++ cmCPackGenericGenerator.cxx	2 Feb 2007 19:40:25 -0000	1.43
@@ -74,7 +74,6 @@
 
   std::string outName = this->GetOption("CPACK_PACKAGE_FILE_NAME");
   tempDirectory += "/" + outName;
-  outName += ".";
   outName += this->GetOutputExtension();
 
   std::string destFile = this->GetOption("CPACK_PACKAGE_DIRECTORY");
@@ -82,7 +81,6 @@
 
   std::string outFile = topDirectory + "/" + outName;
   std::string installPrefix = tempDirectory + this->GetInstallPrefix();
-
   this->SetOptionIfNotSet("CPACK_TOPLEVEL_DIRECTORY", topDirectory.c_str());
   this->SetOptionIfNotSet("CPACK_TEMPORARY_DIRECTORY", tempDirectory.c_str());
   this->SetOptionIfNotSet("CPACK_OUTPUT_FILE_NAME", outName.c_str());
@@ -106,7 +104,8 @@
     if ( !cmSystemTools::FileExists(descFileName) )
       {
       cmCPackLogger(cmCPackLog::LOG_ERROR,
-        "Cannot find description file name: " << descFileName << std::endl);
+                    "Cannot find description file name: [" 
+                    << descFileName << "]" << std::endl);
       return 0;
       }
     std::ifstream ifs(descFileName);
@@ -235,6 +234,7 @@
       {
       std::string fileName = tempInstallDirectory;
       fileName += "/" + *it;
+      fileName += cmSystemTools::GetExecutableExtension();
       cmCPackLogger(cmCPackLog::LOG_VERBOSE,
         "    Strip file: " << fileName.c_str()
         << std::endl);
@@ -344,7 +344,8 @@
       return 0;
       }
     std::vector<std::string>::iterator it;
-    const char* tempDir = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
+    const char* tempDir = tempInstallDirectory;
+// this->GetOption("CPACK_TEMPORARY_DIRECTORY");
     for ( it = installDirectoriesVector.begin();
       it != installDirectoriesVector.end();
       ++it )

Index: bills-comments.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/bills-comments.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- bills-comments.txt	9 Jun 2006 17:45:09 -0000	1.1
+++ bills-comments.txt	2 Feb 2007 19:40:25 -0000	1.2
@@ -6,6 +6,7 @@
 
 cmCPackGenericGenerator::Initialize
    this->InitializeInternal
+     CPACK_INCLUDE_TOPLEVEL_DIRECTORY = 0 turns off 
 
 
 // binary package run
@@ -64,3 +65,4 @@
 // run the cmake install scripts if provided
   cmCPackGenerator::RunCMakeInstallScripts()  
 
+-

Index: cmCPackGenerators.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackGenerators.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- cmCPackGenerators.cxx	10 Jan 2007 20:30:26 -0000	1.13
+++ cmCPackGenerators.cxx	2 Feb 2007 19:40:25 -0000	1.14
@@ -31,6 +31,11 @@
 #  include "cmCPackOSXX11Generator.h"
 #endif
 
+#ifdef __CYGWIN__
+#  include "cmCPackCygwinBinaryGenerator.h"
+#  include "cmCPackCygwinSourceGenerator.h"
+#endif
+
 #include "cmCPackLog.h"
 
 //----------------------------------------------------------------------
@@ -44,6 +49,13 @@
   this->RegisterGenerator("NSIS", "Null Soft Installer",
     cmCPackNSISGenerator::CreateGenerator);
 #endif
+#ifdef __CYGWIN__
+  this->RegisterGenerator("CygwinBinary", "Cygwin Binary Installer",
+                          cmCPackCygwinBinaryGenerator::CreateGenerator);
+  this->RegisterGenerator("CygwinSource", "Cygwin Source Installer",
+                          cmCPackCygwinSourceGenerator::CreateGenerator);
+#endif
+
   this->RegisterGenerator("ZIP", "ZIP file format",
     cmCPackZIPGenerator::CreateGenerator);
   this->RegisterGenerator("TBZ2", "Tar BZip2 compression",

Index: cmCPackCygwinSourceGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackCygwinSourceGenerator.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cmCPackCygwinSourceGenerator.h	31 Jan 2007 21:50:24 -0000	1.1
+++ cmCPackCygwinSourceGenerator.h	2 Feb 2007 19:40:25 -0000	1.2
@@ -26,7 +26,7 @@
 class cmCPackCygwinSourceGenerator : public cmCPackTarBZip2Generator
 {
 public:
-  cmCPackTypeMacro(cmCPackCygwinSourceGenerator, cmCPackTGZGenerator);
+  cmCPackTypeMacro(cmCPackCygwinSourceGenerator, cmCPackTarBZip2Generator);
 
   /**
    * Construct generator

Index: cmCPackCygwinBinaryGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackCygwinBinaryGenerator.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cmCPackCygwinBinaryGenerator.h	9 Jun 2006 17:45:09 -0000	1.1
+++ cmCPackCygwinBinaryGenerator.h	2 Feb 2007 19:40:25 -0000	1.2
@@ -33,12 +33,13 @@
    */
   cmCPackCygwinBinaryGenerator();
   virtual ~cmCPackCygwinBinaryGenerator();
-
 protected:
+  virtual const char* GetInstallPrefix() { return "/usr"; }
   virtual int InitializeInternal();
   int CompressFiles(const char* outFileName, const char* toplevel,
     const std::vector<std::string>& files);
-
+  virtual const char* GetOutputExtension();
+  std::string OutputExtension;
 };
 
 #endif

Index: cmCPackTarBZip2Generator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackTarBZip2Generator.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cmCPackTarBZip2Generator.h	4 May 2006 01:42:51 -0000	1.1
+++ cmCPackTarBZip2Generator.h	2 Feb 2007 19:40:26 -0000	1.2
@@ -39,8 +39,8 @@
   virtual int InitializeInternal();
   int CompressFiles(const char* outFileName, const char* toplevel,
     const std::vector<std::string>& files);
-  virtual const char* GetOutputExtension() { return "tar.bz2"; }
-
+  virtual const char* GetOutputExtension() { return ".tar.bz2"; }
+  int BZip2File(const char* filename);
   int RenameFile(const char* oldname, const char* newname);
 };
 



More information about the Cmake-commits mailing list