Created
October 15, 2011 18:01
-
-
Save anonymous/1289898 to your computer and use it in GitHub Desktop.
Build script for NSS using the Windows Driver Kit (by itsnotabigtruck)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal | |
pushd . | |
rem ************************************************************************** | |
rem *** This script is configured for use with Visual Studio 2010 Pro. *** | |
rem *** Adjust the paths below so that the makefile can find *** | |
rem *** mt.exe and lib.exe. *** | |
rem ************************************************************************** | |
set MOZBUILD_PATH=c:\devel\mozilla-build\ | |
set VS_PATH=%VS100COMNTOOLS%..\.. | |
set WINSDK_PATH=%PROGRAMFILES(X86)%\Microsoft SDKs\Windows\v7.0A | |
rem *** Make sure we have the prerequisites *** | |
if not exist "%MOZBUILD_PATH%" goto noprereqs | |
if not exist "%VS_PATH%" goto noprereqs | |
if not exist "%WINSDK_PATH%" goto noprereqs | |
if not "%BUILD_ALT_DIR%" == "fre_wxp_x86" goto noprereqs | |
rem *** Configure the build environment *** | |
set INCLUDE=%SDK_INC_PATH%;%CRT_INC_PATH% | |
set LIB=%SDK_LIB_DEST%\i386;%SDK_LIB_DEST%\..\crt\i386 | |
set PATH= | |
set PATH=%PATH%;%MOZBUILD_PATH%\msys\bin;%MOZBUILD_PATH%\moztools\bin | |
set PATH=%PATH%;%BASEDIR%\bin\x86;%BASEDIR%\bin\x86\x86 | |
set PATH=%PATH%;%WINSDK_PATH%\Bin | |
set PATH=%PATH%;%VS_PATH%\VC\bin;%VS_PATH%\Common7\IDE | |
set PATH=%PATH%;%SystemRoot%\system32;%SystemRoot% | |
rem *** Perform the actual build *** | |
if "%BUILD_OPT%" == "" set BUILD_OPT=1 | |
if "%BUILD_OPT%" == "0" set BUILD_OPT= | |
if "%USE_DEBUG_RTL%" == "0" set USE_DEBUG_RTL= | |
if "%NSS_DISABLE_DBM%" == "" set NSS_DISABLE_DBM=1 | |
if "%NSS_DISABLE_DBM%" == "0" set NSS_DISABLE_DBM= | |
if "%NSS_ENABLE_ECC%" == "" set NSS_ENABLE_ECC=1 | |
if "%NSS_ENABLE_ECC%" == "0" set NSS_ENABLE_ECC= | |
set USE_64= | |
set WINDDK_BUILD=1 | |
cd %~dp0\mozilla\security\nss | |
make nss_clean_all | |
if errorlevel 1 goto error | |
make nss_build_all | |
if errorlevel 1 goto error | |
rem *** Clean up and exit *** | |
goto end | |
:error | |
echo *** | |
echo *** Build failed | |
echo *** | |
goto end | |
:noprereqs | |
echo *** | |
echo *** A required prerequisite was not available. Make sure that: | |
echo *** | |
echo *** * This is a Windows XP x86 Free Build Environment window | |
echo *** * build-x86.bat contains your MozillaBuild, Visual C++, and | |
echo *** Windows SDK directory locations | |
echo *** | |
:end | |
popd | |
endlocal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment