Skip to content

Commit 3376163

Browse files
committed
Added changes for Visual Studio 2019
1 parent d0c3e4d commit 3376163

File tree

7 files changed

+4742
-2
lines changed

7 files changed

+4742
-2
lines changed

build/helpers/dependencies.cmd

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ SET WindowsTargetPlatformVersion=%WindowsSDKVersion%
1616
IF %SDK% == MSVC2017 (
1717
SET WindowsTargetPlatformVersion=%WindowsSDKVersion%
1818
)
19+
IF %SDK% == MSVC2019 (
20+
SET WindowsTargetPlatformVersion=%WindowsSDKVersion%
21+
)
1922

23+
rem GOTO :BUILD_ICONV
2024

2125
if "%PRODUCT_NAME%" == "PostgreSQL" goto :SKIP_ZSTD
2226
if "%PRODUCT_NAME%" == "PostgresPro" goto :SKIP_ZSTD
@@ -33,15 +37,25 @@ MKDIR %DEPENDENCIES_SRC_DIR%\zstd-%ZSTD_RELEASE%
3337
CD /D %DEPENDENCIES_SRC_DIR%
3438
7z x %DOWNLOADS_DIR%\zstd-%ZSTD_RELEASE%.zip
3539
CD zstd-%ZSTD_RELEASE%
40+
3641
IF %SDK% == MSVC2017 (
3742
CD build/VS2010
43+
msbuild zstd.sln /m /p:Configuration=Release /p:Platform=%Platform% /p:PlatformToolset=%PlatformToolset% || GOTO :ERROR
44+
CD ../..
45+
GOTO :ENDZSTD
46+
)
47+
48+
IF %SDK% == MSVC2019 (
49+
CD build/VS2010
3850
rem call "./../VS_Scripts/build.VS%REDIST_YEAR%.cmd" || GOTO :ERROR
3951
rem call "./../VS_Scripts/build.generic.cmd" VS2017 x64 Release v141 || GOTO :ERROR
4052
msbuild zstd.sln /m /p:Configuration=Release /p:Platform=%Platform% /p:PlatformToolset=%PlatformToolset% || GOTO :ERROR
4153
CD ../..
42-
)ELSE (
43-
call build/VS_Scripts/build.VS%REDIST_YEAR%.cmd || GOTO :ERROR
54+
GOTO :ENDZSTD
4455
)
56+
call build/VS_Scripts/build.VS%REDIST_YEAR%.cmd || GOTO :ERROR
57+
58+
:ENDZSTD
4559
MKDIR %DEPENDENCIES_BIN_DIR%\zstd
4660
cp lib\zstd.h %DEPENDENCIES_BIN_DIR%\zstd
4761
if %ARCH% == X86 (
@@ -117,8 +131,11 @@ MKDIR %DEPENDENCIES_BIN_DIR%\iconv
117131
tar xf libiconv-%ICONV_VER%.tar.gz -C %DEPENDENCIES_SRC_UDIR% || GOTO :ERROR
118132
CD /D %DEPENDENCIES_SRC_DIR%\libiconv-%ICONV_VER%*
119133
cp -v %ROOT%/patches/libiconv/libiconv-%ICONV_VER%-%SDK%.patch libiconv.patch
134+
echo on
120135
patch -f -p0 < libiconv.patch || GOTO :ERROR
136+
121137
msbuild libiconv.vcxproj /m /p:Configuration=Release /p:Platform=%Platform% /p:PlatformToolset=%PlatformToolset% || GOTO :ERROR
138+
122139
cp -av include %DEPENDENCIES_BIN_DIR%\iconv || GOTO :ERROR
123140
cp -av iconv.h %DEPENDENCIES_BIN_DIR%\iconv\include || GOTO :ERROR
124141
cp -av config.h %DEPENDENCIES_BIN_DIR%\iconv\include || GOTO :ERROR

build/helpers/postgres.cmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ IF %SDK% == MSVC2017 (
6464
cp -va %ROOT%/patches/postgresql/2017.patch .
6565
patch -p1 < 2017.patch || GOTO :ERROR
6666
)
67+
IF %SDK% == MSVC2019 (
68+
cp -va %ROOT%/patches/postgresql/2017.patch .
69+
patch -p1 < 2017.patch || GOTO :ERROR
70+
)
6771

6872

6973
:DONE_POSTGRESQL_PATCH

build/helpers/postgres_installer.cmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ cp "%VCToolsRedistDir%vc_redist.x86.exe" "%BUILD_DIR%\vcredist\vcredist_x86_2017
3434
cp "%VCToolsRedistDir%vc_redist.x64.exe" "%BUILD_DIR%\vcredist\vcredist_x64_2017.exe"
3535
)
3636

37+
IF %REDIST_YEAR% == 2019 (
38+
cp "%VCToolsRedistDir%vc_redist.x86.exe" "%BUILD_DIR%\vcredist\vcredist_x86_2019.exe"
39+
cp "%VCToolsRedistDir%vc_redist.x64.exe" "%BUILD_DIR%\vcredist\vcredist_x64_2019.exe"
40+
)
41+
3742
REM Make directory for installers
3843
MKDIR "%BUILD_DIR%\installers"
3944

build/helpers/setvars.cmd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ IF %SDK% == MSVC2017 (
6161
ECHO ON
6262
IF %ARCH% == X64 call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 || GOTO :ERROR
6363
)
64+
IF %SDK% == MSVC2019 (
65+
SET REDIST_YEAR=2019
66+
SET PlatformToolset=v142
67+
IF %ARCH% == X86 CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86 || GOTO :ERROR
68+
ECHO ON
69+
IF %ARCH% == X64 call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 || GOTO :ERROR
70+
)
6471

6572

6673
REM As we use Msys2 for build we need to install useful packages we will use

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy