Skip to content
Snippets Groups Projects
appveyor.yml 5.81 KiB
Newer Older
Joe Donofry's avatar
Joe Donofry committed
version: 0.7.2-{build}
Konstantinos Sideris's avatar
Konstantinos Sideris committed
configuration: Release
Nicolas Werner's avatar
Nicolas Werner committed
image: Visual Studio 2019
Konstantinos Sideris's avatar
Konstantinos Sideris committed
platform: x64

environment:
    BINTRAY_APIKEY:
        secure: "iGl5mzE9/ta9kFELUxDw9XtlYMSCMai9xowXIkYzU8WKHz7NfW0mLwMJZvblZFXJ"
    MATRIX_ACCESS_TOKEN:
        secure: Qoy+QQ8zWXYCQrck9GtXJsoPTv9r/rhgCDUlKJ6ue+gkteYG40E9MxgwP1svn6bse20H4z6Svrxn8kFbcJB7Wg2Cnv1s326/vsJJzhWir2eHFFGK+f4SB992/U0HoQmk3Cq5hPk7dLcA7KqHIa1g1PTSFPfl1VODJ2UqqAyn8nzbC5ym+wwU1buJqoWPlTyHBW7eE8wNe77+qI18XpF7NN8yuOOyg3Tzup9YyXLrI36XiJu/5JD3j3s3V1QiUTpuLyQzqwuBUOf1MHTbzuPwHm3ZwzSM98WD6aL6riaK9qa7mDbSx1aY0ukIYSY9IdAfHNwZY/DEAn+QAVD+ZTvPq04ASv+kmSFpOBKr07kpqfM=


  - c:\hunter\
  - build\_deps -> appveyor.yml
Konstantinos Sideris's avatar
Konstantinos Sideris committed
build:
    verbosity: minimal
Konstantinos Sideris's avatar
Konstantinos Sideris committed

install:
Nicolas Werner's avatar
Nicolas Werner committed
    - set QT_DIR=C:\Qt\5.15\msvc2019_64
    - set PATH=C:\Strawberry\perl\bin;%PATH%;%QT_DIR%\bin
    - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
Konstantinos Sideris's avatar
Konstantinos Sideris committed

build_script:
    # VERSION format:     branch-master/branch-1.2
    # INSTVERSION format: x.y.z
    # WINVERSION format:  9999.0.0.123/1.2.0.234
Joe Donofry's avatar
Joe Donofry committed
    - if "%APPVEYOR_REPO_TAG%"=="false" set INSTVERSION=0.7.2
    - if "%APPVEYOR_REPO_TAG%"=="false" set VERSION=0.7.2
    - if "%APPVEYOR_REPO_TAG%"=="false" if "%APPVEYOR_REPO_BRANCH%"=="master" set INSTVERSION=9999.0
    - if "%APPVEYOR_REPO_TAG%"=="false" set WINVERSION=%INSTVERSION%.0.%APPVEYOR_BUILD_NUMBER%
    # VERSION format:     v1.2.3/v1.3.4
    # INSTVERSION format: 1.2.3/1.3.4
    # WINVERSION format:  1.2.3.123/1.3.4.234
    - if "%APPVEYOR_REPO_TAG%"=="true" set VERSION=%APPVEYOR_REPO_TAG_NAME%
    - if "%APPVEYOR_REPO_TAG%"=="true" set INSTVERSION=%VERSION:~1%
    - if "%APPVEYOR_REPO_TAG%"=="true" set WINVERSION=%VERSION:~1%.%APPVEYOR_BUILD_NUMBER%
    - set DATE=%date:~10,4%-%date:~4,2%-%date:~7,2%
    - echo %VERSION%
    - echo %INSTVERSION%
    - echo %DATE%
Nicolas Werner's avatar
Nicolas Werner committed
    #- cmake -G "Visual Studio 15 2017 Win64" -H. -Bbuild
    - cmake -G "Visual Studio 16 2019" -A x64 -H. -Bbuild
Nicolas Werner's avatar
Nicolas Werner committed
      -DHUNTER_ROOT="C:\hunter"
      -DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF
      -DCMAKE_BUILD_TYPE=Release -DHUNTER_CONFIGURATION_TYPES=Release
Nicolas Werner's avatar
Nicolas Werner committed

    - cmake --build build --config Release
Konstantinos Sideris's avatar
Konstantinos Sideris committed

after_build:
    # Variables
    - set BUILD=%APPVEYOR_BUILD_FOLDER%
    - echo %BUILD%
Konstantinos Sideris's avatar
Konstantinos Sideris committed
    - mkdir NhekoRelease
    - copy build\Release\nheko.exe NhekoRelease\nheko.exe
    - copy build\_deps\cmark-build\src\Release\cmark.dll NhekoRelease\cmark.dll
Konstantinos Sideris's avatar
Konstantinos Sideris committed
    - windeployqt --qmldir %QT_DIR%\qml\ --release NhekoRelease\nheko.exe
Konstantinos Sideris's avatar
Konstantinos Sideris committed
    - 7z a nheko_win_64.zip .\NhekoRelease\*
    - ls -lh build\Release\
    - ls -lh NhekoRelease\
    - mkdir NhekoData
    - xcopy .\NhekoRelease\*.* NhekoData\*.* /s /e /c /y
    #
    # Create the Qt Installer Framework version
    #
    - mkdir installer
    - mkdir installer\config
    - mkdir installer\packages
Joe Donofry's avatar
Joe Donofry committed
    - mkdir installer\packages\io.github.nhekoreborn.nheko
    - mkdir installer\packages\io.github.nhekoreborn.nheko\data
    - mkdir installer\packages\io.github.nhekoreborn.nheko\meta
    - mkdir installer\packages\io.github.nhekoreborn.nheko.cleanup\meta
    # Copy installer data
    - copy %BUILD%\resources\nheko.ico installer\config
    - copy %BUILD%\resources\nheko.png installer\config
Joe Donofry's avatar
Joe Donofry committed
    - copy %BUILD%\COPYING installer\packages\io.github.nhekoreborn.nheko\meta\license.txt
    - copy %BUILD%\COPYING installer\packages\io.github.nhekoreborn.nheko.cleanup\meta\license.txt
    - copy %BUILD%\deploy\installer\config.xml installer\config
    - copy %BUILD%\deploy\installer\controlscript.qs installer\config
Joe Donofry's avatar
Joe Donofry committed
    - copy %BUILD%\deploy\installer\uninstall.qs installer\packages\io.github.nhekoreborn.nheko\data
    - copy %BUILD%\deploy\installer\gui\package.xml installer\packages\io.github.nhekoreborn.nheko\meta
    - copy %BUILD%\deploy\installer\gui\installscript.qs installer\packages\io.github.nhekoreborn.nheko\meta
    - copy %BUILD%\deploy\installer\cleanup\package.xml installer\packages\io.github.nhekoreborn.nheko.cleanup\meta
    - copy %BUILD%\deploy\installer\cleanup\installscript.qs installer\packages\io.github.nhekoreborn.nheko.cleanup\meta
Joe Donofry's avatar
Joe Donofry committed
    - sed -i "s/__VERSION__/0.7.2/" installer\config\config.xml
    - sed -i "s/__VERSION__/0.7.2/" installer\packages\io.github.nhekoreborn.nheko\meta\package.xml
    - sed -i "s/__VERSION__/0.7.2/" installer\packages\io.github.nhekoreborn.nheko.cleanup\meta\package.xml
Joe Donofry's avatar
Joe Donofry committed
    - sed -i "s/__DATE__/%DATE%/" installer\packages\io.github.nhekoreborn.nheko\meta\package.xml
    - sed -i "s/__DATE__/%DATE%/" installer\packages\io.github.nhekoreborn.nheko.cleanup\meta\package.xml
Joe Donofry's avatar
Joe Donofry committed
    - xcopy NhekoData\*.* installer\packages\io.github.nhekoreborn.nheko\data\*.* /s /e /c /y
    - move NhekoRelease\nheko.exe installer\packages\io.github.nhekoreborn.nheko\data
    - curl -L -O https://download.qt.io/official_releases/qt-installer-framework/3.0.4/QtInstallerFramework-win-x86.exe
    - 7z x QtInstallerFramework-win-x86.exe -otools -aoa
    - set PATH=%BUILD%\tools\bin;%PATH%
    - binarycreator.exe -f -c installer\config\config.xml -p installer\packages nheko-installer.exe
Konstantinos Sideris's avatar
Konstantinos Sideris committed
    - mv nheko-installer.exe nheko-%APPVEYOR_REPO_TAG_NAME%-installer.exe

on_success:
    - if "%APPVEYOR_REPO_TAG%" == "true" (curl -T nheko-%APPVEYOR_REPO_TAG_NAME%-installer.exe -uredsky17:%BINTRAY_APIKEY% https://api.bintray.com/content/nheko-reborn/nheko/%APPVEYOR_REPO_TAG_NAME%/nheko/%APPVEYOR_REPO_TAG_NAME%/)
before_deploy:
  - ps: .\.ci\upload-nightly.ps1
    - description: "Development builds"
      provider: GitHub
      auth_token:
          secure: "ShStWeqp+TkYqJPQr7uFZb+B8ZTgC7Iwth+IkhjfRDCTLhy8gtWvlPzlQilder3E"
      artifact: nheko-${APPVEYOR_REPO_TAG_NAME}-installer.exe
      force_update: true
      prerelease: true
      on:
          appveyor_repo_tag: true
Konstantinos Sideris's avatar
Konstantinos Sideris committed
artifacts:
    - path: nheko_win_64.zip
Konstantinos Sideris's avatar
Konstantinos Sideris committed
    - path: nheko-$(APPVEYOR_REPO_TAG_NAME)-installer.exe