forked from IENT/YUView
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
100 lines (92 loc) · 3.36 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
image: Visual Studio 2015
configuration: Release
platform:
- x64
clone_folder: C:\projects\YUView
environment:
access_token:
secure: OrnQm0bZgvYKk66eRxDm/83jxiWBWrCoXigQd9u3v2lrRPXFR5x+oaFQVlc05Ize
branches:
except:
- gh-pages
install:
- '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64'
- cd C:\projects
- git clone https://github.com/ChristianFeldmann/Qt5-YUView-MT Qt --depth 1
- set QTDIR=C:\projects\Qt\5.11-release
- set PATH=%PATH%;%QTDIR%\bin
# Download libde265_internals (needed later to pack the installer)
- curl -L -o libde265.dll https://github.com/ChristianFeldmann/libde265/releases/download/v1.1/libde265.dll
build_script:
# activate the automatic update feature
- cd C:\projects\YUView
- C:\msys64\usr\bin\sed.exe -i -- "s/#define UPDATE_FEATURE_ENABLE 0/#define UPDATE_FEATURE_ENABLE 1/g" source/typedef.h
# start compiling
- qmake
- where nmake
- nmake
after_build:
# Pack all the files in one direcory and create the zip and installer
- cd
# create temporary folder for preparing the deployment package
- mkdir deploy
- cd deploy
# copy the actual binary itself and run windeployqt
- copy ..\build\release\YUView.exe .
- windeployqt --release --dir C:\projects\YUView\deploy YUView.exe
# copy the OpenSSL library
- copy C:\projects\Qt\openSSL\*.dll .
# copy the modified libde265 library + license
- mkdir decoder
- copy C:\projects\libde265.dll decoder
- copy ..\decoder\libde265\LICENCE.TXT decoder
- copy ..\LICENSE.GPL3 .
# delete junk that is not needed
- del /F /Q vcredist*
- cd C:\projects\YUView
# run our versioning tool
- python deployment\versioning.py -d deploy -o deploy\versioninfo.txt
- dir /s /b deploy
# everything is ready for packaging the zip file and the installer
- 7z a YUView-Win.zip .\deploy\*
- cd deployment\wix
- createWIXInstaller.bat
- copy bin\Release\YUViewSetup.msi C:\projects\YUView
- cd C:\projects\YUView
- IF "%APPVEYOR_REPO_BRANCH%" == "master" (CALL deployment\deploy_to_github.bat)
artifacts:
# also collect the artifacts here
- path: YUView-Win.zip
name: YUView Zip Folder
type: zip
- path: YUViewSetup.msi
name: YUView Installer
# override settings for `deployment` branch
#for:
#-
# branches:
# only:
# - master
#
# before_deploy:
# - git config --global credential.helper store
# - ps: Add-Content "$HOME\.git-credentials" "https://$($env:access_token):[email protected]`n"
# - git config --global user.email "[email protected]"
# - git config --global user.name "Appveyor"
# # prepare the auto-update using YUViewReleases
# - git clone -b master --single-branch https://github.com/IENT/YUViewReleases.git --depth 1
# - cd YUViewReleases
# # delete old files from git cache just in case
# - git rm --ignore-unmatch win\autoupdate\*
# - git rm --ignore-unmatch win\installers\*
# # copy the deployment packages
# - xcopy /E ..\deploy\* win\autoupdate\. /I/Y
# - xcopy ..\SetupYUView.exe win\installers\ /Y
# - xcopy ..\YUView-Win.zip win\installers\ /Y
# - git add win\autoupdate\*
# - git add win\installers\*
# - git status
# # committing
# - 'git commit -a --allow-empty -m "Appveyor build %APPVEYOR_BUILD_NUMBER%, %APPVEYOR_BUILD_VERSION% based on %APPVEYOR_REPO_COMMIT%"'
# # push the finished stuff
# - git push