Difference between revisions of "User:Robin Cornelius/viewer-development VC2005 Express"

From Second Life Wiki
Jump to navigation Jump to search
Line 1: Line 1:
Visual C++ 2005 Express lacks a few features that LL rely on to sucessfully compile and package the viewer, but they are fairly easy to work around.
Visual C++ 2005 Express lacks a few features that LL rely on to sucessfully compile and package the viewer, but they are fairly easy to work around. Currently requires all fixes commited to http://bitbucket.org/robincornelius/viewer-development-vwr-20879


==Update express to Service Pack 1 ATL Security Update==
==Update express to Service Pack 1 ATL Security Update==
Line 42: Line 42:
Due to differences in the registry entrys between express and full editions, it is not possible to get the location of the CRT dlls directly from the registry entries for Visual C++ (also with express no licence is given to reistribute the runtimes). The correct redistrbutal package can be obtained from http://www.microsoft.com/downloads/details.aspx?familyid=766a6af7-ec73-40ff-b072-9112bab119c2&displaylang=en , after obtaining this setup.exe, openit using 7 Zip, WinRaR or some other program capable of opening this kind of compressed self extracting archive.
Due to differences in the registry entrys between express and full editions, it is not possible to get the location of the CRT dlls directly from the registry entries for Visual C++ (also with express no licence is given to reistribute the runtimes). The correct redistrbutal package can be obtained from http://www.microsoft.com/downloads/details.aspx?familyid=766a6af7-ec73-40ff-b072-9112bab119c2&displaylang=en , after obtaining this setup.exe, openit using 7 Zip, WinRaR or some other program capable of opening this kind of compressed self extracting archive.


Work in progres.....
now when invoking cmake pass the flag "-DMSVC_REDIST_PATH:PATH=c:\code\vcredist_vc80_4053_x86" where in this case my redistributables are in c:\code\vcredist_vc80_4053_x86
 
There is one cavaet the manifest file needs renaming from the MS download, the original is
 
x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989.manifest
 
it needs to be
 
Microsoft.VC80.CRT.manifest

Revision as of 13:43, 23 August 2010

Visual C++ 2005 Express lacks a few features that LL rely on to sucessfully compile and package the viewer, but they are fairly easy to work around. Currently requires all fixes commited to http://bitbucket.org/robincornelius/viewer-development-vwr-20879

Update express to Service Pack 1 ATL Security Update

It is important that you have the 4053 version of the VC80 CRT installed, for Express editions this means installing http://www.microsoft.com/downloads/details.aspx?FamilyID=7c8729dc-06a2-4538-a90d-ff9464dc0197&displaylang=en

Compile against the correct VC80 4053 CRT

The previous patch does not appear to correctly update the default CRT that programs built with 2005 Express link against, to correct this behaviour edit C:\Program Files\Microsoft Visual Studio 8\VC\include\crtassem.h and change

#ifndef _CRT_ASSEMBLY_VERSION
#if defined _USE_RTM_VERSION
#define _CRT_ASSEMBLY_VERSION "8.0.50608.0"
#else
#define _CRT_ASSEMBLY_VERSION "8.0.50727.762"
#endif
#endif

to

#ifndef _CRT_ASSEMBLY_VERSION
#if defined _USE_RTM_VERSION
#define _CRT_ASSEMBLY_VERSION "8.0.50608.0"
#else
#define _CRT_ASSEMBLY_VERSION "8.0.50727.4053"
#endif
#endif

winres.h

This file is not present with Visual Studio 2005 express due to it mainly being an MFC header (MFC is not included with express), the actual requirments of this file are very low, it basicly needs to include windows.h and define IDC_STATIC. Edit.. It is found on some SDK installs as part of the examples, but regardless just creating it as follows solves issues.

Recommended work around is to create your own winres.h, in the Visual Studio system include location, so you always have it for all builds.

on a 32bit system - C:\Program Files\Microsoft Visual Studio 8\VC\include\winres.h on a 64bit system - C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\winres.g

#ifndef _WINRES_H
#define _WINRES_H

#include "windows.h"
#ifndef IDC_STATIC
#define IDC_STATIC 1000
#endif

#endif

Stage the CRT dlls

Due to differences in the registry entrys between express and full editions, it is not possible to get the location of the CRT dlls directly from the registry entries for Visual C++ (also with express no licence is given to reistribute the runtimes). The correct redistrbutal package can be obtained from http://www.microsoft.com/downloads/details.aspx?familyid=766a6af7-ec73-40ff-b072-9112bab119c2&displaylang=en , after obtaining this setup.exe, openit using 7 Zip, WinRaR or some other program capable of opening this kind of compressed self extracting archive.

now when invoking cmake pass the flag "-DMSVC_REDIST_PATH:PATH=c:\code\vcredist_vc80_4053_x86" where in this case my redistributables are in c:\code\vcredist_vc80_4053_x86

There is one cavaet the manifest file needs renaming from the MS download, the original is

x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989.manifest

it needs to be

Microsoft.VC80.CRT.manifest