Converting project files for MSVS2005
Revision as of 20:06, 30 June 2008 by Alissa Sabre (talk | contribs) (Added to Category:Compiling viewer.)
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 File" dialog box, choose "General", then "Text File". Select the lines from the box below in 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 folder linden/indra/indra_complete (where the "indra_complete.sln" file resides.)
- Alternately download the file from here (right click link, Save As, go to the linden/indra/indra_complete folder)
<?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" WarnAsError="false" 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
- 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.
- 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 of Property Pages choose All Configurations from the Configuration drop down box.
- Now, in the tree select Configuration Properties > General and change Inherited Project Property Sheets and set it to $(SolutionDir)\SL-UpgradeFromVC71_vc8.vsprops. (Write this literally, as opposed to replacing "$(SolutionDir)" with some real path.)
- press enter or click anywhere outside the Inherited Project Property Sheets field to commit the changes to the field.
- Click Apply button of the dialog. Make sure that the Inherited Project Property Sheets field keeps your entry (the Apply button will clear the field if the file is wrong or if it was not found).
- Under the Configuration Properties > C/C++ > General, make sure Treat Warnings As Errors is set to "No" (this should happen through the above inherited property sheet vsprops file, otherwise do it manually). (screen shot).
- Under the Configuration Properties > C/C++ > Language, make sure Treat wchar_t as Build-in Type is to "No (/Zc:wchar_t-)" (this should happen through the above inherited property sheet (vsprops) file, otherwise do it manually) (screen shot).
- Under the Configuration Properties > C/C++ > Advanced, change (if necessary) Use Full Paths to "Yes (/FC)" (screen shot).
- Click OK for the dialog.
Per Configuration Steps
- Pick ReleaseNoOpt in the Solution Configurations drop-down box next to the green arrow under the tool bar, and do the followings on the Solution Explorer frame (on left side of the VS2005 window):
- Left-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 (for 1.20 and later, do the same (i.e. change 71 into 80) for other libboost libraries, like libboost_signals*.lib, libboost_program_options*lib ... to check, these libraries should be found in linden/libraries/i686-win32/lib_release).
- Scroll down again to find llmozlib.lib and rewrite it to llmozlib-vc80.lib. (This step is not needed on viewer version 1.19.1.0 or later.)
- 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 (in the toolbar, next to the green arrow). Repeat the same steps (as for ReleaseNoOpt above) again.
- Depending on what you want to do later (or if you want to do a full and complete conversion), you may also need to perform these steps for the Debug and Release configurations, but for a start it is safe to skip these.
Special configuration steps for llmedia (1.19.1 or later only)
- Right click on the llmedia project on the solution explorer, then choose Properties.
- Choose Release in the Configuration drop down box on the upper loft of the "llmedia Property pages."
- Choose Configuration Properties > Librarian > General on the tree on the left.
- In Additional Dependencies, there is llmozlib2.lib. Change it to llmozlib2-vc80.lib.
- Click OK to close the dialog box.
- Right click on the llmedia project, and choose Properties again.
- Choose ReleaseNoOpt in the Configuration. Do the same thing as for Release again. Click OK to close the dialog box.
- Right click on the llmedia project, and choose Properties, for the third time.
- Choose Debug in the Configuration. Do the similar thing, too. However, Additional Dependencies for Debug includes llmozlib2d.lib. So, you should change it to llmozlib2d-vc80.lib. Click OK to close the dialog box.
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 (Build menu):
- unclick the build column for test, win_crash_logger and win_updater in all configurations except ReleaseForDownload.
- unclick the build column for test in 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 dependency)
- 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...