3264a77ead
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@864 f5eea248-9336-0410-98b8-ebc06183d4e3
101 lines
3.0 KiB
Batchfile
101 lines
3.0 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
|
|
POPD
|
|
)
|
|
|
|
IF NOT ERRORLEVEL 0 (
|
|
GOTO BUILDERROR
|
|
)
|
|
|
|
ECHO.
|
|
ECHO Building Boost::regex
|
|
|
|
PUSHD %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
|
|
)
|
|
|
|
:: VS2010
|
|
IF EXIST %BOOSTPATH%\bin.v2\libs\regex\build\msvc-10.0\release\link-static\runtime-link-static\threading-multi\libboost_regex-vc100-mt-s-1_48.lib (
|
|
SET BOOSTLIBPATH=%BOOSTPATH%\bin.v2\libs\regex\build\msvc-10.0
|
|
)
|
|
|
|
:: VS2008
|
|
IF EXIST %BOOSTPATH%\bin.v2\libs\regex\build\msvc-9.0\release\link-static\runtime-link-static\threading-multi\libboost_regex-vc90-mt-s-1_48.lib (
|
|
SET BOOSTLIBPATH=%BOOSTPATH%\bin.v2\libs\regex\build\msvc-9.0
|
|
)
|
|
|
|
:: VS2005
|
|
IF EXIST %BOOSTPATH%\bin.v2\libs\regex\build\msvc-8.0\release\link-static\runtime-link-static\threading-multi\libboost_regex-vc80-mt-s-1_48.lib (
|
|
SET BOOSTLIBPATH=%BOOSTPATH%\bin.v2\libs\regex\build\msvc-8.0
|
|
)
|
|
|
|
:: Error case, so we try to give the user a helpful error message
|
|
IF [%BOOSTLIBPATH%] == [] (
|
|
SET BOOSTLIBPATH=no_boost_library_found__Set_BoostLibPath_in_BoostPath.mak__Should_be_under_%BOOSTPATH%\bin.v2\libs\regex\build\_something_
|
|
)
|
|
|
|
ECHO # Autogenerated file, run BuildBoost.bat [path_to_boost] to generate > %~dp0%\boostpath.mak
|
|
ECHO BOOSTPATH=%BOOSTPATH% >> %~dp0%\boostpath.mak
|
|
ECHO BOOSTLIBPATH=%BOOSTLIBPATH% >> %~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
|
|
|
|
|