version: '{build}'
image: Visual Studio 2019
configuration:
- Release
platform: x64
build:
  project: source-code/PD-Loader.sln
  verbosity: minimal
after_build:
- cmd: >-
    md %TMP%\full\

    md %TMP%\full\patches\

    md %TMP%\full\plugins\

    md "%TMP%\full\plugins\Novidia Shaders"
    
    md %TMP%\full\ram\

    md %TMP%\full\ram\databank_template\



    copy %APPVEYOR_BUILD_FOLDER%\source-code\x64\%CONFIGURATION%\dnsapi.dll %TMP%\full\
    
    copy %APPVEYOR_BUILD_FOLDER%\source-code\x64\%CONFIGURATION%\*.dva %TMP%\full\plugins\
    
    copy "%APPVEYOR_BUILD_FOLDER%\source-code\data\README - PD Loader.url" %TMP%\full\

    copy %APPVEYOR_BUILD_FOLDER%\source-code\data\verify_base_game.sfv %TMP%\full\

    copy %APPVEYOR_BUILD_FOLDER%\source-code\data\verify_base_game.md5 %TMP%\full\

    copy %APPVEYOR_BUILD_FOLDER%\source-code\data\verify_mount_data.sfv %TMP%\full\

    copy %APPVEYOR_BUILD_FOLDER%\source-code\data\verify_mount_data.md5 %TMP%\full\

    copy %APPVEYOR_BUILD_FOLDER%\source-code\data\glut32.dll %TMP%\full\

    copy %APPVEYOR_BUILD_FOLDER%\source-code\data\plugins\*.* %TMP%\full\plugins\
    
    copy "%APPVEYOR_BUILD_FOLDER%\source-code\data\plugins\Novidia Shaders\*.*" "%TMP%\full\plugins\Novidia Shaders\"
    
    copy %APPVEYOR_BUILD_FOLDER%\source-code\data\ram\databank_template\*.dat %TMP%\full\ram\databank_template\

    copy %APPVEYOR_BUILD_FOLDER%\source-code\data\patches\custom_freeplay_text_example.p %TMP%\full\patches\

    

    cd %TMP%\full\

    7z a %APPVEYOR_BUILD_FOLDER%\PD-Loader-%CONFIGURATION%-AppVeyor.zip *

artifacts:
- path: PD-Loader-*.zip
