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>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>

@ -41,23 +41,25 @@ like to debug Notepad++, but don't have 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/).
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.
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`
## 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,
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`,
@ -65,6 +67,8 @@ To build SciLexer.dll without PCRE support:
- From an *already open* command prompt, run `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\`
3. Build `SciLexer.dll` with one of the following commands:

@ -7,7 +7,10 @@ SET TOOLSETCOMMAND=
SET BOOSTVERSION=
SET WORKPATH=%~dp0%
:PARAMLOOP
SET BUILDTARGETPARAM=
SET BUILDTARGETPATH=
rem :PARAMLOOP
IF [%1]==[] (
GOTO PARAMCONTINUE
)
@ -21,10 +24,13 @@ IF [%1]==[--toolset] (
SHIFT
)
IF [%2]==[-x64] (
SET BUILDTARGETPARAM=architecture=ia64
SET BUILDTARGETPATH=architecture-ia64\
)
SHIFT
GOTO PARAMLOOP
rem SHIFT
rem GOTO PARAMLOOP
:PARAMCONTINUE
IF [%BOOSTPATH%]==[] (
@ -40,6 +46,7 @@ IF NOT [%MSVCTOOLSET%]==[] (
IF NOT EXIST "%BOOSTPATH%\boost\regex.hpp" (
ECHO Not found: %BOOSTPATH%\boost\regex.hpp
GOTO BOOSTNOTFOUND
)
@ -103,12 +110,12 @@ ECHO.
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 (
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 (
GOTO BUILDERROR
)
@ -118,7 +125,7 @@ IF NOT [%MSVCTOOLSET%]==[] (
)
:: 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
)
@ -195,6 +202,7 @@ IF [%BOOSTLIBPATH%] == [] (
ECHO # Autogenerated file, run BuildBoost.bat [path_to_boost] to generate > %WORKPATH%\boostpath.mak
ECHO BOOSTPATH=%BOOSTPATH% >> %WORKPATH%\boostpath.mak
ECHO BOOSTLIBPATH=%BOOSTLIBPATH% >> %WORKPATH%\boostpath.mak
ECHO BUILDTARGETPATH=%BUILDTARGETPATH% >> %WORKPATH%\boostpath.mak
POPD
ECHO.
ECHO.
@ -224,6 +232,11 @@ ECHO.
ECHO e.g.
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 You can specify which version of the Visual Studio compiler to use

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

Loading…
Cancel
Save