version: 0.0.{build}
image:
  - Visual Studio 2015
  - Visual Studio 2017
environment:
  SDL2: C:\projects\anese\SDL2-2.0.8
cache:
  - SDL2-devel-2.0.8-VC.zip
  - SDL2-2.0.8-win32-x86.zip
before_build:
  - cmd: echo "Download SDL Development Headers"
  - cmd: if not exist SDL2-devel-2.0.8-VC.zip appveyor DownloadFile https://www.libsdl.org/release/SDL2-devel-2.0.8-VC.zip
  - cmd: 7z x -y SDL2-devel-2.0.8-VC.zip
  - mkdir build
  - cd build
  - cmake --version
  - cmake ..
build_script:
  - cmd: msbuild "C:\projects\anese\build\anese.sln" /p:Configuration=Release /verbosity:normal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
after_build:
  - cmd: cd ..
  - cmd: echo "Download SDL Release DLLs"
  - cmd: if not exist SDL2-2.0.8-win32-x86.zip appveyor DownloadFile https://www.libsdl.org/release/SDL2-2.0.8-win32-x86.zip
  - cmd: echo "Create Release Directory"
  - cmd: mkdir ANESE_win_latest
  - cmd: cd ANESE_win_latest
  - cmd: 7z x -y ..\SDL2-2.0.8-win32-x86.zip
  - cmd: move ..\build\Release\anese.exe .\
  - cmd: xcopy ..\roms\demos .\ /e
artifacts:
  - path: ANESE_win_latest