forked from kvirc/KVIrc
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
170 lines (167 loc) · 10.4 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
version: 0.0.0.0.1-branch-{branch}-build-{build}
image: Visual Studio 2017
cache:
- c:\spellcheck-dicts -> .appveyor.yml
- c:\Tools\vcpkg\installed -> .appveyor.yml
environment:
matrix:
- cmake_build_type: Release
arch: x64
target_arch: x86_64
ssl_arch: Win64
nuget_arch: x64
vc_arch: amd64
choco_arch:
qt_ver: 5.9\msvc2017_64
MSYSTEM: MINGW64
mingw_fourple: mingw64/mingw-w64-x86_64
mingw_root: c:/msys64/mingw64
mingw_libgcc: libgcc_s_seh-1.dll
- cmake_build_type: Release
arch: x86
target_arch: x86
ssl_arch: Win32
nuget_arch: Win32
vc_arch: amd64_x86 # cross-compile from amd64 to x86
choco_arch: --x86
qt_ver: 5.9\msvc2015 # no official Qt VS2017 32bit, use VS2015(ABI compatible, answer from Qt)
MSYSTEM: MINGW32
mingw_fourple: mingw32/mingw-w64-i686
mingw_root: c:/msys64/mingw32
mingw_libgcc: libgcc_s_dw2-1.dll
- cmake_build_type: Debug
arch: x64
target_arch: x86_64
ssl_arch: Win64
nuget_arch: x64
vc_arch: amd64
choco_arch:
qt_ver: 5.9\msvc2017_64
MSYSTEM: MINGW64
mingw_fourple: mingw64/mingw-w64-x86_64
mingw_root: c:/msys64/mingw64
mingw_libgcc: libgcc_s_seh-1.dll
- cmake_build_type: Debug
arch: x86
target_arch: x86
ssl_arch: Win32
nuget_arch: Win32
vc_arch: amd64_x86 # cross-compile from amd64 to x86
choco_arch: --x86
qt_ver: 5.9\msvc2015 # no official Qt VS2017 32bit, use VS2015(ABI compatible, answer from Qt)
MSYSTEM: MINGW32
mingw_fourple: mingw32/mingw-w64-i686
mingw_root: c:/msys64/mingw32
mingw_libgcc: libgcc_s_dw2-1.dll
matrix:
fast_finish: true
install:
# - systeminfo
# - c:\cygwin\bin\uname -a
# - c:\cygwin\bin\cat /proc/cpuinfo
# - c:\cygwin\bin\cat /proc/meminfo
- ps: |
if ((Test-Path "c:\OpenSSL-$env:ssl_arch") -And ((Get-Item "c:\OpenSSL-$env:ssl_arch\bin\ssleay32.dll").VersionInfo.ProductVersion -eq '1.0.2o')) {
echo "using preinstalled openssl"
} else {
echo "preinstalled openssl not found or not present in requested version, this is pretty sad."
echo "downloading openssl 1.0.2o package, don't worry, be happy!"
Invoke-WebRequest "https://slproweb.com/download/$($env:ssl_arch)OpenSSL-1_0_2o.exe" -OutFile c:\openssl-setup.exe
echo "installing openssl"
Start-Process -Wait -FilePath c:\openssl-setup.exe -ArgumentList "/silent /verysilent /sp- /suppressmsgboxes"
}
- c:\cygwin\bin\find /cygdrive/c/OpenSSL-%ssl_arch% "-type" f
- ps: |
choco install strawberryperl -y $env:choco_arch
# Strawberry perl doesn't support MSVC, but we force the support.
c:\cygwin\bin\bash -c "/bin/cat .appveyor.perl >> /cygdrive/c/Strawberry/perl/lib/core/config.h"
- ps: |
c:\msys64\usr\bin\pacman -Q
c:\msys64\usr\bin\pacman -S --noconfirm $env:mingw_fourple-enchant
c:\cygwin\bin\sh -lc 'mkdir -p /cygdrive/c/enchant-headers; cp -vp $mingw_root/lib/glib-2.0/include/glibconfig.h $mingw_root/include/enchant/enchant.h /cygdrive/c/enchant-headers/'
c:\cygwin\bin\sh -lc 'cd /cygdrive/c/enchant-headers; patch -p2 < $APPVEYOR_BUILD_FOLDER/.appveyor.ench'
- c:\cygwin\bin\sh -lc "mkdir -p /cygdrive/c/spellcheck-dicts; cd /cygdrive/c/spellcheck-dicts; mkdir -p zip unzip ru"
- ps: |
if (Test-Path "c:/spellcheck-dicts/zip/ru.zip") { # LGPL
echo "using ru dict from cache"
} else {
Invoke-WebRequest https://extensions.libreoffice.org/extensions/russian-spellcheck-dictionary.-based-on-works-of-aot-group/0-4.1/@@download/file/dict_ru_ru-aot-0.4.1.oxt -OutFile c:\spellcheck-dicts\zip\ru.zip
c:\cygwin\bin\bash -lc "cd /cygdrive/c/spellcheck-dicts/ru; 7z x -y ../zip/ru.zip"
}
- ps: |
if (Test-Path "c:/spellcheck-dicts/zip/en_US.zip") {
echo "using en dict from cache"
} else {
(New-Object Net.WebClient).DownloadFile('https://sourceforge.net/projects/wordlist/files/speller/2017.08.24/hunspell-en_US-2017.08.24.zip', 'c:\spellcheck-dicts\zip\en_US.zip')
(New-Object Net.WebClient).DownloadFile('https://sourceforge.net/projects/wordlist/files/speller/2017.08.24/hunspell-en_GB-ize-2017.08.24.zip', 'c:\spellcheck-dicts\zip\en_GB-ize.zip')
(New-Object Net.WebClient).DownloadFile('https://sourceforge.net/projects/wordlist/files/speller/2017.08.24/hunspell-en_GB-ise-2017.08.24.zip', 'c:\spellcheck-dicts\zip\en_GB-ise.zip')
c:\cygwin\bin\bash -lc "cd /cygdrive/c/spellcheck-dicts/unzip; 7z x -y ../zip/en_US.zip; 7z x -y ../zip/en_GB-ize.zip; 7z x -y ../zip/en_GB-ise.zip"
}
- ps: |
(New-Object Net.WebClient).DownloadFile('https://github.com/lordmulder/stdutils/releases/download/1.13/StdUtils.2018-03-29.zip', 'c:\StdUtils.2018-03-29.zip')
7z e -o"C:\Program Files (x86)\NSIS\Plugins\x86-unicode" c:\StdUtils.2018-03-29.zip Plugins\Unicode\*.dll
7z e -o"C:\Program Files (x86)\NSIS\Include" c:\StdUtils.2018-03-29.zip Include\*.nsh
# - c:\cygwin\bin\find "/cygdrive/c/Program Files (x86)/NSIS" "-type" f
build_script:
- mkdir build
- cd build
- '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %vc_arch%'
- path
- vcpkg remove --outdated
- vcpkg install gettext:%arch%-windows
- vcpkg install zlib:%arch%-windows
- ps: |
cmake .. "-GNMake Makefiles" "-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_BUILD_TYPE=$env:cmake_build_type" "-DCMAKE_PREFIX_PATH=c:/Qt/$env:qt_ver" "-DOPENSSL_ROOT_DIR=c:/OpenSSL-$env:ssl_arch" "-DWANT_PERL=YES" "-DPERL_EXECUTABLE=c:/Strawberry/perl/bin/perl.exe" "-DWANT_PHONON=NO" "-DCMAKE_START_TEMP_FILE=" "-DCMAKE_END_TEMP_FILE=" "-DCMAKE_VERBOSE_MAKEFILE=1" "-DEnchant_FOUND=1" "-DEnchant_INCLUDE_DIRS=c:/enchant-headers;$env:mingw_root/include/enchant;$env:mingw_root/include/glib-2.0" "-DEnchant_LDFLAGS=$env:mingw_root/lib/libenchant.dll.a" "-DWANT_KDE=NO" "-DWANT_PYTHON=YES" "-DWANT_QTWEBKIT=NO"
- ps: Push-AppveyorArtifact CMakeCache.txt
- nmake install VERBOSE=1
# - c:\cygwin\bin\ls -l release/
- ps: |
$env:Path += ";c:/Qt/$env:qt_ver/bin"
if ($env:cmake_build_type -eq "Debug") {
windeployqt "--pdb" "--dir" "release/qt-plugins" "--libdir" "release/" "release/kvirc.exe" "release/modules/"
} else {
windeployqt "--dir" "release/qt-plugins" "--libdir" "release/" "release/kvirc.exe" "release/modules/"
}
- ps: |
if ($env:cmake_build_type -eq "Debug") {
c:\cygwin\bin\cp -pv "c:/Tools/vcpkg/installed/$env:arch-windows/debug/bin/zlibd.pdb" "c:/Tools/vcpkg/installed/$env:arch-windows/debug/bin/zlibd1.dll" "/cygdrive/c/OpenSSL-$env:ssl_arch/libeay32.dll" "/cygdrive/c/OpenSSL-$env:ssl_arch/ssleay32.dll" "/cygdrive/c/OpenSSL-$env:ssl_arch/bin/msvcr120.dll" "c:/Program Files (x86)/Windows Kits/10/bin/$env:arch/ucrt/ucrtbased.dll" release/
} else {
c:\cygwin\bin\cp -pv "c:/Tools/vcpkg/installed/$env:arch-windows/bin/zlib1.dll" "/cygdrive/c/OpenSSL-$env:ssl_arch/libeay32.dll" "/cygdrive/c/OpenSSL-$env:ssl_arch/ssleay32.dll" "/cygdrive/c/OpenSSL-$env:ssl_arch/bin/msvcr120.dll" release/
}
c:\cygwin\bin\cp -pv $env:mingw_root/bin/libenchant.dll release/
c:\cygwin\bin\cp -pv $env:mingw_root/bin/libpcre-1.dll release/
c:\cygwin\bin\cp -pv $env:mingw_root/bin/libglib-2.0-0.dll release/
c:\cygwin\bin\cp -pv $env:mingw_root/bin/libgmodule-2.0-0.dll release/
c:\cygwin\bin\cp -pv $env:mingw_root/bin/libintl-8.dll release/
c:\cygwin\bin\cp -pv $env:mingw_root/bin/libwinpthread-1.dll release/
c:\cygwin\bin\cp -pv $env:mingw_root/bin/libiconv-2.dll release/
c:\cygwin\bin\cp -pv $env:mingw_root/bin/$env:mingw_libgcc release/
c:\cygwin\bin\cp -pv $env:mingw_root/bin/libstdc++-6.dll release/
c:\cygwin\bin\cp -pv $env:mingw_root/bin/libhunspell-1.6-0.dll release/
c:\cygwin\bin\mkdir -p release/lib/enchant/ release/share/enchant/ release/share/myspell/dicts/
c:\cygwin\bin\touch release/share/locale
c:\cygwin\bin\cp -pv $env:mingw_root/share/enchant/enchant.ordering release/share/enchant/
c:\cygwin\bin\cp -pv $env:mingw_root/lib/enchant/libenchant_myspell.dll release/lib/enchant/
c:\cygwin\bin\cp -pv /cygdrive/c/spellcheck-dicts/ru/russian-aot.aff release/share/myspell/dicts/ru_RU_yo.aff
c:\cygwin\bin\cp -pv /cygdrive/c/spellcheck-dicts/ru/russian-aot.dic release/share/myspell/dicts/ru_RU_yo.dic
c:\cygwin\bin\cp -pv /cygdrive/c/spellcheck-dicts/unzip/en_US.aff release/share/myspell/dicts/
c:\cygwin\bin\cp -pv /cygdrive/c/spellcheck-dicts/unzip/en_US.dic release/share/myspell/dicts/
c:\cygwin\bin\cp -pv /cygdrive/c/spellcheck-dicts/unzip/en_GB-ise.dic release/share/myspell/dicts/en_GB_ise.dic
c:\cygwin\bin\cp -pv /cygdrive/c/spellcheck-dicts/unzip/en_GB-ise.aff release/share/myspell/dicts/en_GB_ise.aff
c:\cygwin\bin\cp -pv /cygdrive/c/spellcheck-dicts/unzip/en_GB-ize.dic release/share/myspell/dicts/en_GB_ize.dic
c:\cygwin\bin\cp -pv /cygdrive/c/spellcheck-dicts/unzip/en_GB-ize.aff release/share/myspell/dicts/en_GB_ize.aff
- '"c:\Program Files (x86)\NSIS\makensis.exe" KVIrc.nsi'
- ps: |
$exe = dir -name *.exe
if ($env:cmake_build_type -eq "Debug") {
$new_name = $exe.Replace(".exe", "-$env:target_arch-$env:cmake_build_type.exe")
} else {
$new_name = $exe.Replace(".exe", "-$env:target_arch.exe")
}
Push-AppveyorArtifact $exe -FileName $new_name
$cmake_name = $exe.Replace(".exe", "-$env:target_arch.cmake.txt")
Push-AppveyorArtifact CMakeCache.txt -FileName $cmake_name
$json = New-Object PSObject
(New-Object PSObject | Add-Member -PassThru NoteProperty bin $new_name | Add-Member -PassThru NoteProperty cmake $cmake_name | Add-Member -PassThru NoteProperty commit $env:APPVEYOR_REPO_COMMIT) | ConvertTo-JSON | Out-File -FilePath "latest-$env:target_arch" -Encoding ASCII
Push-AppveyorArtifact "latest-$env:target_arch"
test: off