89 lines
2.5 KiB
Batchfile
89 lines
2.5 KiB
Batchfile
|
@ECHO OFF
|
||
|
:: Perform the pre-steps to build boost and set the boost path for the build file
|
||
|
|
||
|
:: TODO - Shift stuff to get the boost path / check/display usage
|
||
|
|
||
|
SET BOOSTPATH=%1
|
||
|
|
||
|
IF NOT EXIST "%BOOSTPATH%\boost\regex.hpp" (
|
||
|
GOTO BOOSTNOTFOUND
|
||
|
)
|
||
|
|
||
|
IF NOT EXIST "%BOOSTPATH%\bjam\bin\bjam.exe" (
|
||
|
ECHO Building BJAM, the boost build tool
|
||
|
PUSHD %BOOSTPATH%\tools\build\v2
|
||
|
CALL bootstrap.bat
|
||
|
|
||
|
%BOOSTPATH%\tools\build\v2\b2 --prefix=%BOOSTPATH%\bjam install
|
||
|
)
|
||
|
|
||
|
IF NOT ERRORLEVEL 0 (
|
||
|
GOTO BUILDERROR
|
||
|
)
|
||
|
|
||
|
ECHO.
|
||
|
ECHO Building Boost::regex
|
||
|
|
||
|
CD %BOOSTPATH%\libs\regex\build
|
||
|
|
||
|
%BOOSTPATH%\bjam\bin\bjam variant=release threading=multi link=static runtime-link=static
|
||
|
IF NOT ERRORLEVEL 0 (
|
||
|
GOTO BUILDERROR
|
||
|
)
|
||
|
|
||
|
%BOOSTPATH%\bjam\bin\bjam variant=debug threading=multi link=static runtime-link=static
|
||
|
IF NOT ERRORLEVEL 0 (
|
||
|
GOTO BUILDERROR
|
||
|
)
|
||
|
|
||
|
IF EXIST "%BOOSTPATH%\bin.v2\libs\regex\build\msvc-8.0" (
|
||
|
SET BOOSTVSVERPATH=%BOOSTPATH%\bin.v2\libs\regex\build\msvc-8.0
|
||
|
) ELSE IF EXIST "%BOOSTPATH%\bin.v2\libs\regex\build\msvc-9.0" (
|
||
|
SET BOOSTVSVERPATH=%BOOSTPATH%\bin.v2\libs\regex\build\msvc-9.0
|
||
|
) ELSE IF EXIST "%BOOSTPATH%\bin.v2\libs\regex\build\msvc-10.0" (
|
||
|
SET BOOSTVSVERPATH=%BOOSTPATH%\bin.v2\libs\regex\build\msvc-10.0
|
||
|
)
|
||
|
|
||
|
ECHO # Autogenerated file, run BuildBoost.bat [path_to_boost] to generate > %~dp0%\boostpath.mak
|
||
|
ECHO BOOSTPATH=%BOOSTPATH% >> %~dp0%\boostpath.mak
|
||
|
ECHO BOOSTVSVERPATH=%BOOSTVSVERPATH% >> %~dp0%\boostpath.mak
|
||
|
|
||
|
POPD
|
||
|
|
||
|
ECHO Boost::regex built.
|
||
|
ECHO.
|
||
|
ECHO Now you need to build scintilla.
|
||
|
ECHO First, edit the scintilla\win32\scintilla.mak, and make sure there's a line in there that says
|
||
|
ECHO.
|
||
|
ECHO !INCLUDE ../boostregex/nppSpecifics.mak
|
||
|
ECHO.
|
||
|
ECHO just after all the LOBJS have been defined (it's around line 211)
|
||
|
ECHO If not, add it in.
|
||
|
ECHO Then, from the scintilla\win32 directory
|
||
|
ECHO.
|
||
|
ECHO nmake -f scintilla.mak
|
||
|
ECHO.
|
||
|
ECHO.
|
||
|
|
||
|
GOTO EOF
|
||
|
|
||
|
:BOOSTNOTFOUND
|
||
|
ECHO Boost Path not valid. Run BuildBoost.bat with the directory where you unpacked your boost zip
|
||
|
ECHO Boost is available free from www.boost.org
|
||
|
ECHO.
|
||
|
ECHO e.g.
|
||
|
ECHO buildboost.bat d:\libs\boost_1_48_0
|
||
|
|
||
|
GOTO EOF
|
||
|
|
||
|
|
||
|
:BUILDERROR
|
||
|
ECHO There was an error building boost. Please see the messages above for details.
|
||
|
ECHO - Have you got a clean extract from a recent boost version, such as 1.48?
|
||
|
ECHO - Download a fresh copy from www.boost.org and extract it to a directory,
|
||
|
ECHO and run the batch again with the name of that directory
|
||
|
|
||
|
:EOF
|
||
|
|
||
|
|