<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    I have tried with the pre-built ones, but those don't detect visual
    studio 2005 SP1 correctly on windows 7 64-bit. I had to change the
    code to the version below.<br>
    I needed to add the "Wow6432Node" in the registry key path. Also,
    the VisualStudioProjectsLocation registry key was not there, but the
    VisualStudioLocation key was available on windows XP and on win7. So
    I constructed the path using that instead. Now it works for me.<br>
    <br>
    Best regards,<br>
    Tom,<br>
    <br>
    &nbsp; // Some VS8 sp0 versions cannot run macros.<br>
    &nbsp; // See <a class="moz-txt-link-freetext"
      href="http://support.microsoft.com/kb/928209">http://support.microsoft.com/kb/928209</a><br>
    &nbsp; const char* vc8sp1Registry =<br>
    &nbsp;&nbsp;&nbsp;
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\8.0\\"<br>
    &nbsp;&nbsp;&nbsp; "InstalledProducts\\KB926601;";<br>
    &nbsp; const char* vc8exSP1Registry =<br>
    &nbsp;&nbsp;&nbsp;
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\8.0\\"<br>
    &nbsp;&nbsp;&nbsp; "InstalledProducts\\KB926748;";<br>
    &nbsp; std::string vc8sp1;<br>
    &nbsp; if (!cmSystemTools::ReadRegistryValue(vc8sp1Registry, vc8sp1)
    &amp;&amp;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; !cmSystemTools::ReadRegistryValue(vc8exSP1Registry, vc8sp1))<br>
    &nbsp;&nbsp;&nbsp; {<br>
    &nbsp;&nbsp;&nbsp; return "";<br>
    &nbsp;&nbsp;&nbsp; }<br>
    <br>
    &nbsp; std::string base;<br>
    &nbsp; std::string path;<br>
    <br>
    &nbsp; // base begins with the VisualStudioProjectsLocation reg value...<br>
    &nbsp; if (cmSystemTools::ReadRegistryValue(<br>
    &nbsp;&nbsp;&nbsp; "HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\8.0;"<br>
    &nbsp;&nbsp;&nbsp; "VisualStudioLocation",<br>
    &nbsp;&nbsp;&nbsp; base))<br>
    &nbsp;&nbsp;&nbsp; {<br>
    &nbsp;&nbsp;&nbsp; cmSystemTools::ConvertToUnixSlashes(base);<br>
    <br>
    &nbsp;&nbsp;&nbsp; // 8.0 macros folder:<br>
    &nbsp;&nbsp;&nbsp; path = base + "/Projects/VSMacros80";<br>
    &nbsp;&nbsp;&nbsp; }<br>
    <br>
    <br>
    Op 25/01/2012 17:34, David Cole schreef:
    <blockquote
cite="mid:CAAdwe9Xk6O1DZi7aDSWC27ZO1Uf8MTMi2kzS27bcOeweKq-t9Q@mail.gmail.com"
      type="cite">
      <pre wrap="">After emailing directly with Tom, I realized I misinterpreted this
code when I replied to the list....

He has the problem with a 64-bit build of CMake itself, I think:

"You built a 64-bit CMake? That might be the explanation. Try building
a 32-bit one instead. Or simply use Kitware's pre-built 32-bit
binaries. They work just fine on 64-bit Windows systems..."

Tom, please let us know if a 32-bit CMake fixes this issue for you or not.


Thanks,
David C.


On Tue, Jan 24, 2012 at 10:28 AM, David Cole <a class="moz-txt-link-rfc2396E" href="mailto:david.cole@kitware.com">&lt;david.cole@kitware.com&gt;</a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">From the CMake source code file Source/cmGlobalVisualStudio8Generator.cxx:

//----------------------------------------------------------------------------
std::string cmGlobalVisualStudio8Generator::GetUserMacrosDirectory()
{
&nbsp;// Some VS8 sp0 versions cannot run macros.
&nbsp;// See <a class="moz-txt-link-freetext" href="http://support.microsoft.com/kb/928209">http://support.microsoft.com/kb/928209</a>
&nbsp;const char* vc8sp1Registry =
&nbsp; &nbsp;"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\"
&nbsp; &nbsp;"InstalledProducts\\KB926601;";
&nbsp;const char* vc8exSP1Registry =
&nbsp; &nbsp;"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\"
&nbsp; &nbsp;"InstalledProducts\\KB926748;";
&nbsp;std::string vc8sp1;
&nbsp;if (!cmSystemTools::ReadRegistryValue(vc8sp1Registry, vc8sp1) &amp;&amp;
&nbsp; &nbsp; &nbsp;!cmSystemTools::ReadRegistryValue(vc8exSP1Registry, vc8sp1))
&nbsp; &nbsp;{
&nbsp; &nbsp;return "";
&nbsp; &nbsp;}


Since you mention you have SP1 installed, (KB926601), we skip copying
the macros files for your installation since we know they will not
work. We also will not even try to call the macro, even if you copy it
into place by hand. See the Microsoft URL in the source code comment
for more details...

If you want to try to use this functionality anyway, you'll have to
modify CMake's code to avoid the return statement in the above code.


HTH,
David


On Tue, Jan 24, 2012 at 5:10 AM, Tom Deblauwe <a class="moz-txt-link-rfc2396E" href="mailto:tom.deblauwe@traficon.com">&lt;tom.deblauwe@traficon.com&gt;</a> wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">Hello,

I'm running a Windows 7 64 bit OS, and I'm using visual studio 2005 with
service pack 1. Below is the list of versions. Now my question is: how can I
manually check that all macro stuff works and is configured correctly? In
other words: how can I install the macro's manually? They are definitely not
showing up automaticaly in the "macro explorer". Also, when is the time that
CMake installs those macros in visual studio? Is it when the project files
are generated or at install time of cmake itself? How are the macros then
eventually run, what triggers them?

Best regards,
Tom,

Microsoft Visual Studio 2005
Version 8.0.50727.867&nbsp; (vsvista.050727-8600)
Microsoft .NET Framework
Version 2.0.50727 SP2
Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack 1
(KB926601)
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU
(KB2251481)
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU
(KB2465367)
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU
(KB2538218)
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU
(KB2548826)
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU
(KB937061)
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU
(KB971023)
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU
(KB971090)
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU
(KB973673)
Update for Microsoft Visual Studio 2005 Professional Edition - ENU
(KB932232)

--
Tom Deblauwe
R&amp;D Engineer

Traficon International N.V.
Vlamingstraat 19
B-8560 Wevelgem
Belgium
Tel.: +32 (0)56 37.22.00
Fax: +32 (0)56 37.21.96
URL: <a class="moz-txt-link-abbreviated" href="http://www.traficon.com">www.traficon.com</a>

--

Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>

Visit other Kitware open-source projects at
<a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the CMake FAQ at:
<a class="moz-txt-link-freetext" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a>
</pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      <b>Tom Deblauwe</b><br>
      <b>R&amp;D Engineer</b><br>
      <br>
      Traficon International N.V.<br>
      Vlamingstraat 19<br>
      B-8560 Wevelgem<br>
      Belgium<br>
      Tel.: +32 (0)56 37.22.00<br>
      Fax: +32 (0)56 37.21.96<br>
      URL: <a href="http://www.traficon.com">www.traficon.com</a><br>
    </div>
  </body>
</html>