matrixion/appveyor.yml

109 lines
4.6 KiB
YAML
Raw Permalink Normal View History

---
2018-04-13 14:51:48 +03:00
version: 0.3.1-{build}
2017-04-09 17:09:22 +03:00
environment:
global:
MSYSTEM: "MINGW64"
platform: x64
configuration:
- Release
build:
verbosity: minimal
2017-04-09 17:09:22 +03:00
install:
2018-03-13 09:53:32 +03:00
- set QT_DIR=C:\Qt\5.10.1\msvc2015_64
2017-04-09 17:09:22 +03:00
- 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
2018-04-13 14:51:48 +03:00
- if "%APPVEYOR_REPO_TAG%"=="false" set INSTVERSION=0.3.1
- if "%APPVEYOR_REPO_TAG%"=="false" set VERSION=0.3.1
- 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
2017-04-24 23:28:19 +03:00
- cmake --build build --config Release
2017-04-09 17:09:22 +03:00
after_build:
# Variables
- set BUILD=%APPVEYOR_BUILD_FOLDER%
- echo %BUILD%
2017-04-09 17:09:22 +03:00
- mkdir NhekoRelease
2017-04-24 23:28:19 +03:00
- copy build\Release\nheko.exe NhekoRelease\nheko.exe
2018-03-13 09:53:32 +03:00
- windeployqt --qmldir C:\Qt\5.10.1\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
2017-04-09 17:09:22 +03:00
- 7z a nheko_win_64.zip .\NhekoRelease\*
- ls -lh build\Release\
- ls -lh NhekoRelease\
2017-11-06 18:42:44 +03:00
- 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
- copy %BUILD%\deploy\installer\config.xml installer\config
- copy %BUILD%\deploy\installer\controlscript.qs installer\config
- copy %BUILD%\deploy\installer\uninstall.qs installer\packages\com.mujx.nheko\data
- copy %BUILD%\deploy\installer\gui\package.xml installer\packages\com.mujx.nheko\meta
- copy %BUILD%\deploy\installer\gui\installscript.qs installer\packages\com.mujx.nheko\meta
- copy %BUILD%\deploy\installer\cleanup\package.xml installer\packages\com.mujx.nheko.cleanup\meta
- copy %BUILD%\deploy\installer\cleanup\installscript.qs installer\packages\com.mujx.nheko.cleanup\meta
# Amend version and date
2018-04-13 14:51:48 +03:00
- sed -i "s/__VERSION__/0.3.1/" installer\config\config.xml
- sed -i "s/__VERSION__/0.3.1/" installer\packages\com.mujx.nheko\meta\package.xml
- sed -i "s/__VERSION__/0.3.1/" installer\packages\com.mujx.nheko.cleanup\meta\package.xml
- sed -i "s/__DATE__/%DATE%/" installer\packages\com.mujx.nheko\meta\package.xml
- sed -i "s/__DATE__/%DATE%/" installer\packages\com.mujx.nheko.cleanup\meta\package.xml
# Copy nheko data
2017-11-06 18:42:44 +03:00
- xcopy NhekoData\*.* installer\packages\com.mujx.nheko\data\*.* /s /e /c /y
- move NhekoRelease\nheko.exe installer\packages\com.mujx.nheko\data
- mkdir tools
- curl -L -O https://download.qt.io/official_releases/qt-installer-framework/3.0.1/QtInstallerFramework-win-x86.exe
- 7z x QtInstallerFramework-win-x86.exe -otools -aoa
- set PATH=%BUILD%\tools\bin;%PATH%
2017-11-06 18:42:44 +03:00
- binarycreator.exe -f -c installer\config\config.xml -p installer\packages nheko-installer.exe
2017-04-09 17:09:22 +03:00
2017-11-06 00:43:49 +03:00
deploy:
2017-11-06 01:03:48 +03:00
description: "Development builds"
2017-11-06 00:43:49 +03:00
provider: GitHub
auth_token:
secure: YqB7hcM+4482eSHhtVR7ZA7N7lE78y8BC897/7UDTBQd+NWdWFW/6S+oKDie9TT7
2017-11-06 18:42:44 +03:00
artifact: nheko-installer.exe
2017-11-06 00:43:49 +03:00
force_update: true
2017-11-06 01:03:48 +03:00
prerelease: true
2017-11-06 00:43:49 +03:00
on:
appveyor_repo_tag: true
2017-11-06 00:43:49 +03:00
2017-04-09 17:09:22 +03:00
artifacts:
- path: nheko_win_64.zip
2017-11-06 18:42:44 +03:00
- path: nheko-installer.exe