NSIS also works for linux, it just has a small different command line interface. Here is a patch from Michal Čihař to make it work.
Index: cmake-2.4.6/Source/CPack/cmCPackGenerators.cxx =================================================================== --- cmake-2.4.6.orig/Source/CPack/cmCPackGenerators.cxx +++ cmake-2.4.6/Source/CPack/cmCPackGenerators.cxx @@ -35,10 +35,8 @@ cmCPackTGZGenerator::CreateGenerator); this->RegisterGenerator("STGZ", "Self extracting Tar GZip compression", cmCPackSTGZGenerator::CreateGenerator); -#ifdef _WIN32 this->RegisterGenerator("NSIS", "Null Soft Installer", cmCPackNSISGenerator::CreateGenerator); -#endif this->RegisterGenerator("ZIP", "ZIP file format", cmCPackZIPGenerator::CreateGenerator); this->RegisterGenerator("TBZ2", "Tar BZip2 compression", Index: cmake-2.4.6/Source/CPack/cmCPackNSISGenerator.cxx =================================================================== --- cmake-2.4.6.orig/Source/CPack/cmCPackNSISGenerator.cxx +++ cmake-2.4.6/Source/CPack/cmCPackNSISGenerator.cxx @@ -29,6 +29,13 @@ #include <cmsys/Directory.hxx> #include <cmsys/RegularExpression.hxx> +/* NSIS uses different command line syntax on Windows and others */ +#ifdef WIN32 +#define NSIS_OPT "/" +#else +#define NSIS_OPT "-" +#endif + //---------------------------------------------------------------------- cmCPackNSISGenerator::cmCPackNSISGenerator() { @@ -144,6 +151,7 @@ << std::endl); std::vector<std::string> path; std::string nsisPath; +#ifdef WIN32 if ( !cmsys::SystemTools::ReadRegistryValue( "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath) ) { @@ -156,6 +164,7 @@ return 0; } path.push_back(nsisPath); +#endif nsisPath = cmSystemTools::FindProgram("makensis", path, false); if ( nsisPath.empty() ) { @@ -163,7 +172,7 @@ << std::endl); return 0; } - std::string nsisCmd = "\"" + nsisPath + "\" /VERSION"; + std::string nsisCmd = "\"" + nsisPath + "\" " NSIS_OPT "VERSION"; cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Test NSIS version: " << nsisCmd.c_str() << std::endl); std::string output;
pgp0RcMr1Y2TQ.pgp
Description: PGP signature
_______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake