Make Scintilla 64-bit built with boost's pcre

pull/956/merge
Don HO 9 years ago
parent cb25cd6dc2
commit 5a5582b972

@ -228,7 +228,7 @@ copy ..\src\contextMenu.xml ..\bin\contextMenu.xml
<WarningLevel>Level4</WarningLevel> <WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet> <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile> </ClCompile>
<Link> <Link>

@ -41,29 +41,33 @@ like to debug Notepad++, but don't have boost.
## To build `SciLexer.dll` with boost: ## To build `SciLexer.dll` with boost:
Here are the instructions to build SciLexer.dll for Notepad++: Here are the instructions to build SciLexer.dll (for both 32-bit & 64-bit) for Notepad++:
1. Download the [Boost source code](http://sourceforge.net/projects/boost/files/boost/1.55.0/). 1. Download the [Boost source code](http://sourceforge.net/projects/boost/files/boost/1.55.0/).
v1.55 should be used with VS 2013. Then unzip it. In my case, `boost_1_55_0` is copied in `C:\sources\` v1.55 should be used with VS 2013. Then unzip it. In my case, `boost_1_55_0` is copied in `C:\sources\`
2. Go to `scintilla\boostregex\` then run BuildBoost.bat with your boost path. 2. Go to `scintilla\boostregex\` then run BuildBoost.bat with your boost path.
In my case: `BuildBoost.bat C:\sources\boost_1_55_0` In my case: `BuildBoost.bat C:\sources\boost_1_55_0`
If you are compiling a 64 bit Scintilla under your *VS2013 x64 Native tool command prompt*, add `-x64` flag.
In my case: `BuildBoost.bat C:\sources\boost_1_55_0 -x64`
3. Go in `scintilla\win32\` then run `nmake -f scintilla.mak` 3. Go in `scintilla\win32\` then run `nmake -f scintilla.mak`
## To build `SciLexer.dll` *without* boost: ## To build `SciLexer.dll` *without* boost:
This will work with `notepad++.exe`, however some functionality in Notepad++ might be broken. This will work with `notepad++.exe`, however some functionality in Notepad++ will be broken.
To build SciLexer.dll without PCRE support: To build SciLexer.dll without PCRE support (for both 32-bit & 64-bit):
1. Open a command prompt *for building* ([a.k.a. the *Developer Command Prompt for VS2013*](https://msdn.microsoft.com/en-us/library/f2ccy3wt.aspx)) 1. For 32-bit, open a command prompt *for building* ([a.k.a. the *Developer Command Prompt for VS2013*](https://msdn.microsoft.com/en-us/library/f2ccy3wt.aspx))
- From the IDE, you can do this by right clicking on a file in Solution Explorer, - From the IDE, you can do this by right clicking on a file in Solution Explorer,
and clicking "Open Command Prompt". This will open up a command prompt with all the proper environment variables. and clicking "Open Command Prompt". This will open up a command prompt with all the proper environment variables.
- From the Windows Start screen/menu, type `Developer Command Prompt for VS2013`, - From the Windows Start screen/menu, type `Developer Command Prompt for VS2013`,
and click/select the result. and click/select the result.
- From an *already open* command prompt, run `vcvarsall.bat` - From an *already open* command prompt, run `vcvarsall.bat`
(e.g. "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"). (e.g. "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat").
For 64-bit, open *VS2013 x64 Native tool command prompt*.
2. Change directory (`cd` or `pushd`) to `scintilla\win32\` 2. Change directory (`cd` or `pushd`) to `scintilla\win32\`

@ -7,7 +7,10 @@ SET TOOLSETCOMMAND=
SET BOOSTVERSION= SET BOOSTVERSION=
SET WORKPATH=%~dp0% SET WORKPATH=%~dp0%
:PARAMLOOP SET BUILDTARGETPARAM=
SET BUILDTARGETPATH=
rem :PARAMLOOP
IF [%1]==[] ( IF [%1]==[] (
GOTO PARAMCONTINUE GOTO PARAMCONTINUE
) )
@ -21,10 +24,13 @@ IF [%1]==[--toolset] (
SHIFT SHIFT
) )
IF [%2]==[-x64] (
SET BUILDTARGETPARAM=architecture=ia64
SET BUILDTARGETPATH=architecture-ia64\
)
rem SHIFT
SHIFT rem GOTO PARAMLOOP
GOTO PARAMLOOP
:PARAMCONTINUE :PARAMCONTINUE
IF [%BOOSTPATH%]==[] ( IF [%BOOSTPATH%]==[] (
@ -40,6 +46,7 @@ IF NOT [%MSVCTOOLSET%]==[] (
IF NOT EXIST "%BOOSTPATH%\boost\regex.hpp" ( IF NOT EXIST "%BOOSTPATH%\boost\regex.hpp" (
ECHO Not found: %BOOSTPATH%\boost\regex.hpp
GOTO BOOSTNOTFOUND GOTO BOOSTNOTFOUND
) )
@ -103,12 +110,12 @@ ECHO.
PUSHD %BOOSTPATH%\libs\regex\build PUSHD %BOOSTPATH%\libs\regex\build
%BOOSTPATH%\bjam\bin\bjam %TOOLSETCOMMAND% variant=release threading=multi link=static runtime-link=static %BOOSTPATH%\bjam\bin\bjam %TOOLSETCOMMAND% variant=release threading=multi link=static runtime-link=static %BUILDTARGETPARAM%
IF NOT ERRORLEVEL 0 ( IF NOT ERRORLEVEL 0 (
GOTO BUILDERROR GOTO BUILDERROR
) )
%BOOSTPATH%\bjam\bin\bjam %TOOLSETCOMMAND% variant=debug threading=multi link=static runtime-link=static %BOOSTPATH%\bjam\bin\bjam %TOOLSETCOMMAND% variant=debug threading=multi link=static runtime-link=static %BUILDTARGETPARAM%
IF NOT ERRORLEVEL 0 ( IF NOT ERRORLEVEL 0 (
GOTO BUILDERROR GOTO BUILDERROR
) )
@ -118,7 +125,7 @@ IF NOT [%MSVCTOOLSET%]==[] (
) )
:: VS2013 :: VS2013
IF EXIST %BOOSTPATH%\bin.v2\libs\regex\build\msvc-12.0\release\link-static\runtime-link-static\threading-multi\libboost_regex-vc120-mt-s-%BOOSTVERSION%.lib ( 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 (
SET MSVCTOOLSET=msvc-12.0 SET MSVCTOOLSET=msvc-12.0
) )
@ -195,6 +202,7 @@ IF [%BOOSTLIBPATH%] == [] (
ECHO # Autogenerated file, run BuildBoost.bat [path_to_boost] to generate > %WORKPATH%\boostpath.mak ECHO # Autogenerated file, run BuildBoost.bat [path_to_boost] to generate > %WORKPATH%\boostpath.mak
ECHO BOOSTPATH=%BOOSTPATH% >> %WORKPATH%\boostpath.mak ECHO BOOSTPATH=%BOOSTPATH% >> %WORKPATH%\boostpath.mak
ECHO BOOSTLIBPATH=%BOOSTLIBPATH% >> %WORKPATH%\boostpath.mak ECHO BOOSTLIBPATH=%BOOSTLIBPATH% >> %WORKPATH%\boostpath.mak
ECHO BUILDTARGETPATH=%BUILDTARGETPATH% >> %WORKPATH%\boostpath.mak
POPD POPD
ECHO. ECHO.
ECHO. ECHO.
@ -222,7 +230,12 @@ ECHO Unzip the file downloaded from www.boost.org, and give the absolute path
ECHO as the first parameter to buildboost.bat ECHO as the first parameter to buildboost.bat
ECHO. ECHO.
ECHO e.g. ECHO e.g.
ECHO buildboost.bat d:\libs\boost_1_48_0 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
ECHO. ECHO.
ECHO. ECHO.

@ -24,11 +24,16 @@ LOBJS=\
INCLUDEDIRS=$(INCLUDEDIRS) -I$(BOOSTPATH) INCLUDEDIRS=$(INCLUDEDIRS) -I$(BOOSTPATH)
!IFDEF BUILDTARGETPATH
CXXFLAGS=$(CXXFLAGS) -DSCI_OWNREGEX
!ELSE
CXXFLAGS=$(CXXFLAGS) -DSCI_OWNREGEX -arch:IA32 CXXFLAGS=$(CXXFLAGS) -DSCI_OWNREGEX -arch:IA32
!ENDIF
!IFDEF DEBUG !IFDEF DEBUG
LDFLAGS=$(LDFLAGS) -LIBPATH:$(BOOSTLIBPATH)\debug\link-static\runtime-link-static\threading-multi LDFLAGS=$(LDFLAGS) -LIBPATH:$(BOOSTLIBPATH)\debug\link-static\runtime-link-static\threading-multi
!ELSE !ELSE
LDFLAGS=$(LDFLAGS) -LIBPATH:$(BOOSTLIBPATH)\release\link-static\runtime-link-static\threading-multi LDFLAGS=$(LDFLAGS) -LIBPATH:$(BOOSTLIBPATH)\release\$(BUILDTARGETPATH)link-static\runtime-link-static\threading-multi
!ENDIF !ENDIF

Loading…
Cancel
Save