summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2018-03-24 21:20:24 +0100
committerChristian Beier <dontmind@freeshell.org>2018-03-24 21:20:24 +0100
commit7e7103071b5e927d830c22785a5b8314cacf065c (patch)
tree08eec02c88ba8568aa0bf892bbf63e0edfde4093
parentf23248a415ab1abab7c4e5330a9985d5bb10987b (diff)
downloadlibtdevnc-7e7103071b5e927d830c22785a5b8314cacf065c.tar.gz
libtdevnc-7e7103071b5e927d830c22785a5b8314cacf065c.zip
AppVeyorCI: build with Visual Studio 2017 as well
-rw-r--r--.appveyor.yml11
-rw-r--r--deps/sasl-fix-snprintf-macro.patch26
2 files changed, 35 insertions, 2 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index cd48d97..4a2e6be 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -6,14 +6,19 @@ environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
DEVENV_EXE: C:\"Program Files (x86)"\"Microsoft Visual Studio 12.0"\Common7\IDE\devenv.exe
+ VSDEVCMD_BAT: C:\"Program Files (x86)"\"Microsoft Visual Studio 12.0"\Common7\Tools\VsDevCmd.bat
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
DEVENV_EXE: C:\"Program Files (x86)"\"Microsoft Visual Studio 14.0"\Common7\IDE\devenv.exe
+ VSDEVCMD_BAT: C:\"Program Files (x86)"\"Microsoft Visual Studio 14.0"\Common7\Tools\VsDevCmd.bat
+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+ DEVENV_EXE: C:\"Program Files (x86)"\"Microsoft Visual Studio"\2017\Community\Common7\IDE\devenv.exe
+ VSDEVCMD_BAT: C:\"Program Files (x86)"\"Microsoft Visual Studio"\2017\Community\Common7\Tools\VsDevCmd.bat
#init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
- - mkdir deps
+ - if not exist deps mkdir deps
- cd deps
# zlib
- curl -fsSL -o zlib.tar.gz https://github.com/madler/zlib/archive/v1.2.8.tar.gz
@@ -45,7 +50,9 @@ install:
- 7z x cyrus-sasl-2.1.26.tar.gz -so | 7z x -si -ttar > nul
- move cyrus-sasl-2.1.26 sasl
- cd sasl
- - '"%vs120comntools%\VsDevCmd.bat"'
+ - patch -p1 -i ..\sasl-fix-snprintf-macro.patch
+ - echo using vsdevcmd %VSDEVCMD_BAT%
+ - '%VSDEVCMD_BAT%'
- nmake /f NTMakefile OPENSSL_INCLUDE=c:\OpenSSL-Win32\include OPENSSL_LIBPATH=c:\OpenSSL-Win32\lib DB_INCLUDE=c:\projects\libvncserver\deps\db\build_win32 DB_LIBPATH=c:\projects\libvncserver\deps\db\build_win32\release DB_LIB=libdb41.lib install
- cd ..
# go back to source root
diff --git a/deps/sasl-fix-snprintf-macro.patch b/deps/sasl-fix-snprintf-macro.patch
new file mode 100644
index 0000000..26b5da4
--- /dev/null
+++ b/deps/sasl-fix-snprintf-macro.patch
@@ -0,0 +1,26 @@
+From 310579a87a289588cf8c45587354a90973978510 Mon Sep 17 00:00:00 2001
+From: "Montazeri, Mehrdad" <mmontaze@amazon.com>
+Date: Wed, 31 Jan 2018 09:25:08 -0800
+Subject: [PATCH 2/2] fix snprintf macro
+
+---
+ win32/include/config.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/win32/include/config.h b/win32/include/config.h
+index 8d8548e..304a4a9 100644
+--- a/win32/include/config.h
++++ b/win32/include/config.h
+@@ -117,7 +117,9 @@ typedef int intptr_t;
+ /* Windows calls these functions something else
+ */
+ #define strcasecmp stricmp
++#if defined (_MSC_VER) && (_MSC_VER < 1900)
+ #define snprintf _snprintf
++#endif
+ #define strncasecmp strnicmp
+
+ #define MAXHOSTNAMELEN 1024
+--
+2.11.0.windows.3
+