-
Notifications
You must be signed in to change notification settings - Fork 17
/
appveyor.yml
142 lines (136 loc) · 5.98 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
image: Visual Studio 2019
configuration: Release
version: '{branch}-{build}'
environment:
matrix:
- QTDIR: C:\Qt\5.15\mingw81_32
MINGWDIR: C:\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0
OPENSSL: openssl-1.1.1h_3-win32-mingw
QT_INSTALLER_URL: https://download.qt.io/official_releases/qt-installer-framework/3.2.2
install:
- cd %APPVEYOR_BUILD_FOLDER%
- git submodule update --init
- set PATH=%QTDIR%\bin;%QTDIR%\lib;%MINGWDIR%\mingw32\bin;%PATH%
- '%QTDIR%\bin\qtenv2.bat'
build_script:
# VERSION format: branch-master/branch-1.2
# INSTVERSION format: 9999.0/1.2
# WINVERSION format: 9999.0.0.123/1.2.0.234
- if "%APPVEYOR_REPO_TAG%"=="false" set VERSION=branch-%APPVEYOR_REPO_BRANCH%
- if "%APPVEYOR_REPO_TAG%"=="false" set INSTVERSION=%APPVEYOR_REPO_BRANCH%
- 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 DIST=redtimer-%VERSION%-win32
- set DATE=%date:~10,4%-%date:~4,2%-%date:~7,2%
- echo %VERSION%
- echo %INSTVERSION%
- echo %DIST%
- echo %DATE%
- cd %APPVEYOR_BUILD_FOLDER%
- sed -i "s/VERSION = 1.0.0.0/VERSION = %WINVERSION%/" gui\redtimer.pro
- qmake -v
- qmake -r
- mingw32-make
after_build:
# Variables
- set BUILD=%APPVEYOR_BUILD_FOLDER%
- echo %BUILD%
# Create directories
- mkdir %DIST%
- mkdir %DIST%\iconengines
- mkdir %DIST%\imageformats
- mkdir %DIST%\platforms
- mkdir %DIST%\QtQuick
- mkdir %DIST%\QtQuick.2
- mkdir %DIST%\styles
# Copy redtimer, redtimercli and qtredmine
- xcopy %BUILD%\gui\release\redtimer.exe %DIST%
- xcopy %BUILD%\cli\release\redtimercli.exe %DIST%
- xcopy %BUILD%\libqtredmine\release\qtredmine.dll %DIST%
# Copy SSL libraries
- 7z x deploy\openssl-*-win32*.zip -o%APPVEYOR_BUILD_FOLDER%
- xcopy %OPENSSL%\libcrypto-1_1.dll %DIST%
- xcopy %OPENSSL%\libssl-1_1.dll %DIST%
# Copy Qt libraries
- xcopy %QTDIR%\bin\d3dcompiler_47.dll %DIST%
- xcopy %QTDIR%\bin\libEGL.dll %DIST%
- xcopy %QTDIR%\bin\libgcc_s_dw2-1.dll %DIST%
- xcopy %QTDIR%\bin\libGLESv2.dll %DIST%
- xcopy %QTDIR%\bin\libstdc++-6.dll %DIST%
- xcopy %QTDIR%\bin\libwinpthread-1.dll %DIST%
- xcopy %QTDIR%\bin\Qt5Core.dll %DIST%
- xcopy %QTDIR%\bin\Qt5Gui.dll %DIST%
- xcopy %QTDIR%\bin\Qt5Network.dll %DIST%
- xcopy %QTDIR%\bin\Qt5Qml*.dll %DIST%
- xcopy %QTDIR%\bin\Qt5Quick.dll %DIST%
- xcopy %QTDIR%\bin\Qt5Svg.dll %DIST%
- xcopy %QTDIR%\bin\Qt5Widgets.dll %DIST%
# Copy Qt plugins
- xcopy %QTDIR%\plugins\iconengines\qsvgicon.dll %DIST%\iconengines
- xcopy %QTDIR%\plugins\imageformats\qsvg.dll %DIST%\imageformats
- xcopy %QTDIR%\plugins\platforms\qwindows.dll %DIST%\platforms
- xcopy %QTDIR%\plugins\styles\*.dll %DIST%\styles
# Copy Qt QML modules
- xcopy %QTDIR%\qml\QtQuick\*.* %DIST%\QtQuick\*.* /s /e /c /y
- xcopy %QTDIR%\qml\QtQuick.2\*.* %DIST%\QtQuick.2\*.* /s /e /c /y
# Remove debug DLLs
- for /f %%i in ('dir /s /b %DIST%\*d.dll') do del %%i
#
# Create and push the archive for the portable version
#
- 7z a -bb -tzip -mx=9 %DIST%-portable.zip %DIST%
- appveyor PushArtifact %DIST%-portable.zip
#
# Create the Qt Installer Framework version
#
- mkdir installer
- mkdir installer\config
- mkdir installer\packages
- mkdir installer\packages\de.thomssenit.redtimergui
- mkdir installer\packages\de.thomssenit.redtimergui\data
- mkdir installer\packages\de.thomssenit.redtimergui\meta
- mkdir installer\packages\de.thomssenit.redtimercli
- mkdir installer\packages\de.thomssenit.redtimercli\data
- mkdir installer\packages\de.thomssenit.redtimercli\meta
# Copy installer data
- copy %BUILD%\gui\icons\clock_red.ico installer\config
- copy %BUILD%\gui\icons\clock_red.png installer\config
- copy %BUILD%\LICENSE installer\packages\de.thomssenit.redtimergui\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\de.thomssenit.redtimergui\data
- copy %BUILD%\deploy\installer\gui\package.xml installer\packages\de.thomssenit.redtimergui\meta
- copy %BUILD%\deploy\installer\gui\installscript.qs installer\packages\de.thomssenit.redtimergui\meta
- copy %BUILD%\deploy\installer\cli\package.xml installer\packages\de.thomssenit.redtimercli\meta
# Amend version and date
- sed -i "s/__VERSION__/%INSTVERSION%/" installer\config\config.xml
- sed -i "s/__VERSION__/%INSTVERSION%/" installer\packages\de.thomssenit.redtimergui\meta\package.xml
- sed -i "s/__VERSION__/%INSTVERSION%/" installer\packages\de.thomssenit.redtimercli\meta\package.xml
- sed -i "s/__DATE__/%DATE%/" installer\packages\de.thomssenit.redtimergui\meta\package.xml
- sed -i "s/__DATE__/%DATE%/" installer\packages\de.thomssenit.redtimercli\meta\package.xml
# Copy RedTimer data
- xcopy %DIST%\*.* installer\packages\de.thomssenit.redtimergui\data\*.* /s /e /c /y
- move installer\packages\de.thomssenit.redtimergui\data\redtimercli.exe installer\packages\de.thomssenit.redtimercli\data
- mkdir tools
- curl -L -O %QT_INSTALLER_URL%/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 %DIST%-installer.exe
artifacts:
- name: installer
path: $(DIST)-installer.exe
- name: portable
path: $(DIST)-portable.zip
deploy:
- provider: GitHub
release: $(VERSION)
auth_token:
secure: cQP8DKuqRynjlY8tFrYQTeUZyH829wFpXvNBQNJu8SAY7awKmaNi3ELN5mgyUoRS
on:
appveyor_repo_tag: true