| 1 | @echo off |
|---|
| 2 | setlocal |
|---|
| 3 | pushd . |
|---|
| 4 | |
|---|
| 5 | rem ************************************************************************** |
|---|
| 6 | rem *** This script is configured for use with Visual Studio 2010 Pro. *** |
|---|
| 7 | rem *** Adjust the paths below so that the makefile can find *** |
|---|
| 8 | rem *** mt.exe and lib.exe. *** |
|---|
| 9 | rem ************************************************************************** |
|---|
| 10 | set MOZBUILD_PATH=c:\devel\mozilla-build\ |
|---|
| 11 | set VS_PATH=%VS100COMNTOOLS%..\.. |
|---|
| 12 | set WINSDK_PATH=%PROGRAMFILES(X86)%\Microsoft SDKs\Windows\v7.0A |
|---|
| 13 | |
|---|
| 14 | rem *** Make sure we have the prerequisites *** |
|---|
| 15 | if not exist "%MOZBUILD_PATH%" goto noprereqs |
|---|
| 16 | if not exist "%VS_PATH%" goto noprereqs |
|---|
| 17 | if not exist "%WINSDK_PATH%" goto noprereqs |
|---|
| 18 | if not "%BUILD_ALT_DIR%" == "fre_wxp_x86" goto noprereqs |
|---|
| 19 | |
|---|
| 20 | rem *** Configure the build environment *** |
|---|
| 21 | set INCLUDE=%SDK_INC_PATH%;%CRT_INC_PATH% |
|---|
| 22 | set LIB=%SDK_LIB_DEST%\i386;%SDK_LIB_DEST%\..\crt\i386 |
|---|
| 23 | set PATH= |
|---|
| 24 | set PATH=%PATH%;%MOZBUILD_PATH%\msys\bin;%MOZBUILD_PATH%\moztools\bin |
|---|
| 25 | set PATH=%PATH%;%BASEDIR%\bin\x86;%BASEDIR%\bin\x86\x86 |
|---|
| 26 | set PATH=%PATH%;%WINSDK_PATH%\Bin |
|---|
| 27 | set PATH=%PATH%;%VS_PATH%\VC\bin;%VS_PATH%\Common7\IDE |
|---|
| 28 | set PATH=%PATH%;%SystemRoot%\system32;%SystemRoot% |
|---|
| 29 | |
|---|
| 30 | rem *** Perform the actual build *** |
|---|
| 31 | if "%BUILD_OPT%" == "" set BUILD_OPT=1 |
|---|
| 32 | if "%BUILD_OPT%" == "0" set BUILD_OPT= |
|---|
| 33 | if "%USE_DEBUG_RTL%" == "0" set USE_DEBUG_RTL= |
|---|
| 34 | if "%NSS_DISABLE_DBM%" == "" set NSS_DISABLE_DBM=1 |
|---|
| 35 | if "%NSS_DISABLE_DBM%" == "0" set NSS_DISABLE_DBM= |
|---|
| 36 | if "%NSS_ENABLE_ECC%" == "" set NSS_ENABLE_ECC=1 |
|---|
| 37 | if "%NSS_ENABLE_ECC%" == "0" set NSS_ENABLE_ECC= |
|---|
| 38 | set USE_64= |
|---|
| 39 | set WINDDK_BUILD=1 |
|---|
| 40 | cd %~dp0\mozilla\security\nss |
|---|
| 41 | make nss_clean_all |
|---|
| 42 | if errorlevel 1 goto error |
|---|
| 43 | make nss_build_all |
|---|
| 44 | if errorlevel 1 goto error |
|---|
| 45 | |
|---|
| 46 | rem *** Clean up and exit *** |
|---|
| 47 | goto end |
|---|
| 48 | :error |
|---|
| 49 | echo *** |
|---|
| 50 | echo *** Build failed |
|---|
| 51 | echo *** |
|---|
| 52 | goto end |
|---|
| 53 | :noprereqs |
|---|
| 54 | echo *** |
|---|
| 55 | echo *** A required prerequisite was not available. Make sure that: |
|---|
| 56 | echo *** |
|---|
| 57 | echo *** * This is a Windows XP x86 Free Build Environment window |
|---|
| 58 | echo *** * build-x86.bat contains your MozillaBuild, Visual C++, and |
|---|
| 59 | echo *** Windows SDK directory locations |
|---|
| 60 | echo *** |
|---|
| 61 | :end |
|---|
| 62 | popd |
|---|
| 63 | endlocal |
|---|