Converting project files for MSVS2005

From Second Life Wiki
Jump to navigation Jump to search


Manual conversion of the VS2003 solution/projects

This page describes the steps necessary to fully convert Linden Labs solution and project files from VS2003 to VS2005.

There are canned sets of these available on the JIRA bug tracker issue VWR-1151, so downloading these may save you the work described below.


Global steps

  • Start Visual Studio 2005 (or VC++ Express).
  • Use "File > Open > Project/Solution" to open the linden\indra\indra_complete\indra_complete.sln
  • Visual Studio prompts to update your project files. Allow it to do so. When the results are displayed, you may see warnings, but you should not see any errors.
  • Right click newview in the frame Solution Explorer and click "Set as StartUp Project".
  • From your Visual Studio directory (Microsoft Visual Studio 8\VC\VCProjectDefaults) copy UpgradeFromVC71.vsprops to your SL build directories. For convenience I suggest you name it SL-UpgradeFromVC71.vsprops and put it into the indra_complete folder (where the indra_complete.sln file resides).
    • Edit SL-UpgradeFromVC71_vc8.vsprops with a text editor. For the 2 lines containing PreprocessorDefinitions add ;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;_SECURE_SCL=0
    • Under the first Preprocessor definitions (in the "VCCLCompilerTool" section) add a line with: TreatWChar_tAsBuiltInType="false"
    • Here is what the file will look like after the edit:
<?xml version="1.0"?>
<VisualStudioPropertySheet
   ProjectType="Visual C++"
   Version="8.00"
   Name="Upgrade From VC 7.1">
   <Tool
       Name="VCCLCompilerTool"
       PreprocessorDefinitions="_VC80_UPGRADE=0x0710;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;_SECURE_SCL=0"
       TreatWChar_tAsBuiltInType="false"
   />
   <Tool
       Name="VCResourceCompilerTool"
       PreprocessorDefinitions="_VC80_UPGRADE=0x0710;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;_SECURE_SCL=0"
   />
</VisualStudioPropertySheet>



All Configuration Steps

  1. Select all projects, i.e., llaudio, llcharacter, ..., win_updater, except for lscript_compile_fb and test. (You can do it by control-clicking on the projects.)
  2. Right click on the selection and choose Properties.
  3. In the tree single click (select) Configuration Properties
  4. In the upper left corner choose All Configurations from the drop down box
  5. Under the Configuration Properties > General change Inherited Project Property Sheets and enter the full pathname for your SL-UpgradeFromVC71_vc8.vsprops (if you put it in the indra_complete folder you can use $(SolutionDir)\SL-UpgradeFromVC71_vc8.vsprops instead of the full path)
  6. Under the Configuration Properties > C/C++ > General, change Treat Warnings As Errors to "No". (screen shot)
  7. Under the Configuration Properties > C/C++ > Language, change (if necessary) Treat wchar_t as Build-in Type to "No (/Zc:wchar_t-)" (screen shot).
  8. Click OK for the dialog



Per Configuration Steps

  • Pick ReleaseNoOpt in the Solution Configurations drop-down box beside the green arrow under the tool bar, and do the followings on the Solution Explorer frame (on left side of the VS2005 window):
    1. Click newview to select it alone.
      • Right-click newview, choose Properties.
      • Under Configuration Properties > Linker > Input, click Additional Dependencies on the right to show a button labeled "..." on it at the very right on the line, then click the ... button.
      • Scroll down the list to find libboost_regex-vc71-mt-s.lib. Rewrite it to libboost_regex-vc80-mt-s.lib.
      • Scroll down again to find llmozlib.lib and rewrite it to llmozlib-vc80.lib.
      • Click OK to close the "Additional Dependencies" dialog, then click OK again to close the "newview Property Pages" dialog box.
  • Pick ReleaseForDownload in the Solution Configurations drop-down box. Do the same thing (as 1 to 7 above) again. Depending on what you want to do later (or if you want to do a full and complete conversion, you will also need to do it for Debug and Release).


Optional steps

The following steps are not strictly necessary, unless you want a full and ultra clean conversion (e.g. for sharing with others). These instructions are telegram style, assuming you will do this only after you have aquainted yourselves with the project

  • In the Configuration manager:
    • unclick test, win_crash_logger and win_updater for all configurations except ReleaseForDownload.
    • unclick test for ReleaseForDownload
  • For all configurations: In newview, properties, linker input: If you find libraries starting with 'll' (e.g. llaudio.lib, llcharacter.lib, etc.) or find the library lscript_library.lib), remove them from the list (these libraries are linked through the dependancy)
  • For all configurations: In newview, properties, linker input: Set Ignore Specific Library to msvcrt.lib;msvcrtd.lib;libc.lib;libcd.lib;
  • In the Debug configuration, under lscript_compile_fb, indra.y, properties, custom build step, general, command line, make sure you have C:\cygwin\bin\mv.exe ytab.hpp ytab.h (use the command line from the release configuration as reference).
  • In all configurations: the libraries need to be changed from vc71 to vc80 (boost, llmozlib) for the test project as well, but since test does not seem to work under VC2005 so far, it's optional.


Done :-)

Congratulations! You've converted solution file and project files.

NOTE: You need to do this by hand everytime a new viewer version is released...