View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
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 | ||||||||
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. | ||||||||
Attached Files | ![]() ![]() | ||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0029427) David Cole (manager) 2012-05-08 17:02 |
Please create patches for CMake using git, based on the 'master' branch, and then: git format-patch -1 And then attach the resulting .patch file to this issue in the bug tracker. Thanks. |
(0029458) David Golub (reporter) 2012-05-09 15:37 |
I've uploaded the patch file as you've requested. |
(0031074) David Cole (manager) 2012-09-20 17:18 |
I will try to get this in soon, in time for 2.8.10-rc1 |
(0031143) David Cole (manager) 2012-10-01 15:20 |
The deadline has past for getting proposed changes into CMake 2.8.10-rc1: setting target version to 2.8.11 |
(0031634) David Cole (manager) 2012-11-20 16:59 |
Fix pushed and merged to the 'next' branch: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6ff730a4983d15f3e115a919eb18d866f8c65507 [^] I had to rewrite the commit a little bit to adapt to code that has since been added to master regarding the UNICODE build of the NSIS installer builder. Take a look at this, and try it out in this form to make sure it still works for you with your 64-bit build of NSIS. (It will prefer a UNICODE install of NSIS over a non-UNICODE install, whether seeking the 32-bit or the 64-bit installer...) Thanks for your contribution! |
(0032874) Robert Maynard (manager) 2013-04-17 08:54 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
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 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |