2012-02-13 01:45:05 +00:00
|
|
|
@ECHO OFF
|
|
|
|
:: Perform the pre-steps to build boost and set the boost path for the build file
|
2012-04-15 01:50:56 +00:00
|
|
|
SETLOCAL
|
|
|
|
SET BOOSTPATH=
|
|
|
|
SET MSVCTOOLSET=
|
|
|
|
SET TOOLSETCOMMAND=
|
|
|
|
SET BOOSTVERSION=
|
|
|
|
SET WORKPATH=%~dp0%
|
|
|
|
|
2016-06-15 18:52:03 +00:00
|
|
|
SET BUILDTARGETPARAM=
|
|
|
|
SET BUILDTARGETPATH=
|
|
|
|
|
|
|
|
rem :PARAMLOOP
|
2012-04-15 01:50:56 +00:00
|
|
|
IF [%1]==[] (
|
|
|
|
GOTO PARAMCONTINUE
|
|
|
|
)
|
|
|
|
|
|
|
|
IF NOT [%1]==[--toolset] (
|
|
|
|
SET BOOSTPATH=%1
|
|
|
|
)
|
2012-02-13 01:45:05 +00:00
|
|
|
|
2012-04-15 01:50:56 +00:00
|
|
|
IF [%1]==[--toolset] (
|
|
|
|
SET MSVCTOOLSET=%2
|
|
|
|
SHIFT
|
|
|
|
)
|
2012-02-13 01:45:05 +00:00
|
|
|
|
2016-06-15 18:52:03 +00:00
|
|
|
IF [%2]==[-x64] (
|
|
|
|
SET BUILDTARGETPARAM=architecture=ia64
|
|
|
|
SET BUILDTARGETPATH=architecture-ia64\
|
|
|
|
)
|
2012-04-15 01:50:56 +00:00
|
|
|
|
2016-06-15 18:52:03 +00:00
|
|
|
rem SHIFT
|
|
|
|
rem GOTO PARAMLOOP
|
2012-04-15 01:50:56 +00:00
|
|
|
:PARAMCONTINUE
|
|
|
|
|
|
|
|
IF [%BOOSTPATH%]==[] (
|
|
|
|
GOTO USAGE
|
|
|
|
)
|
|
|
|
|
|
|
|
SET TOOLSETCOMMAND=
|
|
|
|
|
|
|
|
IF NOT [%MSVCTOOLSET%]==[] (
|
|
|
|
SET TOOLSETCOMMAND=toolset=%MSVCTOOLSET%
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2012-02-13 01:45:05 +00:00
|
|
|
|
|
|
|
IF NOT EXIST "%BOOSTPATH%\boost\regex.hpp" (
|
2016-06-15 18:52:03 +00:00
|
|
|
ECHO Not found: %BOOSTPATH%\boost\regex.hpp
|
2012-02-13 01:45:05 +00:00
|
|
|
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
|
2012-02-15 01:06:47 +00:00
|
|
|
POPD
|
2012-02-13 01:45:05 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
IF NOT ERRORLEVEL 0 (
|
|
|
|
GOTO BUILDERROR
|
|
|
|
)
|
2012-04-15 01:50:56 +00:00
|
|
|
ECHO.
|
|
|
|
ECHO ***************************************************************
|
|
|
|
ECHO Building tool to check boost version
|
|
|
|
ECHO ***************************************************************
|
|
|
|
ECHO # Temporary version of auto-generated file > %WORKPATH%\boostpath.mak
|
|
|
|
ECHO # If you're seeing this version of the file, and you're not currently building boost, >> %WORKPATH%\boostpath.mak
|
|
|
|
ECHO # then your buildboost.bat is failing somewhere. >> %WORKPATH%\boostpath.mak
|
|
|
|
ECHO # Run BuildBoost.bat [absolute_path_to_boost] to generate this file again >> %WORKPATH%\boostpath.mak
|
|
|
|
ECHO # And lookout for error messages >> %WORKPATH%\boostpath.mak
|
|
|
|
ECHO BOOSTPATH=%BOOSTPATH% >> %WORKPATH%\boostpath.mak
|
|
|
|
|
|
|
|
IF NOT EXIST bin md bin
|
|
|
|
nmake -f getboostver.mak
|
|
|
|
|
|
|
|
IF ERRORLEVEL 1 (
|
|
|
|
ECHO ******************************
|
|
|
|
ECHO ** ERROR building getboostver.exe
|
|
|
|
ECHO ** Please see the error messages above, and post as much as you can to the
|
|
|
|
ECHO ** Notepad++ Open Discussion forum
|
|
|
|
ECHO ** http://sourceforge.net/projects/notepad-plus/forums/forum/331753
|
|
|
|
ECHO.
|
|
|
|
GOTO EOF
|
|
|
|
)
|
|
|
|
|
|
|
|
for /f "delims=" %%i in ('bin\getboostver.exe') do set BOOSTVERSION=%%i
|
|
|
|
|
|
|
|
IF [%BOOSTVERSION%]==[] (
|
|
|
|
ECHO There was an error detecting the boost version.
|
|
|
|
ECHO Please see the error messages above, and post as much as you can to the
|
|
|
|
ECHO Notepad++ Open Discussion forum
|
|
|
|
ECHO http://sourceforge.net/projects/notepad-plus/forums/forum/331753
|
|
|
|
ECHO.
|
|
|
|
GOTO EOF
|
|
|
|
)
|
|
|
|
ECHO.
|
|
|
|
ECHO ***************************************************************
|
|
|
|
ECHO Boost version in use: %BOOSTVERSION%
|
|
|
|
ECHO ***************************************************************
|
|
|
|
ECHO.
|
2012-02-13 01:45:05 +00:00
|
|
|
|
|
|
|
ECHO.
|
2012-04-15 01:50:56 +00:00
|
|
|
ECHO ***************************************************************
|
2012-02-13 01:45:05 +00:00
|
|
|
ECHO Building Boost::regex
|
2012-04-15 01:50:56 +00:00
|
|
|
ECHO ***************************************************************
|
|
|
|
ECHO.
|
2012-02-13 01:45:05 +00:00
|
|
|
|
2012-02-15 01:06:47 +00:00
|
|
|
PUSHD %BOOSTPATH%\libs\regex\build
|
2012-02-13 01:45:05 +00:00
|
|
|
|
2016-06-15 18:52:03 +00:00
|
|
|
%BOOSTPATH%\bjam\bin\bjam %TOOLSETCOMMAND% variant=release threading=multi link=static runtime-link=static %BUILDTARGETPARAM%
|
2012-02-13 01:45:05 +00:00
|
|
|
IF NOT ERRORLEVEL 0 (
|
|
|
|
GOTO BUILDERROR
|
|
|
|
)
|
|
|
|
|
2016-06-15 18:52:03 +00:00
|
|
|
%BOOSTPATH%\bjam\bin\bjam %TOOLSETCOMMAND% variant=debug threading=multi link=static runtime-link=static %BUILDTARGETPARAM%
|
2012-02-13 01:45:05 +00:00
|
|
|
IF NOT ERRORLEVEL 0 (
|
|
|
|
GOTO BUILDERROR
|
|
|
|
)
|
|
|
|
|
2012-04-15 01:50:56 +00:00
|
|
|
IF NOT [%MSVCTOOLSET%]==[] (
|
|
|
|
GOTO TOOLSETKNOWN
|
|
|
|
)
|
|
|
|
|
2014-03-09 19:44:04 +00:00
|
|
|
:: VS2013
|
2016-06-15 18:52:03 +00:00
|
|
|
IF EXIST %BOOSTPATH%\bin.v2\libs\regex\build\msvc-12.0\release\%BUILDTARGETPATH%link-static\runtime-link-static\threading-multi\libboost_regex-vc120-mt-s-%BOOSTVERSION%.lib (
|
2014-03-09 19:44:04 +00:00
|
|
|
SET MSVCTOOLSET=msvc-12.0
|
|
|
|
)
|
|
|
|
|
|
|
|
:: VS2012
|
|
|
|
IF EXIST %BOOSTPATH%\bin.v2\libs\regex\build\msvc-11.0\release\link-static\runtime-link-static\threading-multi\libboost_regex-vc110-mt-s-%BOOSTVERSION%.lib (
|
|
|
|
SET MSVCTOOLSET=msvc-11.0
|
|
|
|
)
|
|
|
|
|
2012-02-15 01:06:47 +00:00
|
|
|
:: VS2010
|
2012-04-15 01:50:56 +00:00
|
|
|
IF EXIST %BOOSTPATH%\bin.v2\libs\regex\build\msvc-10.0\release\link-static\runtime-link-static\threading-multi\libboost_regex-vc100-mt-s-%BOOSTVERSION%.lib (
|
|
|
|
SET MSVCTOOLSET=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-%BOOSTVERSION%.lib (
|
|
|
|
SET MSVCTOOLSET=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-%BOOSTVERSION%.lib (
|
|
|
|
SET MSVCTOOLSET=msvc-8.0
|
|
|
|
)
|
|
|
|
|
|
|
|
IF [%MSVCTOOLSET%]==[] (
|
|
|
|
ECHO No correctly built boost regex libraries could be found.
|
|
|
|
ECHO Try specifying the MSVC version on the command line.
|
|
|
|
GOTO USAGE
|
|
|
|
)
|
|
|
|
ECHO ***********************************************
|
|
|
|
ECHO Assuming toolset in use is %MSVCTOOLSET%
|
|
|
|
ECHO ***********************************************
|
|
|
|
ECHO If this is not correct, specify the version on the command line with --toolset
|
|
|
|
ECHO Run buildboost.bat without parameters to see the usage.
|
|
|
|
|
|
|
|
|
|
|
|
:TOOLSETKNOWN
|
2014-03-09 19:44:04 +00:00
|
|
|
|
|
|
|
:: VS2013
|
|
|
|
IF [%MSVCTOOLSET%]==[msvc-12.0] (
|
|
|
|
SET BOOSTLIBPATH=%BOOSTPATH%\bin.v2\libs\regex\build\msvc-12.0
|
|
|
|
)
|
|
|
|
|
|
|
|
:: VS2012
|
|
|
|
IF [%MSVCTOOLSET%]==[msvc-11.0] (
|
|
|
|
SET BOOSTLIBPATH=%BOOSTPATH%\bin.v2\libs\regex\build\msvc-11.0
|
|
|
|
)
|
2012-04-15 01:50:56 +00:00
|
|
|
|
|
|
|
:: VS2010
|
|
|
|
IF [%MSVCTOOLSET%]==[msvc-10.0] (
|
2012-02-15 01:06:47 +00:00
|
|
|
SET BOOSTLIBPATH=%BOOSTPATH%\bin.v2\libs\regex\build\msvc-10.0
|
|
|
|
)
|
|
|
|
|
|
|
|
:: VS2008
|
2012-04-15 01:50:56 +00:00
|
|
|
IF [%MSVCTOOLSET%]==[msvc-9.0] (
|
2012-02-15 01:06:47 +00:00
|
|
|
SET BOOSTLIBPATH=%BOOSTPATH%\bin.v2\libs\regex\build\msvc-9.0
|
|
|
|
)
|
|
|
|
|
|
|
|
:: VS2005
|
2012-04-15 01:50:56 +00:00
|
|
|
IF [%MSVCTOOLSET%]==[msvc-8.0] (
|
2012-02-15 01:06:47 +00:00
|
|
|
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%] == [] (
|
2012-04-15 01:50:56 +00:00
|
|
|
ECHO ****************************************
|
|
|
|
ECHO ** ERROR
|
|
|
|
ECHO ** Boost library could not be found.
|
|
|
|
ECHO ** Make sure you've specified the correct boost path on the command line,
|
|
|
|
ECHO ** and try adding the toolset version
|
|
|
|
ECHO ****************************************
|
|
|
|
GOTO USAGE
|
2012-02-13 01:45:05 +00:00
|
|
|
)
|
|
|
|
|
2012-04-23 23:43:48 +00:00
|
|
|
ECHO # Autogenerated file, run BuildBoost.bat [path_to_boost] to generate > %WORKPATH%\boostpath.mak
|
2012-04-15 01:50:56 +00:00
|
|
|
ECHO BOOSTPATH=%BOOSTPATH% >> %WORKPATH%\boostpath.mak
|
|
|
|
ECHO BOOSTLIBPATH=%BOOSTLIBPATH% >> %WORKPATH%\boostpath.mak
|
2016-06-15 18:52:03 +00:00
|
|
|
ECHO BUILDTARGETPATH=%BUILDTARGETPATH% >> %WORKPATH%\boostpath.mak
|
2012-02-13 01:45:05 +00:00
|
|
|
POPD
|
2012-04-15 01:50:56 +00:00
|
|
|
ECHO.
|
|
|
|
ECHO.
|
2012-02-13 01:45:05 +00:00
|
|
|
ECHO Boost::regex built.
|
|
|
|
ECHO.
|
|
|
|
ECHO Now you need to build scintilla.
|
|
|
|
ECHO.
|
2012-04-15 01:50:56 +00:00
|
|
|
ECHO From the scintilla\win32 directory
|
2012-02-13 01:45:05 +00:00
|
|
|
ECHO.
|
|
|
|
ECHO nmake -f scintilla.mak
|
|
|
|
ECHO.
|
|
|
|
ECHO.
|
|
|
|
|
|
|
|
GOTO EOF
|
|
|
|
|
|
|
|
:BOOSTNOTFOUND
|
2012-04-15 01:50:56 +00:00
|
|
|
ECHO Boost Path not valid. Run BuildBoost.bat with the absolute path to the directory
|
|
|
|
ECHO where you unpacked your boost zip.
|
|
|
|
ECHO.
|
|
|
|
:USAGE
|
|
|
|
ECHO.
|
2012-02-13 01:45:05 +00:00
|
|
|
ECHO Boost is available free from www.boost.org
|
|
|
|
ECHO.
|
2012-04-15 01:50:56 +00:00
|
|
|
ECHO Unzip the file downloaded from www.boost.org, and give the absolute path
|
|
|
|
ECHO as the first parameter to buildboost.bat
|
|
|
|
ECHO.
|
2012-02-13 01:45:05 +00:00
|
|
|
ECHO e.g.
|
2016-06-15 18:52:03 +00:00
|
|
|
ECHO buildboost.bat d:\libs\boost_1_48_0
|
|
|
|
|
|
|
|
ECHO.
|
|
|
|
ECHO To build 64 bit version, add "-x64" flag after the full file path.
|
|
|
|
ECHO e.g.
|
|
|
|
ECHO buildboost.bat d:\libs\boost_1_48_0 -x64
|
2012-02-13 01:45:05 +00:00
|
|
|
|
2012-04-15 01:50:56 +00:00
|
|
|
ECHO.
|
|
|
|
ECHO.
|
|
|
|
ECHO You can specify which version of the Visual Studio compiler to use
|
|
|
|
ECHO with --toolset.
|
|
|
|
ECHO Use:
|
|
|
|
ECHO --toolset msvc-8.0 for Visual studio 2005
|
|
|
|
ECHO --toolset msvc-9.0 for Visual Studio 2008
|
|
|
|
ECHO --toolset msvc-10.0 for Visual Studio 2010
|
2014-10-14 22:29:23 +00:00
|
|
|
ECHO --toolset msvc-11.0 for Visual Studio 2012
|
|
|
|
ECHO --toolset msvc-12.0 for Visual Studio 2013
|
2012-04-15 01:50:56 +00:00
|
|
|
ECHO.
|
|
|
|
ECHO.
|
|
|
|
ECHO e.g. To build with boost in d:\libs\boost_1_48_0 with Visual Studio 2008
|
|
|
|
ECHO.
|
|
|
|
ECHO buildboost.bat --toolset msvc-9.0 d:\libs\boost_1_48_0
|
|
|
|
ECHO.
|
2012-02-13 01:45:05 +00:00
|
|
|
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
|
|
|
|
|
2012-04-15 01:50:56 +00:00
|
|
|
ENDLOCAL
|