Difference between revisions of "Converting project files for MSVS2005"

From Second Life Wiki
Jump to navigation Jump to search
(→‎Global steps: Adjusted to look more like an instraction)
m (some minor clarifications)
Line 36: Line 36:
#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.)   
#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.)   
# Right click on the selection and choose Properties.
# Right click on the selection and choose Properties.
# In the tree single click (select) '''Configuration Properties'''
# A window named Property Pages opens.  There single left-click (select) '''Configuration Properties''' in the tree on the left of the window.
# In the upper left corner choose '''All Configurations''' from the drop down box
# In the upper left corner of Property Pages choose '''All Configurations''' from the Configuration drop down box.
# 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)
# Now, in the tree select '''Configuration Properties > General''' and change '''Inherited Project Property Sheets''' and set it to '''$(SolutionDir)\SL-UpgradeFromVC71_vc8.vsprops'''.
# Under the Configuration Properties > C/C++ > General, change '''Treat Warnings As Errors''' to "'''No'''".  ([[:Image:MSVS2005_Project_Property_Pages_Config_CPP_General.JPG|'''screen shot''']])
# Under the '''Configuration Properties > C/C++ > General''', change '''Treat Warnings As Errors''' to "'''No'''".  ([[:Image:MSVS2005_Project_Property_Pages_Config_CPP_General.JPG|'''screen shot''']]).
# Under the Configuration Properties > C/C++ > Language, change (if necessary) '''Treat wchar_t as Build-in Type''' to "'''No (/Zc:wchar_t-)'''" ([[:Image:MSVS2005 Project Property Pages Config CPP Language.JPG|'''screen shot''']]).
# Under the ''Configuration Properties > C/C++ > Language''', change (if necessary) '''Treat wchar_t as Build-in Type''' to "'''No (/Zc:wchar_t-)'''" ([[:Image:MSVS2005 Project Property Pages Config CPP Language.JPG|'''screen shot''']]).
# Under the Configuration Properties > C/C++ > Advanced, change (if necessary) '''Use Full Paths''' to "'''Yes (/FC)'''" ([[:Image:MSVS2005 Project Property Pages Config CPP Advanced.JPG|'''screen shot''']]).
# Under the '''Configuration Properties > C/C++ > Advanced''', change (if necessary) '''Use Full Paths''' to "'''Yes (/FC)'''" ([[:Image:MSVS2005 Project Property Pages Config CPP Advanced.JPG|'''screen shot''']]).
# Click OK for the dialog
# Click OK for the dialog.
<br />
<br />
<br />



Revision as of 04:52, 10 September 2007

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 the Visual Studio menu bar, choose "File > New > File...". On the "New Fille" dialog box, choose "General", then "Text File". Select the following lines on your browser, copy them, and paste them to the empty file you just created. Save it as a file of the name "SL-UpgradeFromVC71_vc8.vsprops" under the foler "indra_complete" (where the "indra_complete.sln" file resides.)
<?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. A window named Property Pages opens. There single left-click (select) Configuration Properties in the tree on the left of the window.
  4. In the upper left corner of Property Pages choose All Configurations from the Configuration drop down box.
  5. Now, in the tree select Configuration Properties > General and change Inherited Project Property Sheets and set it to $(SolutionDir)\SL-UpgradeFromVC71_vc8.vsprops.
  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. Under the Configuration Properties > C/C++ > Advanced, change (if necessary) Use Full Paths to "Yes (/FC)" (screen shot).
  9. 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 the Debug configuration, also add libcmt.lib; to the list of specific libraries to ignore.
  • 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...