diff --git a/builds/posix/Makefile.in b/builds/posix/Makefile.in index ab416b93ce5..07cbab28e71 100644 --- a/builds/posix/Makefile.in +++ b/builds/posix/Makefile.in @@ -861,13 +861,16 @@ $(INCLUDE_DEST)/ib_util.h : $(SRC_OtherDistribHeaders) $(CP) $^ $(INCLUDE_DEST)/ NEW_INCLUDES_SRC = $(shell find $(SRC_ROOT)/include/firebird -type f) +ifeq ($(SYSTEM_BOOST_FLG),Y) +NEW_INCLUDES_SRC := $(filter-out $(SRC_ROOT)/include/firebird/impl/boost/%,$(NEW_INCLUDES_SRC)) +endif NEW_INCLUDES_DEST = $(patsubst $(SRC_ROOT)/include/firebird/%, $(INCLUDE_DEST)/firebird/%, $(NEW_INCLUDES_SRC)) include_generic: $(NEW_INCLUDES_DEST) $(INCLUDE_DEST)/ib_util.h ifeq ($(SYSTEM_BOOST_FLG),Y) $(INCLUDE_DEST)/firebird/Message.h : $(SRC_ROOT)/include/firebird/Message.h - sed 's,^#include "\./impl/boost/\(.\+\)",#include ,; s/\bFB_BOOST_PP_/BOOST_PP_/g' $< > $@ + sed 's,^#include "\./impl/boost/\(.*\)",#include ,; s/FB_BOOST_PP_/BOOST_PP_/g' $< > $@ endif $(INCLUDE_DEST)/firebird/%: $(SRC_ROOT)/include/firebird/% diff --git a/builds/win32/make_all.bat b/builds/win32/make_all.bat index 9e9e3280dcc..1e7aae2602f 100644 --- a/builds/win32/make_all.bat +++ b/builds/win32/make_all.bat @@ -118,6 +118,13 @@ copy %FB_GEN_DIR%\iberror_c.h %FB_OUTPUT_DIR%\include\firebird\impl > nul :: New API headers xcopy /y %FB_ROOT_PATH%\src\include\firebird %FB_OUTPUT_DIR%\include\firebird /e > nul +:: With system boost, do not distribute the embedded copy and make Message.h use and BOOST_PP_ +@findstr /C:"" "%FB_TEMP_DIR%\FirebirdSystemLibs.props" >nul 2>&1 +@if not errorlevel 1 ( + rmdir /S /Q %FB_OUTPUT_DIR%\include\firebird\impl\boost 2>nul + powershell -NoProfile -Command "(Get-Content '%FB_ROOT_PATH%\src\include\firebird\Message.h') -replace '^#include \x22\./impl/boost/(.+)\x22', '#include ' -replace '\bFB_BOOST_PP_', 'BOOST_PP_' | Set-Content -Encoding ascii '%FB_OUTPUT_DIR%\include\firebird\Message.h'" +) + @if "%FB_CLIENT_ONLY%"=="" ( :: UDR copy %FB_ROOT_PATH%\src\extlib\*.sql %FB_OUTPUT_DIR%\plugins\udr > nul diff --git a/builds/win32/make_boot.bat b/builds/win32/make_boot.bat index 5ad8fe89d18..f3c3ef37e6e 100644 --- a/builds/win32/make_boot.bat +++ b/builds/win32/make_boot.bat @@ -29,6 +29,8 @@ for %%v in ( alice auth burp dsql gpre isql jrd misc msgs examples yvalve utilit @mkdir %FB_BIN_DIR%\tzdata 2>nul +call :system_libs_config + @if not defined FBBUILD_WITHOUT_CLOOP_GENERATION call :interfaces if "!ERRLEV!"=="1" goto :END @@ -41,8 +43,10 @@ if "!ERRLEV!"=="1" goto :END if "%FB_TARGET_PLATFORM%"=="x64" call :ttmath if "!ERRLEV!"=="1" goto :END -call :zlib -if "!ERRLEV!"=="1" goto :END +@if not defined FBBUILD_WITH_SYSTEM_ZLIB ( + call :zlib + if "!ERRLEV!"=="1" goto :END +) @if "%FB_CLIENT_ONLY%"=="" ( call :re2 @@ -101,10 +105,14 @@ for %%v in (firebird plugins) do ( ) :: Copy ICU and zlib to the output directory -@copy %FB_ROOT_PATH%\extern\icu\icudt???.dat %FB_BIN_DIR% >nul 2>&1 -@copy %FB_ICU_SOURCE_BIN%\*.dll %FB_BIN_DIR% >nul 2>&1 +@if not defined FBBUILD_WITH_SYSTEM_ICU ( + @copy %FB_ROOT_PATH%\extern\icu\icudt???.dat %FB_BIN_DIR% >nul 2>&1 + @copy %FB_ICU_SOURCE_BIN%\*.dll %FB_BIN_DIR% >nul 2>&1 +) @copy %FB_ROOT_PATH%\extern\icu\tzdata-extract\* %FB_BIN_DIR%\tzdata >nul 2>&1 -@copy %FB_ROOT_PATH%\extern\zlib\%FB_TARGET_PLATFORM%\*.dll %FB_BIN_DIR% >nul 2>&1 +@if not defined FBBUILD_WITH_SYSTEM_ZLIB ( + @copy %FB_ROOT_PATH%\extern\zlib\%FB_TARGET_PLATFORM%\*.dll %FB_BIN_DIR% >nul 2>&1 +) @if "%FB_CLIENT_ONLY%"=="" ( ::======= @@ -129,6 +137,53 @@ for %%v in (firebird plugins) do ( @goto :END +::=================== +:: Record the system libraries choice in a props file used by all later builds (including the IDE) +:system_libs_config +@mkdir %FB_TEMP_DIR% 2>nul +@set SYSLIBS_PROPS=%FB_TEMP_DIR%\FirebirdSystemLibs.props +@del "%SYSLIBS_PROPS%" 2>nul +@set SYSLIBS_ANY= +@if defined FBBUILD_WITH_SYSTEM_BOOST set SYSLIBS_ANY=1 +@if defined FBBUILD_WITH_SYSTEM_TOMMATH set SYSLIBS_ANY=1 +@if defined FBBUILD_WITH_SYSTEM_TOMCRYPT set SYSLIBS_ANY=1 +@if defined FBBUILD_WITH_SYSTEM_ZLIB set SYSLIBS_ANY=1 +@if defined FBBUILD_WITH_SYSTEM_ICU set SYSLIBS_ANY=1 +@if not defined SYSLIBS_ANY goto :EOF +:: Optional extra include directory for system ICU/zlib headers (e.g. vcpkg), since MSBuild ignores %INCLUDE% +@set SYSLIBS_INCDIR= +@if defined FBBUILD_SYSTEM_INCLUDE_DIR set SYSLIBS_INCDIR=%FBBUILD_SYSTEM_INCLUDE_DIR%; +@echo ^> "%SYSLIBS_PROPS%" +@echo ^>> "%SYSLIBS_PROPS%" +@if defined FBBUILD_WITH_SYSTEM_BOOST ( + @echo Using system boost headers + @echo ^^>> "%SYSLIBS_PROPS%" +) +@if defined FBBUILD_WITH_SYSTEM_TOMMATH ( + @echo Using system libtommath + @echo ^^>> "%SYSLIBS_PROPS%" + @echo ^^>> "%SYSLIBS_PROPS%" + @echo ^tommath.lib^>> "%SYSLIBS_PROPS%" + call :tommath_probe +) +@if defined FBBUILD_WITH_SYSTEM_TOMCRYPT ( + @echo Using system libtomcrypt + @echo ^^>> "%SYSLIBS_PROPS%" + @echo ^^>> "%SYSLIBS_PROPS%" + @echo ^tomcrypt.lib^>> "%SYSLIBS_PROPS%" +) +@if defined FBBUILD_WITH_SYSTEM_ZLIB ( + @echo Using system zlib + @echo ^%SYSLIBS_INCDIR%^>> "%SYSLIBS_PROPS%" +) +@if defined FBBUILD_WITH_SYSTEM_ICU ( + @echo Using system ICU + @echo ^%SYSLIBS_INCDIR%^>> "%SYSLIBS_PROPS%" +) +@echo ^>> "%SYSLIBS_PROPS%" +@echo ^>> "%SYSLIBS_PROPS%" +@goto :EOF + ::=================== :: BUILD btyacc :btyacc @@ -142,10 +197,17 @@ goto :EOF :: BUILD LibTom :LibTom @echo. +@if defined FBBUILD_WITH_SYSTEM_TOMMATH goto :LibTomCrypt @echo Building LibTomMath (%FB_OBJ_DIR%)... @call compile.bat extern\libtommath\libtommath_MSVC%MSVC_VERSION% libtommath_%FB_CONFIG%_%FB_TARGET_PLATFORM%.log libtommath if errorlevel 1 call :boot2 libtommath_%FB_OBJ_DIR% & goto :EOF +:LibTomCrypt @if defined FBBUILD_WITHOUT_TOMCRYPT goto :LibTomDone +@if defined FBBUILD_WITH_SYSTEM_TOMCRYPT goto :LibTomDone +@echo Building LibTomCrypt (%FB_OBJ_DIR%)... +@call compile.bat extern\libtomcrypt\libtomcrypt_MSVC%MSVC_VERSION% libtomcrypt_%FB_CONFIG%_%FB_TARGET_PLATFORM%.log libtomcrypt +if errorlevel 1 call :boot2 libtomcrypt_%FB_OBJ_DIR% +:LibTomDone @echo Building LibTomCrypt (%FB_OBJ_DIR%)... @call compile.bat extern\libtomcrypt\libtomcrypt_MSVC%MSVC_VERSION% libtomcrypt_%FB_CONFIG%_%FB_TARGET_PLATFORM%.log libtomcrypt if errorlevel 1 call :boot2 libtomcrypt_%FB_OBJ_DIR% diff --git a/builds/win32/make_icu.bat b/builds/win32/make_icu.bat index dd82ee1ebe7..176034b8baa 100644 --- a/builds/win32/make_icu.bat +++ b/builds/win32/make_icu.bat @@ -22,7 +22,14 @@ if not defined FB_UNZIP ( if not exist "%FB_UNZIP%" set FB_UNZIP= -if not defined FB_UNZIP ( +if defined FBBUILD_WITH_SYSTEM_ICU ( + @echo Using system ICU, extracting tzdata only + if not defined FB_UNZIP ( + cscript /nologo unzip.vbs %FB_ROOT_PATH%\extern\icu\tzdata\le.zip %FB_ROOT_PATH%\extern\icu\tzdata-extract + ) else ( + "%FB_UNZIP%" -o %FB_ROOT_PATH%\extern\icu\tzdata\le.zip -d %FB_ROOT_PATH%\extern\icu\tzdata-extract + ) +) else if not defined FB_UNZIP ( cscript /nologo unzip.vbs %FB_ROOT_PATH%\extern\icu\icu_windows.zip %FB_ROOT_PATH%\extern\icu cscript /nologo unzip.vbs %FB_ROOT_PATH%\extern\icu\icudt.zip %FB_ROOT_PATH%\extern\icu cscript /nologo unzip.vbs %FB_ROOT_PATH%\extern\icu\tzdata\le.zip %FB_ROOT_PATH%\extern\icu\tzdata-extract diff --git a/builds/win32/msvc15/FirebirdCommon.props b/builds/win32/msvc15/FirebirdCommon.props index 545ac6ff443..ffdcbd41969 100644 --- a/builds/win32/msvc15/FirebirdCommon.props +++ b/builds/win32/msvc15/FirebirdCommon.props @@ -5,12 +5,26 @@ ..\..\..\temp\$(PlatformName)\$(Configuration)\$(ProjectName)\ ..\..\..\temp\$(PlatformName)\$(Configuration)\$(ProjectName)\ false + $(Configuration) + Release + Debug + ../../../extern/boost; + ../../../extern/libtommath; + ../../../extern/libtommath/lib/$(PlatformName)\$(FbExternConfiguration)\tommath.lib + ../../../extern/libtomcrypt/src/headers; + ../../../extern/libtomcrypt/lib/$(PlatformName)\$(FbExternConfiguration)\tomcrypt.lib + + + ../../../extern/zlib; + ../../../extern/icu/include; + + /EHsc- /Zc:__cplusplus %(AdditionalOptions) true - ../../../src/include;../../../src/include/gen;../../../extern/libtomcrypt/src/headers;../../../extern/libtommath;../../../extern/icu/include;../../../extern/zlib;../../../extern/re2;../../../extern/boost;%(AdditionalIncludeDirectories) + ../../../src/include;../../../src/include/gen;$(FbTomCryptIncludeDir)$(FbTomMathIncludeDir)$(FbIcuIncludeDir)$(FbZlibIncludeDir)../../../extern/re2;$(FbBoostIncludeDir)%(AdditionalIncludeDirectories) false @@ -35,7 +49,7 @@ true $(IntDir)$(TargetName).pdb $(IntDir)$(TargetName).lib - bcrypt.lib;psapi.lib;%(AdditionalDependencies) + bcrypt.lib;psapi.lib;$(FbTomMathSysLib);$(FbTomCryptSysLib);%(AdditionalDependencies) ../../../extern/re2/builds/$(PlatformName)/$(Configuration) diff --git a/builds/win32/msvc15/common.vcxproj b/builds/win32/msvc15/common.vcxproj index 65f08080be3..f71dd410954 100644 --- a/builds/win32/msvc15/common.vcxproj +++ b/builds/win32/msvc15/common.vcxproj @@ -495,7 +495,7 @@ WIN32;NDEBUG;_LIB;SUPERSERVER;%(PreprocessorDefinitions) - ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies) + ws2_32.lib;$(FbTomMathLib);$(FbTomCryptLib);../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies) @@ -507,7 +507,7 @@ EditAndContinue - ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies) + ws2_32.lib;$(FbTomMathLib);$(FbTomCryptLib);../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies) @@ -518,7 +518,7 @@ WIN32;NDEBUG;_LIB;SUPERSERVER;%(PreprocessorDefinitions) - ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;../../../extern/ttmath\$(Configuration)\ttmathuint_x86_64_msvc.obj;%(AdditionalDependencies) + ws2_32.lib;$(FbTomMathLib);$(FbTomCryptLib);../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;../../../extern/ttmath\$(Configuration)\ttmathuint_x86_64_msvc.obj;%(AdditionalDependencies) @@ -532,7 +532,7 @@ - ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;../../../extern/ttmath\$(Configuration)\ttmathuint_x86_64_msvc.obj;%(AdditionalDependencies) + ws2_32.lib;$(FbTomMathLib);$(FbTomCryptLib);../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;../../../extern/ttmath\$(Configuration)\ttmathuint_x86_64_msvc.obj;%(AdditionalDependencies) @@ -540,8 +540,8 @@ WIN32;NDEBUG;_LIB;SUPERSERVER;%(PreprocessorDefinitions) - ../../../extern/libtommath/lib/$(PlatformName)\Release\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\Release\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\Release\decnumber.lib;%(AdditionalDependencies) - ../../../extern/libtommath/lib/$(PlatformName)\Release\tommath.lib;../../../extern/decNumber/lib/$(PlatformName)\Release\decnumber.lib;%(AdditionalDependencies) + $(FbTomMathLib);$(FbTomCryptLib);../../../extern/decNumber/lib/$(PlatformName)\Release\decnumber.lib;%(AdditionalDependencies) + $(FbTomMathLib);../../../extern/decNumber/lib/$(PlatformName)\Release\decnumber.lib;%(AdditionalDependencies) @@ -553,8 +553,8 @@ EditAndContinue - ../../../extern/libtommath/lib/$(PlatformName)\Debug\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\Debug\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\Debug\decnumber.lib;%(AdditionalDependencies) - ../../../extern/libtommath/lib/$(PlatformName)\Debug\tommath.lib;../../../extern/decNumber/lib/$(PlatformName)\Debug\decnumber.lib;%(AdditionalDependencies) + $(FbTomMathLib);$(FbTomCryptLib);../../../extern/decNumber/lib/$(PlatformName)\Debug\decnumber.lib;%(AdditionalDependencies) + $(FbTomMathLib);../../../extern/decNumber/lib/$(PlatformName)\Debug\decnumber.lib;%(AdditionalDependencies) @@ -565,7 +565,7 @@ WIN32;NDEBUG;_LIB;SUPERSERVER;%(PreprocessorDefinitions) - ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies) + ws2_32.lib;$(FbTomMathLib);$(FbTomCryptLib);../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies) @@ -579,7 +579,7 @@ - ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies) + ws2_32.lib;$(FbTomMathLib);$(FbTomCryptLib);../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies) @@ -590,8 +590,8 @@ WIN32;NDEBUG;_LIB;SUPERSERVER;%(PreprocessorDefinitions) - ../../../extern/libtommath/lib/$(PlatformName)\Release\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\Release\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\Release\decnumber.lib;../../../extern/ttmath\Release\ttmathuint_x86_64_msvc.obj;%(AdditionalDependencies) - ../../../extern/libtommath/lib/$(PlatformName)\Release\tommath.lib;../../../extern/decNumber/lib/$(PlatformName)\Release\decnumber.lib;../../../extern/ttmath\Release\ttmathuint_x86_64_msvc.obj;%(AdditionalDependencies) + $(FbTomMathLib);$(FbTomCryptLib);../../../extern/decNumber/lib/$(PlatformName)\Release\decnumber.lib;../../../extern/ttmath\Release\ttmathuint_x86_64_msvc.obj;%(AdditionalDependencies) + $(FbTomMathLib);../../../extern/decNumber/lib/$(PlatformName)\Release\decnumber.lib;../../../extern/ttmath\Release\ttmathuint_x86_64_msvc.obj;%(AdditionalDependencies) @@ -605,8 +605,8 @@ - ../../../extern/libtommath/lib/$(PlatformName)\Debug\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\Debug\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\Debug\decnumber.lib;../../../extern/ttmath\Debug\ttmathuint_x86_64_msvc.obj;%(AdditionalDependencies) - ../../../extern/libtommath/lib/$(PlatformName)\Debug\tommath.lib;../../../extern/decNumber/lib/$(PlatformName)\Debug\decnumber.lib;../../../extern/ttmath\Debug\ttmathuint_x86_64_msvc.obj;%(AdditionalDependencies) + $(FbTomMathLib);$(FbTomCryptLib);../../../extern/decNumber/lib/$(PlatformName)\Debug\decnumber.lib;../../../extern/ttmath\Debug\ttmathuint_x86_64_msvc.obj;%(AdditionalDependencies) + $(FbTomMathLib);../../../extern/decNumber/lib/$(PlatformName)\Debug\decnumber.lib;../../../extern/ttmath\Debug\ttmathuint_x86_64_msvc.obj;%(AdditionalDependencies) @@ -617,8 +617,8 @@ WIN32;NDEBUG;_LIB;SUPERSERVER;%(PreprocessorDefinitions) - ../../../extern/libtommath/lib/$(PlatformName)\Release\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\Release\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\Release\decnumber.lib;%(AdditionalDependencies) - ../../../extern/libtommath/lib/$(PlatformName)\Release\tommath.lib;../../../extern/decNumber/lib/$(PlatformName)\Release\decnumber.lib;%(AdditionalDependencies) + $(FbTomMathLib);$(FbTomCryptLib);../../../extern/decNumber/lib/$(PlatformName)\Release\decnumber.lib;%(AdditionalDependencies) + $(FbTomMathLib);../../../extern/decNumber/lib/$(PlatformName)\Release\decnumber.lib;%(AdditionalDependencies) @@ -632,8 +632,8 @@ - ../../../extern/libtommath/lib/$(PlatformName)\Debug\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\Debug\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\Debug\decnumber.lib;%(AdditionalDependencies) - ../../../extern/libtommath/lib/$(PlatformName)\Debug\tommath.lib;../../../extern/decNumber/lib/$(PlatformName)\Debug\decnumber.lib;%(AdditionalDependencies) + $(FbTomMathLib);$(FbTomCryptLib);../../../extern/decNumber/lib/$(PlatformName)\Debug\decnumber.lib;%(AdditionalDependencies) + $(FbTomMathLib);../../../extern/decNumber/lib/$(PlatformName)\Debug\decnumber.lib;%(AdditionalDependencies) diff --git a/builds/win32/msvc15/engine.vcxproj b/builds/win32/msvc15/engine.vcxproj index 65dd4554e1f..a2721c675a5 100644 --- a/builds/win32/msvc15/engine.vcxproj +++ b/builds/win32/msvc15/engine.vcxproj @@ -229,7 +229,7 @@ Disabled - ../../../src/include;../../../src/include/gen;../../../extern/icu/include;../../../src/vulcan;%(AdditionalIncludeDirectories) + ../../../src/include;../../../src/include/gen;$(FbIcuIncludeDir)../../../src/vulcan;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_LIB;SUPERSERVER;DEV_BUILD;NAMESPACE=Vulcan;%(PreprocessorDefinitions) @@ -245,7 +245,7 @@ Disabled - ../../../src/include;../../../src/include/gen;../../../extern/icu/include;../../../src/vulcan;%(AdditionalIncludeDirectories) + ../../../src/include;../../../src/include/gen;$(FbIcuIncludeDir)../../../src/vulcan;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_LIB;SUPERSERVER;DEV_BUILD;NAMESPACE=Vulcan;%(PreprocessorDefinitions) @@ -281,7 +281,7 @@ OnlyExplicitInline true Speed - ../../../src/include;../../../src/include/gen;../../../extern/icu/include;../../../src/vulcan;%(AdditionalIncludeDirectories) + ../../../src/include;../../../src/include/gen;$(FbIcuIncludeDir)../../../src/vulcan;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_LIB;SUPERSERVER;NAMESPACE=Vulcan;%(PreprocessorDefinitions) @@ -302,7 +302,7 @@ OnlyExplicitInline true Speed - ../../../src/include;../../../src/include/gen;../../../extern/icu/include;../../../src/vulcan;%(AdditionalIncludeDirectories) + ../../../src/include;../../../src/include/gen;$(FbIcuIncludeDir)../../../src/vulcan;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_LIB;SUPERSERVER;NAMESPACE=Vulcan;%(PreprocessorDefinitions) diff --git a/builds/win32/msvc15/engine_static.vcxproj b/builds/win32/msvc15/engine_static.vcxproj index 2fa3a4d2d68..e561ec88c72 100644 --- a/builds/win32/msvc15/engine_static.vcxproj +++ b/builds/win32/msvc15/engine_static.vcxproj @@ -567,7 +567,7 @@ Disabled - ../../../src/include;../../../src/include/gen;../../../extern/icu/include;../../../src/vulcan;%(AdditionalIncludeDirectories) + ../../../src/include;../../../src/include/gen;$(FbIcuIncludeDir)../../../src/vulcan;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_LIB;SUPERSERVER;DEV_BUILD;NAMESPACE=Vulcan;%(PreprocessorDefinitions) @@ -577,7 +577,7 @@ Disabled - ../../../src/include;../../../src/include/gen;../../../extern/icu/include;../../../src/vulcan;%(AdditionalIncludeDirectories) + ../../../src/include;../../../src/include/gen;$(FbIcuIncludeDir)../../../src/vulcan;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_LIB;SUPERSERVER;DEV_BUILD;NAMESPACE=Vulcan;%(PreprocessorDefinitions) @@ -593,7 +593,7 @@ X64 - ../../../src/include;../../../src/include/gen;../../../extern/icu/include;../../../src/vulcan;%(AdditionalIncludeDirectories) + ../../../src/include;../../../src/include/gen;$(FbIcuIncludeDir)../../../src/vulcan;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_LIB;SUPERSERVER;NAMESPACE=Vulcan;%(PreprocessorDefinitions) @@ -604,7 +604,7 @@ ARM64 - ../../../src/include;../../../src/include/gen;../../../extern/icu/include;../../../src/vulcan;%(AdditionalIncludeDirectories) + ../../../src/include;../../../src/include/gen;$(FbIcuIncludeDir)../../../src/vulcan;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_LIB;SUPERSERVER;NAMESPACE=Vulcan;%(PreprocessorDefinitions) diff --git a/builds/win32/run_all.bat b/builds/win32/run_all.bat index 5805fc020a9..c6d1b6ed426 100644 --- a/builds/win32/run_all.bat +++ b/builds/win32/run_all.bat @@ -13,6 +13,11 @@ set FBBUILD_KITS=ISX ZIP set FBBUILD_TEST_ONLY= set FBBUILD_WITHOUT_TOMCRYPT= set FBBUILD_WITHOUT_CLOOP_GENERATION= +set FBBUILD_WITH_SYSTEM_BOOST= +set FBBUILD_WITH_SYSTEM_TOMMATH= +set FBBUILD_WITH_SYSTEM_TOMCRYPT= +set FBBUILD_WITH_SYSTEM_ZLIB= +set FBBUILD_WITH_SYSTEM_ICU= set FB2_SNAPSHOT= ::Check if on-line help is required @@ -87,6 +92,21 @@ goto :END @echo. @echo WITHOUT_CLOOP_GENERATION - omit Cloop build and interface generation @echo. +@echo WITH_SYSTEM_BOOST - use boost headers from the system include path +@echo instead of extern\boost +@echo. +@echo WITH_SYSTEM_TOMMATH - use libtommath headers and tommath.lib from the system +@echo include/lib paths instead of extern\libtommath +@echo. +@echo WITH_SYSTEM_TOMCRYPT - use libtomcrypt headers and tomcrypt.lib from the system +@echo include/lib paths instead of extern\libtomcrypt +@echo. +@echo WITH_SYSTEM_ZLIB - use zlib headers from the system include path and do not +@echo distribute zlib1.dll (instead of extern\zlib) +@echo. +@echo WITH_SYSTEM_ICU - use ICU headers from the system include path and do not +@echo distribute ICU libraries and icudt (instead of extern\icu) +@echo. @echo REALCLEAN - Run CLEAN_ALL.BAT REALCLEAN @echo This will do a deeper clean. @echo Recommended for multi-platform builds diff --git a/builds/win32/setenvvar.bat b/builds/win32/setenvvar.bat index 0f81c358b66..bffd4f5506e 100644 --- a/builds/win32/setenvvar.bat +++ b/builds/win32/setenvvar.bat @@ -36,6 +36,31 @@ if /I "%~1"=="WITHOUT_CLOOP_GENERATION" ( shift /1 goto :parse_args ) +if /I "%~1"=="WITH_SYSTEM_BOOST" ( + set FBBUILD_WITH_SYSTEM_BOOST=1 + shift /1 + goto :parse_args +) +if /I "%~1"=="WITH_SYSTEM_TOMMATH" ( + set FBBUILD_WITH_SYSTEM_TOMMATH=1 + shift /1 + goto :parse_args +) +if /I "%~1"=="WITH_SYSTEM_TOMCRYPT" ( + set FBBUILD_WITH_SYSTEM_TOMCRYPT=1 + shift /1 + goto :parse_args +) +if /I "%~1"=="WITH_SYSTEM_ZLIB" ( + set FBBUILD_WITH_SYSTEM_ZLIB=1 + shift /1 + goto :parse_args +) +if /I "%~1"=="WITH_SYSTEM_ICU" ( + set FBBUILD_WITH_SYSTEM_ICU=1 + shift /1 + goto :parse_args +) if /I "%~1"=="CLEAN" ( set FB_CLEAN=:rebuild shift /1 @@ -294,6 +319,11 @@ goto :END @echo FB_VSCOMNTOOLS=%FB_VSCOMNTOOLS% @echo platform=%FB_TARGET_PLATFORM% @if defined FBBUILD_WITHOUT_CLOOP_GENERATION echo without_cloop_generation=yes +@if defined FBBUILD_WITH_SYSTEM_BOOST echo with_system_boost=yes +@if defined FBBUILD_WITH_SYSTEM_TOMMATH echo with_system_tommath=yes +@if defined FBBUILD_WITH_SYSTEM_TOMCRYPT echo with_system_tomcrypt=yes +@if defined FBBUILD_WITH_SYSTEM_ZLIB echo with_system_zlib=yes +@if defined FBBUILD_WITH_SYSTEM_ICU echo with_system_icu=yes @if /I "%FB_CLIENT_ONLY%"=="STATIC" ( @echo fbclient_static_config=%FB_STATIC_CONFIG% @if defined FBBUILD_WITHOUT_TOMCRYPT echo without_tomcrypt=yes diff --git a/configure.ac b/configure.ac index b01795fa93f..2c9f1b4ee25 100644 --- a/configure.ac +++ b/configure.ac @@ -958,7 +958,7 @@ else AC_MSG_ERROR(Include file for tomcrypt not found - please install development tomcrypt package or use --with-builtin-tomcrypt)) XE_RESTORE_ENV() XE_SAVE_ENV() - LIBS= + LIBS=$MATHLIB AC_CHECK_LIB(tomcrypt, sha1_init, CRYPTLIB=-ltomcrypt, AC_MSG_ERROR(Library tomcrypt not found - please install development tomcrypt package or use --with-builtin-tomcrypt)) XE_RESTORE_ENV() diff --git a/doc/README.build.msvc.html b/doc/README.build.msvc.html index 478421a0516..27ea3d09388 100644 --- a/doc/README.build.msvc.html +++ b/doc/README.build.msvc.html @@ -109,6 +109,8 @@

4.1.-Standard build

  • make_all.bat [DEBUG] [CLEAN]
  • To skip the Cloop build and generated interface updates, pass WITHOUT_CLOOP_GENERATION to run_all.bat.
  • +
  • To use boost headers from the system include path (e.g. the INCLUDE environment variable) instead of extern\boost, pass WITH_SYSTEM_BOOST to make_boot.bat (or run_all.bat). The choice is recorded in temp\<Platform>\FirebirdSystemLibs.props and used by later builds, including from the IDE; a make_boot.bat run without the option removes it, and so does clean_all.bat. The installed Message.h then uses <boost/...> and the embedded boost copy is not distributed.
  • +
  • Likewise, WITH_SYSTEM_TOMMATH, WITH_SYSTEM_TOMCRYPT, WITH_SYSTEM_ZLIB and WITH_SYSTEM_ICU make the build use the headers (and, for libtommath and libtomcrypt, tommath.lib and tomcrypt.lib) from the system INCLUDE and LIB paths instead of extern\libtommath, extern\libtomcrypt, extern\zlib and extern\icu. The embedded copy is not built or extracted, and the corresponding runtime files (zlib1.dll, ICU libraries and icudt; tzdata is still extracted and copied) are not copied to the output directory, so they must be provided by you. These options are also recorded in FirebirdSystemLibs.props.
    • After the build finish, an output directory with the binaries is created below your firebird directory.

      diff --git a/src/common/SimilarToRegex.cpp b/src/common/SimilarToRegex.cpp index 7c2fa26af5e..c69b09fde88 100644 --- a/src/common/SimilarToRegex.cpp +++ b/src/common/SimilarToRegex.cpp @@ -831,7 +831,7 @@ bool SimilarToRegex::matches(const char* buffer, unsigned bufferLen, Arraypush(MatchPos{ - static_cast(resSp.data() - sp.begin()), + static_cast(resSp.data() - sp.data()), static_cast(resSp.length()) }); } @@ -879,7 +879,7 @@ bool SubstringSimilarRegex::matches(const char* buffer, unsigned bufferLen, if (RE2::FullMatch(sp, *regexp.get(), nullptr, &spResult, nullptr)) { - *resultStart = spResult.begin() - buffer; + *resultStart = spResult.data() - buffer; *resultLength = static_cast(spResult.length()); return true; }