Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
appveyor.yml 4.54 KiB
version: 0.1.0-{build}

environment:
    global:
        MSYSTEM: "MINGW64"

platform: x64

configuration:
    - Release

build:
  verbosity: minimal

install:
    - set QT_DIR=C:\Qt\5.8\msvc2015_64
    - set PATH=%PATH%;%QT_DIR%\bin;C:\MinGW\bin

build_script:
    # VERSION format:     branch-master/branch-1.2
    # INSTVERSION format: x.y.z
    # WINVERSION format:  9999.0.0.123/1.2.0.234
    - if "%APPVEYOR_REPO_TAG%"=="false" set INSTVERSION=0.1.0
    - if "%APPVEYOR_REPO_TAG%"=="false" set VERSION=0.1.0
    - 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%
    - cmake -G "Visual Studio 14 2015 Win64" -H. -Bbuild -DAPPVEYOR_BUILD=ON -DCMAKE_BUILD_TYPE=Release
    - cmake --build build --config Release

after_build:
    # Variables
    - set BUILD=%APPVEYOR_BUILD_FOLDER%
    - echo %BUILD%
    - mkdir NhekoRelease
    - copy build\Release\nheko.exe NhekoRelease\nheko.exe
    - windeployqt --qmldir C:\Qt\5.8\msvc2015_64\qml\ --release NhekoRelease\nheko.exe
    - copy C:\OpenSSL-Win64\bin\ssleay32.dll .\NhekoRelease\ssleay32.dll
    - copy C:\OpenSSL-Win64\bin\libeay32.dll .\NhekoRelease\libeay32.dll
    - copy C:\OpenSSL-Win64\lib\libeay32.lib .\NhekoRelease\libeay32.lib
    - copy C:\OpenSSL-Win64\bin\ssleay32.dll .\NhekoRelease\ssleay32.dll
    - 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
    - mkdir installer\packages\com.mujx.nheko
    - mkdir installer\packages\com.mujx.nheko\data
    - mkdir installer\packages\com.mujx.nheko\meta
    - mkdir installer\packages\com.mujx.nheko.cleanup\meta
    # Copy installer data
    - copy %BUILD%\resources\nheko.ico installer\config
    - copy %BUILD%\resources\nheko.png installer\config
    - copy %BUILD%\LICENSE installer\packages\com.mujx.nheko\meta\license.txt
    - copy %BUILD%\LICENSE installer\packages\com.mujx.nheko.cleanup\meta\license.txt