Skip to content

Commit 0b95b2f

Browse files
committed
lz4 library build added
1 parent 7847e5d commit 0b95b2f

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

build/helpers/dependencies.cmd

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if "%PRODUCT_NAME%" == "PostgresPro" goto :SKIP_ZSTD
2929

3030
:ZSTD
3131
TITLE "Building libzstd"
32-
IF "ZSTD_RELEASE" == "" set ZSTD_RELEASE=1.4.4
32+
IF "%ZSTD_RELEASE%" == "" set ZSTD_RELEASE=1.4.4
3333
CD /D %DOWNLOADS_DIR%
3434
rem wget -O zstd-%ZSTD_RELEASE%.zip --no-check-certificate -c https://github.com/facebook/zstd/archive/v%ZSTD_RELEASE%.zip
3535

@@ -56,6 +56,30 @@ if %ARCH% == X86 (
5656
)
5757
7z a -r %DOWNLOADS_DIR%\%DEPS_ZIP% %DEPENDENCIES_BIN_DIR%\zstd
5858

59+
:LZ4
60+
TITLE "Building lz4"
61+
IF "%LZ4_RELEASE%" == "" set LZ4_RELEASE=1.9.3
62+
CD /D %DOWNLOADS_DIR%
63+
wget -O lz4-%LZ4_RELEASE%.tar.gz --no-check-certificate -c http://repo.postgrespro.ru/depends/lz4-%LZ4_RELEASE%.tar.gz
64+
rm -rf %DEPENDENCIES_SRC_DIR%/lz4-%LZ4_RELEASE%
65+
MKDIR %DEPENDENCIES_SRC_DIR%\lz4-%LZ4_RELEASE%
66+
tar xf lz4-%LZ4_RELEASE%.tar.gz -C %DEPENDENCIES_SRC_UDIR% || GOTO :ERROR
67+
CD %DEPENDENCIES_SRC_DIR%\lz4-%LZ4_RELEASE%
68+
CD build/VS2017
69+
SET INCLUDE=%DEPENDENCIES_SRC_DIR%\lz4-%LZ4_RELEASE%\lib;%DEPENDENCIES_SRC_DIR%\lz4-%LZ4_RELEASE%\programs;%INCLUDE%
70+
rem set UseEnv=true for using INCLUDE variable
71+
msbuild lz4.sln /m /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=%PlatformToolset% /p:WindowsTargetPlatformVersion=%WindowsSDKVersion% /p:RunCodeAnalysis=false /p:UseEnv=true || GOTO :ERROR
72+
CD ../..
73+
74+
MKDIR %DEPENDENCIES_BIN_DIR%\lz4
75+
cp lib\lz4.h %DEPENDENCIES_BIN_DIR%\lz4
76+
if %ARCH% == X86 (
77+
cp -va build/VS2017/bin/Win32_Release/liblz4* %DEPENDENCIES_BIN_DIR%\lz4
78+
) else (
79+
cp -va build/VS2017/bin/x64_Release/liblz4* %DEPENDENCIES_BIN_DIR%\lz4
80+
)
81+
7z a -r %DOWNLOADS_DIR%\%DEPS_ZIP% %DEPENDENCIES_BIN_DIR%\lz4
82+
5983
:SKIP_ZSTD
6084

6185
REM TO-DO: overwrite to build rules
@@ -320,7 +344,7 @@ CD /D %DEPENDENCIES_SRC_DIR%\icu
320344
IF %SDK% == MSVC2013 (
321345
msbuild source\allinone\allinone.sln /m /p:Configuration="Release" /p:Platform=%Platform% /p:PlatformToolset=%PlatformToolset% || GOTO :ERROR
322346
) ELSE (
323-
msbuild source\allinone\allinone.sln /m /p:Configuration="Release" /p:Platform=%Platform% /p:PlatformToolset=%PlatformToolset% /p:WindowsTargetPlatformVersion=10.0 /p:SkipUWP=true || GOTO :ERROR
347+
msbuild source\allinone\allinone.sln /m /p:Configuration="Release" /p:Platform=%Platform% /p:PlatformToolset=%PlatformToolset% /p:WindowsTargetPlatformVersion=%WindowsSDKVersion% /p:SkipUWP=true || GOTO :ERROR
324348
)
325349

326350
IF %ARCH% == X64 (

build/helpers/setvars.cmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ SET WXWIDGETS_VER=3.0.2
1111
SET EDITLINE_VER=2.205
1212
SET ZSTD_RELEASE=1.4.4
1313
SET ICU_VER=56_2
14+
SET LZ4_RELEASE=1.9.3
1415

1516
REM Path vars
1617
SET PERL32_PATH=C:\Perl

0 commit comments

Comments
 (0)