1image: Visual Studio 2017
2
3environment:
4  DEPLOY_DIR: Spectral-%APPVEYOR_BUILD_VERSION%
5  matrix:
6  - QTDIR: C:\Qt\5.12\msvc2017_64
7    VCVARS: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat"
8    PLATFORM:
9
10init:
11  - call "%QTDIR%\bin\qtenv2.bat"
12  - set PATH=%PATH%;C:\Qt\Tools\QtCreator\bin
13  - call "%VCVARS%" %platform%
14  - cd /D "%APPVEYOR_BUILD_FOLDER%"
15
16before_build:
17  - git submodule update --init --recursive
18  - git clone https://gitlab.matrix.org/matrix-org/olm.git
19  - cd olm
20  - cmake -LA -G "NMake Makefiles JOM" -H. -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="install" -DBUILD_SHARED_LIBS=NO
21  - cmake --build build --target install
22  - cd ..
23  - git clone https://github.com/frankosterfeld/qtkeychain.git
24  - cd qtkeychain
25  - cmake -LA -G "NMake Makefiles JOM" -H. -Bbuild -DCMAKE_CXX_FLAGS="/EHsc /W3" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="install" -DQTKEYCHAIN_STATIC=ON
26  - cmake --build build --target install
27  - cd ..
28  - git clone https://github.com/commonmark/cmark.git
29  - cd cmark
30  - cmake -LA -G "NMake Makefiles JOM" -H. -Bbuild -DCMAKE_CXX_FLAGS="/EHsc /W3" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="install" -DCMARK_SHARED=ON -DCMARK_STATIC=OFF -DCMARK_TESTS=OFF
31  - cmake --build build --target install
32  - cd ..
33
34build_script:
35  - cmake -LA -G "NMake Makefiles JOM" -H. -Bbuild -DCMAKE_CXX_FLAGS="/EHsc /W3" -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="%DEPLOY_DIR%" -DUSE_INTREE_LIBQMC=1 -DQt5Keychain_DIR="qtkeychain/install/lib/cmake/Qt5Keychain" -DOlm_DIR=olm/install/lib/cmake/Olm -DCMARK_LIBRARY=C:/projects/spectral/cmark/install/lib/cmark.lib -DCMARK_INCLUDE_DIR=C:/projects/spectral/cmark/install/include -DDEPLOY_VERBOSITY=%DEPLOY_VERBOSITY%
36  - cmake --build build
37
38after_build:
39  - cmake --build build --target install
40  - windeployqt --release --qmldir qml --qmldir imports "%DEPLOY_DIR%\spectral.exe"
41
42  - copy C:\projects\spectral\cmark\install\lib\cmark.lib "%DEPLOY_DIR%\"
43  - copy C:\projects\spectral\cmark\install\bin\cmark.dll "%DEPLOY_DIR%\"
44
45  - 7z a spectral.zip "%DEPLOY_DIR%\*"
46
47artifacts:
48  - path: spectral.zip
49    name: portable
50