On Sat, Sep 18, 2010 at 3:02 AM, J Decker <span dir="ltr"><<a href="mailto:d3ck0r@gmail.com">d3ck0r@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Fri, Sep 17, 2010 at 10:59 AM, Nicky Perian <<a href="mailto:nickyperian@yahoo.com">nickyperian@yahoo.com</a>> wrote:<br>
> I have tried many variations to the HKEY_LOCAL_MACHINE setting and am unable<br>
> to get a run through of Cpack.<br>
> I know it must be something simple I am missing.<br>
> I need help with this.<br>
> I am on a windows 7 / 64bit machine. NSIS is unicode and installed in the 32<br>
> bit program files directory.<br>
> Thanks,<br>
> CMakeLists.txt:<br>
> if (WINDOWS)<br>
> # build a CPack driven installer package<br>
> SET (CPACK_GENERATOR "NSIS")<br>
> SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY<br>
> HKEY_LOCAL_MACHINE"/SOFTWARE/Wow6432Node/NSIS/Unicode")<br>
<br>
</div>I really think you shouldn't include wow6432node - that is<br>
automaically applied when a 32 bit process writes values to the<br>
registry.<br>
<div class="im"><br>
> include (InstallRequiredSystemLibraries)<br>
> include (CPack)<br>
> endif (WINDOWS)<br>
> CPackConfig.cmake: (snip)<br>
> SET(CPACK_BINARY_NSIS "")<br>
> .<br>
> .<br>
> SET(CPACK_CMAKE_GENERATOR "Visual Studio 8 2005")<br>
> .<br>
> .<br>
> SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY<br>
> "HKEY_LOCAL_MACHINE"/SOFTWARE/Wow6432Node/NSIS/Unicode"")<br>
> Output:<br>
> C:\Phoenix\phoenix-work\indra\build-vc80>cpack cpackconfig.cmake<br>
> CPack Error: Cannot find NSIS registry value. This is usually caused by NSIS<br>
> not<br>
> being installed. Please install NSIS from <a href="http://nsis.sourceforge.net" target="_blank">http://nsis.sourceforge.net</a><br>
> CPack Error: Cannot initialize the generator NSIS<br>
><br>
</div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br><div><br></div><div>Do NOT set CPACK_PACKAGE_INSTALL_REGISTRY_KEY unless you really need a value for it different than the default.</div><div><br></div><div>Please look at the definition of this variable in Modules/CPack.cmake. Its default value is set like this:</div>
<div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo">cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24"><span style="color: #000000"> </span>"${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}"<span style="color: #000000">)</span></p></div>
<div><span style="color: #000000"><br></span></div><div><span style="color: #000000">The value is supposed to be a simple string, not a full reg key path. In the NSIS template file, it's used to save some information about the installation into the registry when the end user runs the installer. But the usage of the value @</span>CPACK_PACKAGE_INSTALL_REGISTRY_KEY@ in the NSIS template file assumes that value may be used as a sub-key *already* under the "blah blah/SOFTWARE/this/that" root key.</div>
<div><span style="color: #000000"><br></span></div><div><span style="color: #000000">Do not try to use a full registry key path as the CPACK_PACKAGE_INSTALL_REGISTRY_KEY.</span></div><div><span style="color: #000000"><br>
</span></div><div><span style="color: #000000">What are you trying to do by setting this? Let us know, maybe somebody will have a useful suggestion.</span></div><div><span style="color: #000000"><br></span></div><div><span style="color: #000000"><br>
</span></div><div><span style="color: #000000">HTH,</span></div><div><span style="color: #000000">David</span></div><div><span style="color: #000000"><br></span></div>