MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0013203 | CMake | CPack | public | 2012-05-08 15:08 | 2013-04-17 08:54 | |||||
Reporter | David Golub | |||||||||
Assigned To | David Cole | |||||||||
Priority | normal | Severity | minor | Reproducibility | N/A | |||||
Status | closed | Resolution | fixed | |||||||
Platform | Intel x64 | OS | Microsoft Windows | OS Version | Windows 7 | |||||
Product Version | CMake 2.8.8 | |||||||||
Target Version | CMake 2.8.11 | Fixed in Version | CMake 2.8.11 | |||||||
Summary | 0013203: Add support for 64-bit NSIS | |||||||||
Description | I recently created a 64-bit port of NSIS, which is available at http://www.bitbucket.org/dgolub/nsis64. [^] I'd like to submit a patch to CPack to add support for building 64-bit installers: diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx --- a/Source/CPack/cmCPackGeneratorFactory.cxx +++ b/Source/CPack/cmCPackGeneratorFactory.cxx @@ -49,6 +49,8 @@ cmCPackSTGZGenerator::CreateGenerator); this->RegisterGenerator("NSIS", "Null Soft Installer", cmCPackNSISGenerator::CreateGenerator); + this->RegisterGenerator("NSIS64", "Null Soft Installer (64-bit)", + cmCPackNSISGenerator::CreateGenerator64); #ifdef __CYGWIN__ this->RegisterGenerator("CygwinBinary", "Cygwin Binary Installer", cmCPackCygwinBinaryGenerator::CreateGenerator); diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -33,8 +33,9 @@ #endif //---------------------------------------------------------------------- -cmCPackNSISGenerator::cmCPackNSISGenerator() +cmCPackNSISGenerator::cmCPackNSISGenerator(bool nsis64) { + Nsis64 = nsis64; } //---------------------------------------------------------------------- @@ -358,16 +359,28 @@ bool gotRegValue = true; #ifdef _WIN32 - if ( !cmsys::SystemTools::ReadRegistryValue( - "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath, - cmsys::SystemTools::KeyWOW64_32) ) + if (Nsis64) { if ( !cmsys::SystemTools::ReadRegistryValue( - "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath) ) + "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath, + cmsys::SystemTools::KeyWOW64_64) ) { gotRegValue = false; } } + else + { + if ( !cmsys::SystemTools::ReadRegistryValue( + "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath, + cmsys::SystemTools::KeyWOW64_32) ) + { + if ( !cmsys::SystemTools::ReadRegistryValue( + "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath) ) + { + gotRegValue = false; + } + } + } if (gotRegValue) { diff --git a/Source/CPack/cmCPackNSISGenerator.h b/Source/CPack/cmCPackNSISGenerator.h --- a/Source/CPack/cmCPackNSISGenerator.h +++ b/Source/CPack/cmCPackNSISGenerator.h @@ -27,10 +27,13 @@ public: cmCPackTypeMacro(cmCPackNSISGenerator, cmCPackGenerator); + static cmCPackGenerator* CreateGenerator64() + { return new cmCPackNSISGenerator(true); } + /** * Construct generator */ - cmCPackNSISGenerator(); + cmCPackNSISGenerator(bool nsis64 = false); virtual ~cmCPackNSISGenerator(); protected: @@ -75,6 +78,8 @@ /// Translations any newlines found in the string into \\r\\n, so that the /// resulting string can be used within NSIS. static std::string TranslateNewlines(std::string str); + + bool Nsis64; }; #endif | |||||||||
Steps To Reproduce | ||||||||||
Additional Information | Please note that this patch is dependent on the patch submitted with bug 13202, as the 64-bit port of NSIS is based on the latest code from the NSIS Subversion repository. | |||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | 0001-CPack-NSIS-Fix-compatibility-issues-with-prerelease-.patch (1,335) 2012-05-09 15:36 https://public.kitware.com/Bug/file/4322/0001-CPack-NSIS-Fix-compatibility-issues-with-prerelease-.patch 0001-CPack-NSIS-Add-support-for-64-bit-NSIS-13203.patch (3,485) 2012-05-09 15:37 https://public.kitware.com/Bug/file/4323/0001-CPack-NSIS-Add-support-for-64-bit-NSIS-13203.patch | |||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2012-05-08 15:08 | David Golub | New Issue | ||||||||
2012-05-08 16:48 | Eric NOULARD | Relationship added | child of 0013202 | |||||||
2012-05-08 16:48 | Eric NOULARD | Relationship replaced | related to 0013202 | |||||||
2012-05-08 17:02 | David Cole | Note Added: 0029427 | ||||||||
2012-05-09 15:36 | David Golub | File Added: 0001-CPack-NSIS-Fix-compatibility-issues-with-prerelease-.patch | ||||||||
2012-05-09 15:37 | David Golub | Note Added: 0029458 | ||||||||
2012-05-09 15:37 | David Golub | File Added: 0001-CPack-NSIS-Add-support-for-64-bit-NSIS-13203.patch | ||||||||
2012-06-20 18:34 | David Cole | Assigned To | => David Cole | |||||||
2012-06-20 18:34 | David Cole | Status | new => assigned | |||||||
2012-08-14 19:12 | David Cole | Target Version | => CMake 2.8.10 | |||||||
2012-09-20 17:18 | David Cole | Note Added: 0031074 | ||||||||
2012-10-01 15:20 | David Cole | Note Added: 0031143 | ||||||||
2012-10-01 15:20 | David Cole | Target Version | CMake 2.8.10 => CMake 2.8.11 | |||||||
2012-11-20 16:59 | David Cole | Note Added: 0031634 | ||||||||
2012-11-20 16:59 | David Cole | Status | assigned => resolved | |||||||
2012-11-20 16:59 | David Cole | Fixed in Version | => CMake 2.8.11 | |||||||
2012-11-20 16:59 | David Cole | Resolution | open => fixed | |||||||
2013-04-17 08:54 | Robert Maynard | Note Added: 0032874 | ||||||||
2013-04-17 08:54 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|