-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
200 lines (182 loc) · 8.94 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
image:
- Visual Studio 2017
environment:
global:
FK_VER: 3.1.0
VSVER: 15
ARCH: x86
QMAKESPEC: win32-msvc
MAKETOOL: nmake
TOOLSDIR: C:\Qt\Tools\QtCreator
matrix:
- QTDIR: C:\Qt\5.12.1\msvc2017
- ARCH: x64
QTDIR: C:\Qt\5.12.1\msvc2017_64
version: $(fk_ver)-{build}
skip_tags: true
cache:
- windows/dependencies
build:
parallel: true
verbosity: detailed
configuration:
- release
# - debug
branches:
except:
- v1.4
- v1.6
- v1.8
install:
- set CPU=32
- IF /I "%ARCH%" == "x64" (set CPU=64)
- set OPENSSL_DIR="C:\OpenSSL-Win%CPU%"
- set ICU_DIR_NAME=icu4c-54_1-Win%CPU%-msvc10
- set ICU_DOWNLOAD_URL="http://download.icu-project.org/files/icu4c/54.1/%ICU_DIR_NAME%.zip"
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %ARCH%
- set PATH=%QTDIR%\bin;%TOOLSDIR%\bin;%OPENSSL_DIR%\bin;%CD%\bin;%PATH%
- echo "Falkon BUILD %APPVEYOR_BUILD_VERSION%_%QMAKESPEC%_%CONFIGURATION%_%ARCH%"
build_script:
- echo "Clone, compile and install ECM..."
- git clone git://anongit.kde.org/extra-cmake-modules
- cd extra-cmake-modules
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=%CONFIGURATION% -G "NMake Makefiles JOM" .. # or run : cmake -DCMAKE_INSTALL_PREFIX=/usr .. &&
- call %MAKETOOL%
- call %MAKETOOL% install
- cd ../..
# - echo "Clone, compile and install KI18N..."
# - git clone git://anongit.kde.org/ki18n.git
# - cd ki18n
# - mkdir build
# - cd build
# - cmake -DCMAKE_BUILD_TYPE=%CONFIGURATION% -G "NMake Makefiles JOM" ..
# - call %MAKETOOL%
# - call %MAKETOOL% install
# - cd ../..
- echo "Downloading source of Falkon..."
- appveyor DownloadFile "https://github.com/KDE/falkon/archive/Falkon/3.1.zip"
#- 7z x "master.zip"
- 7z x "3.1.zip"
- cd falkon-Falkon-3.1
#- cd falkon-master
- dir
- set FK_DIR=%CD%
- mkdir build
- cd build
- echo "Genarating NMake Makefiles JOM using CMake..."
- IF /I "%PORTABLE_BUILD%" == "true" (
cmake -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DPORTABLE_BUILD=%PORTABLE_BUILD% -DOPENSSL_ROOT_DIR=%OPENSSL_DIR% -G "NMake Makefiles JOM" ..
) else (
cmake -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DOPENSSL_ROOT_DIR=%OPENSSL_DIR% -G "NMake Makefiles JOM" ..
)
- echo "Build Falkon..."
- call %MAKETOOL%
test_script:
- cd %FK_DIR%\build
- del bin\qt.conf
- ctest -V
after_build:
# prepare dependencies
- echo [Paths] > %FK_DIR%\build\bin\qt.conf && echo Plugins="." >> %FK_DIR%\build\bin\qt.conf
- copy %FK_DIR%\COPYING %FK_DIR%\build\bin\COPYRIGHT.txt
- cd %FK_DIR%\windows
- IF NOT EXIST "dependencies" ( mkdir dependencies )
- cd dependencies
- IF NOT EXIST "%ICU_DIR_NAME%.zip" ( appveyor DownloadFile %ICU_DOWNLOAD_URL% ) else ( echo "Use cached %ICU_DIR_NAME%.zip")
# # see: https://github.com/appveyor/ci/issues/1347
# - ps: If (![System.IO.File]::Exists("$env:APPVEYOR_BUILD_FOLDER\falkon-Falkon-3.0\windows\dependencies\KillProcDll&FindProcDll.zip")) { (New-Object Net.WebClient).DownloadFile("http://nsis.sourceforge.net/mediawiki/images/5/53/KillProcDll%26FindProcDll.zip", "$env:APPVEYOR_BUILD_FOLDER\falkon-Falkon-3.0\windows\dependencies\KillProcDll&FindProcDll.zip") } ELse { echo "Use cached KillProcDll&FindProcDll.zip" }
- IF NOT EXIST "Registry.zip" (
appveyor DownloadFile "http://nsis.sourceforge.net/mediawiki/images/4/47/Registry.zip" ) else (echo "Use cached Registry.zip")
- IF NOT EXIST "AppAssocReg-0.4.zip" (
appveyor DownloadFile "http://nsis.sourceforge.net/mediawiki/images/d/d4/AppAssocReg-0.4.zip" ) else (echo "Use cached AppAssocReg-0.4.zip")
- IF NOT EXIST "StdUtils.2016-05-14.r2.zip" (
appveyor DownloadFile "http://github.com/lordmulder/stdutils/releases/download/1.10/StdUtils.2016-05-14.r2.zip" ) else (echo "Use cached StdUtils.2016-05-14.r2.zip")
- IF NOT EXIST "master.tar.gz" (
appveyor DownloadFile "http://chromium.googlesource.com/chromium/deps/hunspell_dictionaries/+archive/master.tar.gz" ) else (echo "Use cached master.tar.gz")
- IF NOT EXIST "locale.tar.gz" (
appveyor DownloadFile "https://raw.githubusercontent.com/srazi/Falkon-Release/master/locale.tar.gz" ) else (echo "Use cached locale.tar.gz")
- mkdir ..\wininstall
- cd ..\wininstall
- copy %FK_DIR%\windows\*.nsh .\
- copy %FK_DIR%\src\lib\data\icons\exeicons\falkon.ico .\install.ico
- copy %FK_DIR%\src\lib\data\icons\exeicons\falkon.ico .\uninstall.ico
- copy %FK_DIR%\windows\*.bmp .\
# prepare nsis plugins
# - 7z x "%FK_DIR%\windows\dependencies\KillProcDll&FindProcDll.zip"
- 7z x %FK_DIR%\windows\dependencies\Registry.zip
- 7z x %FK_DIR%\windows\dependencies\AppAssocReg-0.4.zip
- 7z x %FK_DIR%\windows\dependencies\StdUtils.2016-05-14.r2.zip
- copy %APPVEYOR_BUILD_FOLDER%\nsis\KillProcDll-and-FindProcDll\*.dll .\
- copy Desktop\Plugin\*.dll .\
- copy Plugins\Unicode\*.dll .\
- copy Include\*.nsh %FK_DIR%\windows
# prepare icu
- 7z x "%FK_DIR%\windows\dependencies\%ICU_DIR_NAME%.zip"
# prepare qtwebengine_dictionaries
- mkdir qtwebengine_dictionaries
- cd qtwebengine_dictionaries
- set APPVEYOR_REPO_TAG=true
- IF /I "%APPVEYOR_REPO_TAG%" == "true" (
7z x "%FK_DIR%\windows\dependencies\master.tar.gz" &&
7z x "master.tar" &&
mkdir "doc" &&
move README* "doc\" &&
move COPYING* "doc\"
)
# prepare translations
- cd %FK_DIR%\build\bin
- IF /I "%APPVEYOR_REPO_TAG%" == "true" (
7z x "%FK_DIR%\windows\dependencies\locale.tar.gz" &&
7z x "locale.tar"
)
- cd %FK_DIR%\windows
# set paths
- set OPENSSL_BIN_DIR="%OPENSSL_DIR%\bin"
- set MSVC_REDIST_DIR="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.16.27012\%ARCH%\Microsoft.VC141.CRT"
- set ICU_BIN_DIR="%FK_DIR%\windows\wininstall\icu\bin"
- IF /I "%ARCH%" == "x64" (set INSTALLER_VERSION="%FK_VER% x64" && set ICU_BIN_DIR="%FK_DIR%\windows\wininstall\icu\bin64") else (set INSTALLER_VERSION="%FK_VER%")
- set QTWEBENGINE_DICTIONARIES_DIR="%FK_DIR%\windows\wininstall\qtwebengine_dictionaries"
# make installer
- echo call "C:\Program Files (x86)\NSIS\makensis.exe" /X"Unicode true" /DCUSTOM=1 /DVERSION=%INSTALLER_VERSION% /DARCH=%ARCH% /DMSVC_VER=%VSVER%0 /DOPENSSL_BIN_DIR=%OPENSSL_BIN_DIR% /DMSVC_REDIST_DIR=%MSVC_REDIST_DIR% /DFALKON_SRC_DIR=%FK_DIR% /DFALKON_BIN_DIR=%FK_DIR%\build\bin /DICU_BIN_DIR=%ICU_BIN_DIR% /DQT_DIR=%QTDIR% /DQT_BIN_DIR=%QTDIR%\bin /DQT_PLUGINS_DIR=%QTDIR%\plugins /DQTWEBENGINE_DICTIONARIES_DIR=%QTWEBENGINE_DICTIONARIES_DIR% installer.nsi > nsis.bat
- IF /I "%APPVEYOR_REPO_TAG%" == "true" (
IF /I "%PORTABLE_BUILD%" == "true" (
call "C:\Program Files (x86)\NSIS\makensis.exe" /X"Unicode true" /DCUSTOM=1 /DPORTABLE=1 /DVERSION="%FK_VER% Portable" /DARCH=%ARCH% /DMSVC_VER=%VSVER%0 /DOPENSSL_BIN_DIR=%OPENSSL_BIN_DIR% /DMSVC_REDIST_DIR=%MSVC_REDIST_DIR% /DFALKON_SRC_DIR=%FK_DIR% /DFALKON_BIN_DIR=%FK_DIR%\build\bin /DICU_BIN_DIR=%ICU_BIN_DIR% /DQT_DIR=%QTDIR% /DQT_BIN_DIR=%QTDIR%\bin /DQT_PLUGINS_DIR=%QTDIR%\plugins /DQTWEBENGINE_DICTIONARIES_DIR=%QTWEBENGINE_DICTIONARIES_DIR% installer.nsi
) else (
call "C:\Program Files (x86)\NSIS\makensis.exe" /X"Unicode true" /DCUSTOM=1 /DVERSION=%INSTALLER_VERSION% /DARCH=%ARCH% /DMSVC_VER=%VSVER%0 /DOPENSSL_BIN_DIR=%OPENSSL_BIN_DIR% /DMSVC_REDIST_DIR=%MSVC_REDIST_DIR% /DFALKON_SRC_DIR=%FK_DIR% /DFALKON_BIN_DIR=%FK_DIR%\build\bin /DICU_BIN_DIR=%ICU_BIN_DIR% /DQT_DIR=%QTDIR% /DQT_BIN_DIR=%QTDIR%\bin /DQT_PLUGINS_DIR=%QTDIR%\plugins /DQTWEBENGINE_DICTIONARIES_DIR=%QTWEBENGINE_DICTIONARIES_DIR% installer.nsi
)
)
artifacts:
- path: falkon-Falkon-*\windows\Falkon*Installer*.exe
name: Falkon Installer (%ARCH%)
- path: falkon-Falkon-*\build\bin\*.exe
name: Falkon Executable (%ARCH%)
- path: falkon-Falkon-*\build\bin\*.dll
name: Falkon DLL (%ARCH%)
deploy:
release: 'Version $(appveyor_build_version)'
tag: $(appveyor_build_version) # don't remove or modify tag field
description: 'Falkon $(fk_ver) Windows Installer Released'
provider: GitHub
auth_token:
secure: BumEo5ic9KIrhc8RxwsKFd/L6WwC0s5LpSef9uH+PtUKICZBZAcyqnPewKUqzEFi # your encrypted token from GitHub
artifact: /Falkon.*Installer.*\.exe/ # Falkon Installer
draft: false
prerelease: false
# on:
# appveyor_repo_tag: true # deploy on tag push only
# notifications:
# - provider: Email
# to:
# on_build_success: false
# on_build_failure: false
# on_build_status_changed: true
# remote desktop connection on init
init:
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# # remote desktop connection on finish and block build to not destroy VM
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))