diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-05-11 10:33:21 -0400 |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-05-11 10:33:21 -0400 |
commit | 0c4f1e3f80a2faafc2f22576f5e8fdf5f6033564 (patch) | |
tree | 4e20d4b94aa8502bd7f64d809995874757af8467 | |
parent | e2c41d8436f8c82bd269ee831b23b98aafd9bb5a (diff) | |
download | cmake-0c4f1e3f80a2faafc2f22576f5e8fdf5f6033564.tar.gz |
ENH: merge changes from main tree
-rw-r--r-- | ChangeLog.manual | 3 | ||||
-rw-r--r-- | Source/CPack/cmCPackZIPGenerator.cxx | 19 |
2 files changed, 21 insertions, 1 deletions
diff --git a/ChangeLog.manual b/ChangeLog.manual index f4ec2449a5..55583369e6 100644 --- a/ChangeLog.manual +++ b/ChangeLog.manual @@ -1,4 +1,7 @@ Changes in CMake 2.4.2 + +* Fix CPack ZIP on windows command line problem + * Find executables with no extension on windows mingw * Fix FindQt3 to use QTDIR over path diff --git a/Source/CPack/cmCPackZIPGenerator.cxx b/Source/CPack/cmCPackZIPGenerator.cxx index d8ad47f555..3d46f80f41 100644 --- a/Source/CPack/cmCPackZIPGenerator.cxx +++ b/Source/CPack/cmCPackZIPGenerator.cxx @@ -90,13 +90,16 @@ int cmCPackZIPGenerator::InitializeInternal() int cmCPackZIPGenerator::CompressFiles(const char* outFileName, const char* toplevel, const std::vector<std::string>& files) { + std::string tempFileName; cmOStringStream dmgCmd; switch ( this->ZipStyle ) { case cmCPackZIPGenerator::StyleWinZip: + tempFileName = toplevel; + tempFileName += "/winZip.filelist"; dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM") << "\" -P \"" << outFileName - << "\""; + << "\" @\"" << tempFileName.c_str() << "\""; break; case cmCPackZIPGenerator::StyleUnixZip: dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM") @@ -108,12 +111,26 @@ int cmCPackZIPGenerator::CompressFiles(const char* outFileName, << std::endl); return 0; } + if(tempFileName.size()) + { + cmGeneratedFileStream out(tempFileName.c_str()); + std::vector<std::string>::const_iterator fileIt; + for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt ) + { + out << "\"" + << cmSystemTools::RelativePath(toplevel, fileIt->c_str()) + << "\"" << std::endl; + } + } + else + { std::vector<std::string>::const_iterator fileIt; for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt ) { dmgCmd << " \"" << cmSystemTools::RelativePath(toplevel, fileIt->c_str()) << "\""; + } } std::string output; int retVal = -1; |