Uploaded image for project: 'Open Development'
  1. Open Development
  2. OPEN-26

Problems with develop.py and vstool when trying to setup new development environment with Visual Studio 2010



    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: viewer build
    • Labels:
    • Environment:
      Windows 7 Ultimate x64 Intel i7 740M
      Visual Studio 2010 Ultimate RC


      Based on the instructions at the following URL:

      I encountered 2 problems trying to setup a development environment to code the Second Life viewer with Visual Studio 2010 Ultimate. This bug post highlights the problems and also the fixes I came up with. These problems might not affect Visual Studio 2010 Express users but it may also affect Visual Studio 2010 Professional users (I haven't tested).

      1) Running develop.py which runs cmake

      1.1) There is no argument for "VC100" to support VS2010 so running running "develop.py -G VC100" will not work without a few tweaks to develop.py listed below.

      First up, I originally tried running "develop.py -G VC90" and I got the following error:

      Running 'cmake -G "Visual Studio 9 2008" -DSTANDALONE:BOOL=OFF -DUNATTENDED:BOOL=OFF -DWORD_SIZE:STRING=32 -DROOT_PROJECT_NAME:STRING=SecondLife "" "E:\\dev\\vsprojects\\SecondLife\\viewer-development-forVS2010\\indra"' in 'build-VC90'
      develop.py tries to run: cmake -G "Visual Studio 9 2008" -DSTANDALONE:BOOL=OFF -DUNATTENDED:BOOL=OFF -DWORD_SIZE:STRING=32 -DROOT_PROJECT_NAME:STRING=SecondLife "" "E:\dev\vsprojects\SecondLife\viewer-development-forVS2010\indra"
      CMake Error: CMake was unable to find a build program corresponding to "Visual Studio 9 2008".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
      CMake Error: Could not find cmake module file:E:/dev/vsprojects/SecondLife/viewer-development-forVS2010/indra/build-VC90/CMakeFiles/CMakeCCompiler.cmake
      CMake Error: Could not find cmake module file:E:/dev/vsprojects/SecondLife/viewer-development-forVS2010/indra/build-VC90/CMakeFiles/CMakeCXXCompiler.cmake
      -- Configuring incomplete, errors occurred!
      got ret 1 from cmake -G "Visual Studio 9 2008" -DSTANDALONE:BOOL=OFF -DUNATTENDED:BOOL=OFF -DWORD_SIZE:STRING=32 -DROOT_PROJECT_NAME:STRING=SecondLife "" "E:\dev\vsprojects\SecondLife\viewer-development-forVS2010\indra"
      Cleaning 'build-VC90'
      Error: the command 'cmake' exited with status 1

      FIX: (add VS2010 support to develop.py)
      1.2.1) After line 479 add:

              'vc100' : {
                  'gen' : r'Visual Studio 10',
                  'ver' : r'10.0'

      1.2.2) After line 484 add:

          gens['vs2010'] = gens['vc100']

      1.2.3) Change line 496 from:

                  for version in 'vc80 vc90 vc71'.split():


                  for version in 'vc80 vc100 vc90 vc71'.split():

      1.1.4) Do the same 1.1.3 fix to line 503.

      2) Running develop.py which runs vstool

      2.1) Once cmake runs successfully, develop.py moves on to running vstool which converts the SecondLife.sln solution file in the VS project. However, vstool also does not have support for VS2010.

      After running "develop.py -G VC100" I got the following error:

      Writing state to E:\dev\vsprojects\SecondLife\viewer-development-forVS2010\installed.xml
      -- Version of viewer is
      -- Configuring done
      -- Generating done
      -- Build files have been written to: E:/dev/vsprojects/SecondLife/viewer-development-forVS2010/indra/build-VC100
      got ret 0 from cmake -G "Visual Studio 10" -DSTANDALONE:BOOL=OFF -DUNATTENDED:BOOL=OFF -DWORD_SIZE:STRING=32 -DROOT_PROJECT_NAME:STRING=SecondLife "" "E:\dev\vsprojects\SecondLife\viewer-development-forVS2010\indra"
      Running 'tools\\vstool\\VSTool.exe --solution build-VC100\\SecondLife.sln --config RelWithDebInfo --startup secondlife-bin' in 'E:\\dev\\vsprojects\\SecondLife\\viewer-development-forVS2010\\indra'
      develop.py tries to run: tools\vstool\VSTool.exe --solution build-VC100\SecondLife.sln --config RelWithDebInfo --startup secondlife-bin
      Editing solution: build-VC100\SecondLife.sln
      Looking for existing VisualStudio instance...
        Didn't find open solution, starting new background VisualStudio instance...
        Reading .sln file version...
      Unknown .sln version: 11.00
      Quitting do to error opening: E:\dev\vsprojects\SecondLife\viewer-development-forVS2010\indra\build-VC100\SecondLife.sln
      got ret 0 from tools\vstool\VSTool.exe --solution build-VC100\SecondLife.sln --config RelWithDebInfo --startup secondlife-bin

      FIX: (add VS2010 support)
      2.2) In the \indra\tools\vstool\ folder you will find a VS project for vstool (when I first opened it in VS2010 I had to let VS convert it for me to a 2010 project...)

      2.2.1) in main.cs after line 552 add:

                          // VS2010 support
                          case "11.00":
                              version = "VC100";

      2.2.2) in main.cs after line 587 add:

                      // VS2010 support
                      case "VC100":
                          progid = "VisualStudio.DTE.10.0";

      2.2.3) Then rebuild vstool.exe and re-run develop.py against a cleanly checked out viewer-development source folder.

      The modified develop.py and vstool projects (converted to VS2010) are attached to this ticket.




            gnobbolixieus.zehetbauer Gnobbolixieus Zehetbauer
            gnobbolixieus.zehetbauer Gnobbolixieus Zehetbauer
            Extended Group Visibility:
            1 Start watching this issue