Package: cmake
Version: 2.4.5-1
Severity: wishlist
Tags: patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
as Debian contains nsis, it would be nice to have support for it also in
CPack. I've made patch add nsis packing support (and I also submitted it
to upstream [1]. If you would be willing to include this patch it package,
I'd be happy.
[1]: http://www.cmake.org/Bug/bug.php?op=show&bugid=4376&pos=0
- --
Michal Čihař | http://cihar.com | http://blog.cihar.com
- -- System Information:
Debian Release: 4.0
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages cmake depends on:
ii libc6 2.3.6.ds1-10 GNU C Library: Shared libraries
ii libgcc1 1:4.1.1-21 GCC support library
ii libncurses5 5.5-5 Shared libraries for terminal hand
ii libstdc++6 4.1.1-21 The GNU Standard C++ Library v3
cmake recommends no packages.
- -- no debconf information
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFFvO493DVS6DbnVgQRAuKYAKCoQHN5fKNaBviqHyh5KmFpYpv4HwCgpX3u
E7HTQFAl7aSTAmwEz7pITzg=
=MMTd
-----END PGP SIGNATURE-----
--- cmake-2.4.5.orig/Source/CPack/cmCPackGenerators.cxx
+++ cmake-2.4.5/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",
--- cmake-2.4.5.orig/Source/CPack/cmCPackNSISGenerator.cxx
+++ cmake-2.4.5/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;