On Sat, Sep 18, 2010 at 3:02 AM, J Decker <span dir="ltr">&lt;<a href="mailto:d3ck0r@gmail.com">d3ck0r@gmail.com</a>&gt;</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 &lt;<a href="mailto:nickyperian@yahoo.com">nickyperian@yahoo.com</a>&gt; wrote:<br>
&gt; I have tried many variations to the HKEY_LOCAL_MACHINE setting and am unable<br>
&gt; to get a run through of Cpack.<br>
&gt; I know it must be something simple I am missing.<br>
&gt; I need help with this.<br>
&gt; I am on a windows 7 / 64bit machine. NSIS is unicode and installed in the 32<br>
&gt; bit program files directory.<br>
&gt; Thanks,<br>
&gt; CMakeLists.txt:<br>
&gt; if (WINDOWS)<br>
&gt;     # build a CPack driven installer package<br>
&gt;     SET (CPACK_GENERATOR &quot;NSIS&quot;)<br>
&gt;     SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY<br>
&gt; HKEY_LOCAL_MACHINE&quot;/SOFTWARE/Wow6432Node/NSIS/Unicode&quot;)<br>
<br>
</div>I really think you shouldn&#39;t include wow6432node - that is<br>
automaically applied when a 32 bit process writes values to the<br>
registry.<br>
<div class="im"><br>
&gt;     include (InstallRequiredSystemLibraries)<br>
&gt;     include (CPack)<br>
&gt; endif (WINDOWS)<br>
&gt; CPackConfig.cmake: (snip)<br>
&gt; SET(CPACK_BINARY_NSIS &quot;&quot;)<br>
&gt; .<br>
&gt; .<br>
&gt; SET(CPACK_CMAKE_GENERATOR &quot;Visual Studio 8 2005&quot;)<br>
&gt; .<br>
&gt; .<br>
&gt; SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY<br>
&gt; &quot;HKEY_LOCAL_MACHINE&quot;/SOFTWARE/Wow6432Node/NSIS/Unicode&quot;&quot;)<br>
&gt; Output:<br>
&gt; C:\Phoenix\phoenix-work\indra\build-vc80&gt;cpack cpackconfig.cmake<br>
&gt; CPack Error: Cannot find NSIS registry value. This is usually caused by NSIS<br>
&gt; not<br>
&gt;  being installed. Please install NSIS from <a href="http://nsis.sourceforge.net" target="_blank">http://nsis.sourceforge.net</a><br>
&gt; CPack Error: Cannot initialize the generator NSIS<br>
&gt;<br>
</div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the CMake FAQ at:<br>
&gt; <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
&gt;<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>&quot;${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}&quot;<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&#39;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 &quot;blah blah/SOFTWARE/this/that&quot; 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>