Skip to content

Commit a8de3a7

Browse files
committed
Added changes for Visual Studio 2017
1 parent 85d1aa3 commit a8de3a7

File tree

9 files changed

+4782
-10
lines changed

9 files changed

+4782
-10
lines changed

build/build64.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
SET ARCH=X64
2-
SET SDK=MSVC2013
2+
SET SDK=MSVC2017
33
SET PG_MAJOR_VERSION=12
44
SET PG_PATCH_VERSION=0
55
SET PRODUCT_NAME=PostgreSQL

build/helpers/dependencies.cmd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ tar xf libiconv-%ICONV_VER%.tar.gz -C %DEPENDENCIES_SRC_UDIR% || GOTO :ERROR
2727
CD /D %DEPENDENCIES_SRC_DIR%\libiconv-%ICONV_VER%*
2828
cp -v %ROOT%/patches/libiconv/libiconv-%ICONV_VER%-%SDK%.patch libiconv.patch
2929
patch -f -p0 < libiconv.patch || GOTO :ERROR
30-
IF %ARCH% == X64 msbuild libiconv.vcxproj /m /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=%PlatformToolset% || GOTO :ERROR
31-
IF %ARCH% == X86 msbuild libiconv.vcxproj /m /p:Configuration=Release /p:PlatformToolset=%PlatformToolset% || GOTO :ERROR
30+
IF %ARCH% == X64 msbuild libiconv.vcxproj /m /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=%PlatformToolset% /p:WindowsTargetPlatformVersion=%WindowsSDKVersion% || GOTO :ERROR
31+
IF %ARCH% == X86 msbuild libiconv.vcxproj /m /p:Configuration=Release /p:PlatformToolset=%PlatformToolset% /p:WindowsTargetPlatformVersion=%WindowsSDKVersion% || GOTO :ERROR
3232
cp -av include %DEPENDENCIES_BIN_DIR%\iconv || GOTO :ERROR
3333
cp -av iconv.h %DEPENDENCIES_BIN_DIR%\iconv\include || GOTO :ERROR
3434
cp -av config.h %DEPENDENCIES_BIN_DIR%\iconv\include || GOTO :ERROR
@@ -74,8 +74,8 @@ IF %ARCH% == X64 sed -i 's/Win32/x64/g' ossp_uuid.sln || GOTO :ERROR
7474
IF %ARCH% == X64 sed -i 's/Win32/x64/g' ossp_uuid\ossp_uuid.vcxproj || GOTO :ERROR
7575
IF %ARCH% == X64 sed -i 's/Win32/x64/g' example\example.vcxproj || GOTO :ERROR
7676
IF %ARCH% == X64 sed -i 's/Win32/x64/g' uuid_cli\uuid_cli.vcxproj || GOTO :ERROR
77-
IF %ARCH% == X64 msbuild ossp_uuid.sln /m /p:Configuration=Release /p:Platform=x64 || GOTO :ERROR
78-
IF %ARCH% == X86 msbuild ossp_uuid.sln /m /p:Configuration=Release || GOTO :ERROR
77+
IF %ARCH% == X64 msbuild ossp_uuid.sln /m /p:Configuration=Release /p:Platform=x64 /p:WindowsTargetPlatformVersion=%WindowsSDKVersion% || GOTO :ERROR
78+
IF %ARCH% == X86 msbuild ossp_uuid.sln /m /p:Configuration=Release /p:WindowsTargetPlatformVersion=%WindowsSDKVersion% || GOTO :ERROR
7979
MKDIR %DEPENDENCIES_BIN_DIR%\uuid\lib
8080
cp -av include %DEPENDENCIES_BIN_DIR%\uuid || GOTO :ERROR
8181
IF %ARCH% == X64 cp -av x64\Release\ossp_uuid.lib %DEPENDENCIES_BIN_DIR%\uuid\lib\uuid.lib || GOTO :ERROR
@@ -169,8 +169,8 @@ tar xf gettext-%GETTEXT_VER%.tar.gz -C %DEPENDENCIES_SRC_UDIR% || GOTO :ERROR
169169
CD /D %DEPENDENCIES_SRC_DIR%\gettext-*
170170
cp -v %ROOT%/patches/gettext/gettext-%GETTEXT_VER%-%SDK%.patch gettext.patch
171171
patch -f -p0 < gettext.patch || GOTO :ERROR
172-
IF %ARCH% == X64 msbuild libintl.vcxproj /m /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=%PlatformToolset% || GOTO :ERROR
173-
IF %ARCH% == X86 msbuild libintl.vcxproj /m /p:Configuration=Release /p:PlatformToolset=%PlatformToolset% || GOTO :ERROR
172+
IF %ARCH% == X64 msbuild libintl.vcxproj /m /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=%PlatformToolset% /p:WindowsTargetPlatformVersion=%WindowsSDKVersion% || GOTO :ERROR
173+
IF %ARCH% == X86 msbuild libintl.vcxproj /m /p:Configuration=Release /p:PlatformToolset=%PlatformToolset% /p:WindowsTargetPlatformVersion=%WindowsSDKVersion% || GOTO :ERROR
174174
MKDIR %DEPENDENCIES_BIN_DIR%\libintl\lib %DEPENDENCIES_BIN_DIR%\libintl\include
175175
cp -v Release*/*.dll %DEPENDENCIES_BIN_DIR%\libintl\lib || GOTO :ERROR
176176
cp -v Release*/*.lib %DEPENDENCIES_BIN_DIR%\libintl\lib || GOTO :ERROR
@@ -202,8 +202,8 @@ rm -rf %DEPENDENCIES_BIN_DIR%\icu %DEPENDENCIES_SRC_DIR%\icu
202202
MKDIR %DEPENDENCIES_BIN_DIR%\icu
203203
7z x icu4c-56_1-src.zip -o%DEPENDENCIES_SRC_DIR% -y
204204
CD /D %DEPENDENCIES_SRC_DIR%\icu
205-
IF %ARCH% == X86 msbuild source\allinone\allinone.sln /m /p:Configuration="Release" /p:PlatformToolset=%PlatformToolset% || GOTO :ERROR
206-
IF %ARCH% == X64 msbuild source\allinone\allinone.sln /m /p:Configuration="Release" /p:Platform=x64 /p:PlatformToolset=%PlatformToolset% || GOTO :ERROR
205+
IF %ARCH% == X86 msbuild source\allinone\allinone.sln /m /p:Configuration="Release" /p:PlatformToolset=%PlatformToolset% /p:WindowsTargetPlatformVersion=%WindowsSDKVersion% || GOTO :ERROR
206+
IF %ARCH% == X64 msbuild source\allinone\allinone.sln /m /p:Configuration="Release" /p:Platform=x64 /p:PlatformToolset=%PlatformToolset% /p:WindowsTargetPlatformVersion=%WindowsSDKVersion% || GOTO :ERROR
207207
IF %ARCH% == X64 (
208208
cp -va %DEPENDENCIES_SRC_DIR%\icu\bin64 %DEPENDENCIES_BIN_DIR%\icu\bin || GOTO :ERROR
209209
cp -va %DEPENDENCIES_SRC_DIR%\icu\lib64 %DEPENDENCIES_BIN_DIR%\icu\lib || GOTO :ERROR

build/helpers/postgres.cmd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ IF %ONE_C% == YES (
5151

5252
:DONE_1C_PATCH
5353

54+
IF %SDK% == MSVC2017 (
55+
cp -va %ROOT%/patches/postgresql/2017.patch .
56+
patch -p1 < 2017.patch || GOTO :ERROR
57+
)
58+
59+
5460
IF %HAVE_PGURL% == 0 (
5561
cp -va %ROOT%/patches/postgresql/%PG_MAJOR_VERSION%/series .
5662
IF NOT EXIST series GOTO :DONE_POSTGRESQL_PATCH

build/helpers/postgres_installer.cmd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ wget -c https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4
2727
wget -c https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe -O "%BUILD_DIR%\vcredist\vcredist_x64_2015.exe" || GOTO :ERROR
2828
)
2929

30+
IF %REDIST_YEAR% == 2017 (
31+
rem wget -c https://download.visualstudio.microsoft.com/download/pr/11100229/78c1e864d806e36f6035d80a0e80399e/VC_redist.x86.exe -O "%BUILD_DIR%\vcredist\vcredist_x86_2017.exe" || GOTO :ERROR
32+
rem wget -c https://download.visualstudio.microsoft.com/download/pr/11100230/15ccb3f02745c7b206ad10373cbca89b/VC_redist.x64.exe -O "%BUILD_DIR%\vcredist\vcredist_x64_2017.exe" || GOTO :ERROR
33+
rem VCToolsRedistDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.16.27012\
34+
cp "%VCToolsRedistDir%vc_redist.x86.exe" "%BUILD_DIR%\vcredist\vcredist_x86_2017.exe"
35+
cp "%VCToolsRedistDir%vc_redist.x64.exe" "%BUILD_DIR%\vcredist\vcredist_x64_2017.exe"
36+
)
3037

3138

3239
REM Make directory for installers

build/helpers/setvars.cmd

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
REM LIBRARY VERSIONS
2-
SET ICONV_VER=1.14
2+
SET ICONV_VER=1.15
33
SET XSLT_VER=1.1.29
44
SET ZLIB_VER=1.2.11
55
SET XML_VER=2.9.4
@@ -59,6 +59,14 @@ IF %SDK% == MSVC2015 (
5959
IF %ARCH% == X64 CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall" amd64 || GOTO :ERROR
6060
ECHO ON
6161
)
62+
IF %SDK% == MSVC2017 (
63+
SET REDIST_YEAR=2017
64+
SET PlatformToolset=v141
65+
IF %ARCH% == X86 CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86 || GOTO :ERROR
66+
ECHO ON
67+
IF %ARCH% == X64 call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 || GOTO :ERROR
68+
ECHO ON
69+
)
6270

6371
REM As we use Msys2 for build we need to install useful packages we will use
6472
@ECHO "Current PATH is:"

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