summaryrefslogtreecommitdiffstats
path: root/.appveyor.yml
blob: dd43550c375aadf6f671e976f07b0c79db8ace5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67

#environment:
#  APPVEYOR_RDP_PASSWORD: Pa55word

environment:
  matrix:
    - 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:
  - 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
  - 7z x zlib.tar.gz -so | 7z x -si -ttar > nul
  - move zlib-1.2.8 zlib
  - cd zlib
  - cmake .
  - cmake --build .
  - cd ..
  # libPNG
  - curl -fsSL -o libpng.tar.gz http://prdownloads.sourceforge.net/libpng/libpng-1.6.28.tar.gz?download
  - 7z x libpng.tar.gz -so | 7z x -si -ttar > nul
  - move libpng-1.6.28 libpng
  - cd libpng
  - cmake . -DZLIB_INCLUDE_DIR=..\zlib -DZLIB_LIBRARY=..\zlib\debug\zlibstaticd.lib
  - cmake --build .
  - cd ..
  # Berkeley DB - required by SASL
  - curl -fsSL -o db-4.1.25.tar.gz http://download.oracle.com/berkeley-db/db-4.1.25.tar.gz
  - 7z x db-4.1.25.tar.gz -so | 7z x -si -ttar > nul
  - move db-4.1.25 db
  - cd db\build_win32
  - echo using devenv %DEVENV_EXE%
  - '%DEVENV_EXE% db_dll.dsp /upgrade'
  - msbuild /p:Configuration=Release db_dll.vcxproj
  - cd ..\..
  # Cyrus SASL
  - curl -fsSL -o cyrus-sasl-2.1.26.tar.gz ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.26.tar.gz
  - 7z x cyrus-sasl-2.1.26.tar.gz -so | 7z x -si -ttar > nul
  - move cyrus-sasl-2.1.26 sasl
  - cd sasl
  - 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
  - cd ..

build_script:
  - mkdir build
  - cd build 
  - cmake .. -DZLIB_INCLUDE_DIR=..\deps\zlib -DZLIB_LIBRARY=..\deps\zlib\debug\zlibstaticd.lib -DPNG_PNG_INCLUDE_DIR=..\deps\libpng -DPNG_LIBRARY=..\deps\libpng\debug\libpng16_staticd.lib -D SASL2_INCLUDE_DIR=c:\cmu\include -D LIBSASL2_LIBRARIES=c:\cmu\lib\libsasl.lib ..
  - cmake --build .
  - ctest -C Debug --output-on-failure

#on_finish:
#  - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))