VC8 Build Instructions
From MDC
Contents |
[edit] Microsoft Visual C++ 8 Build Instructions
[edit] Visual C++ 8 Express
1. Download and install Visual C++ 8 Express.
- If possible, accept the default installation paths --- this will make life easier for you.
2. Install the Platform SDK
- The needed components are Core and Web Workshop
- Again, if possible, accept the default installation paths.
3. You will need to build with the following options and/or configure settings:
- --disable-activex, --disable-activex-scripting, --disable-xpconnect-idispatch: until bug 324162 is fixed.
- --disable-accessibility: the version of ATL that comes with the platform sdk doesn't seem to be happy with our builds. I think there's a bug open on this.
- (maybe) --disable-tests: there may be a problem with mfcembed
- --disable-crypto: If you're building source checked out before 7th April 2006 (when bug 324448 was fixed), or else you will need to obtain MASM (ml.exe) from here.
[edit] Visual Studio 2005
1. Install Visual Studio 2005
- You only need the Visual C/C++ portion; you do not need to install J# etc.
- If possible, accept the default installation paths --- this will make life easier for you.
[edit] Common Steps
1. Install cygwin as described in Windows Build Prerequisites
2. Pick a path to place the extra mozilla tools under (I use C:\proj; the script below assumes this location).
3. Install moztools as described in Windows Build Prerequisites; the script below assumes C:\proj\moztools
4. Set up your environment variables using vsvars32.bat, or using the following script for building within a cygwin shell:
export MOZ_TOOLS="/cygdrive/c/proj/moztools" export VSINSTALLDIR='C:\Program Files\Microsoft Visual Studio 8' export VS80COMNTOOLS='C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\' export VCINSTALLDIR='C:\Program Files\Microsoft Visual Studio 8\VC' export FrameworkDir='C:\WINDOWS\Microsoft.NET\Framework' export FrameworkVersion='v2.0.50727' export FrameworkSDKDir='C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0' export VSINSTALLDIR_cyg="/cygdrive/c/Program Files/Microsoft Visual Studio 8" export VCINSTALLDIR_cyg="/cygdrive/c/Program Files/Microsoft Visual Studio 8/VC" export DevEnvDir="$VSINSTALLDIR\\Common7\\IDE" export DevEnvDir_cyg="$VSINSTALLDIR_cyg/Common7/IDE" export MSVCDir="$VCINSTALLDIR" export MSVCDIR_cyg="$VCINSTALLDIR_cyg" if [ -d "$MSVCDIR_cyg"/PlatformSDK ] ; then PlatformSDKDir="$MSVCDir"\\PlatformSDK PlatformSDKDir_cyg="$MSVCDir_cyg"/PlatformSDK elif [ -d "/cygdrive/c/Program Files/Microsoft Platform SDK" ] ; then PlatformSDKDir='C:\Program Files\Microsoft Platform SDK' PlatformSDKDir_cyg='/cygdrive/c/Program Files/Microsoft Platform SDK' else echo Can\'t find Platform SDK\! exit fi echo Platform SDK Location: $PlatformSDKDir_cyg if [ ! -f "$MOZ_TOOLS"/lib/libIDL-0.6_s.lib ] ; then echo Can\'t find moztools\! Edit this file and check MOZ_TOOLS path. fi echo moztools Location: $MOZ_TOOLS export PATH="\ $DevEnvDir_cyg:\ $PlatformSDKDir_cyg/bin:\ $MSVCDIR_cyg/bin:\ $VSINSTALLDIR_cyg/Common7/Tools:\ $VSINSTALLDIR_cyg/Common7/Tools/bin:\ $MOZ_TOOLS/bin:\ $PATH" export INCLUDE="\ $MSVCDir\ATLMFC\INCLUDE;\ $MSVCDir\INCLUDE;\ $PlatformSDKDir\include;\ $FrameworkSDKDir\include;\ $INCLUDE" export LIB="\ $MSVCDir\ATLMFC\LIB;\ $MSVCDir\LIB;\ $PlatformSDKDir\lib;\ $FrameworkSDKDir\lib;\ $LIB"
5. Follow the usual build instructions as described in Windows Build Prerequisites for obtaining the source and setting up a mozconfig to build. If you are using the Express version of VC8, be aware of potentially needing to use the above options.
6. If you encounter errors during a build that state there is a missing manifest you can resolve this problem by navigating to the folder containing the required manifest (i.e. - $OBJDIR/xpcom/typelib/xpidl/xpidl.exe.manifest) and copying that manifest into the $OBJDIR/dist/bin folder. If you encounter this problem you may have to repeat these steps for any manifest needed and then start the build process again.
[edit] Creating a Redistributable
If you intend to distribute your build to others, you will need to include the VC runtime with your build. To get the mozilla build system to do this automatically you must copy the four files:
- Microsoft.VC80.CRT.manifest
- msvcm80.dll
- msvcp80.dll
- msvcr80.dll
from the directory %VCINSTALLDIR%\redist\x86\Microsoft.VC80.CRT to a directory somewhere else on your system. The important thing is that the path to this directory must not contain any space characters. Now when you build, set the WIN32_REDIST_DIR environment variable to the absolute path of this directory. The path can be in either Windows or Cygwin format, it doesn't matter. Fairly early on in the build process you should find that the four files listed above have been copied (and modified slightly?) to the dist/bin directory of your build.
Manually copying the files to dist/bin may work, but perhaps not, since the manifest needs to be altered I think.
Last updated 9 Mar 2007