Modify Mac Deploy-Script for QtWebEngine
[quassel.git] / appveyor.yml
1 version: '{build}'
2 build_script:
3 - ps: |
4     $ErrorActionPreference="Stop"
5
6     Import-Module $env:APPVEYOR_BUILD_FOLDER\scripts\build\appveyorHelp.psm1
7
8     Init @("ninja", "png2ico", "nsis", "7zip.commandline") ([ordered]@{"git://anongit.kde.org/extra-cmake-modules.git" = @{"branch" = "master"};
9                                  "https://github.com/Snorenotify/SnoreGrowl.git" = @{"branch" = "v0.4.0"; "buildType" = "Release"};
10                                  "git://anongit.kde.org/snorenotify.git" = @{"branch" = "v0.7.0"; "buildType" = "Release"}})
11
12
13     mkdir -Force $env:APPVEYOR_BUILD_FOLDER\work\build\$env:APPVEYOR_PROJECT_NAME
14     cd $env:APPVEYOR_BUILD_FOLDER\work\build\$env:APPVEYOR_PROJECT_NAME
15
16     $webPrevOption = "-DWITH_WEBKIT=OFF -DWITH_WEBENGINE=ON"
17     $webPrevFiles = @(
18                       "bin\\Qt5Positioning\.dll",
19                       "bin\\Qt5PrintSupport\.dll",
20                       "bin\\Qt5Sensors\.dll",
21                       "bin\\Qt5WebChannel\.dll",
22                       "bin\\QtWebEngineProcess\.exe",
23                       "bin\\Qt5WebEngine\.dll",
24                       "bin\\Qt5WebEngineCore\.dll",
25                       "bin\\Qt5WebEngineWidgets\.dll",
26                       "resources\\icudtl\.dat",
27                       "resources\\qtwebengine_resources.pak",
28                       "resources\\qtwebengine_resources_100p.pak",
29                       "resources\\qtwebengine_resources_200p.pak")
30
31     if($env:COMPILER -eq "mingw49_32") {
32         $webPrevOption = "-DWITH_WEBKIT=OFF -DWITH_WEBENGINE=OFF"
33         $webPrevFiles = @()
34     }
35     
36     LogExec cmake -G"Ninja" $env:APPVEYOR_BUILD_FOLDER -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_ROOT" -DUSE_QT5=ON -DCMAKE_DISABLE_FIND_PACKAGE_Qt5DBus=ON $webPrevOption
37     CmakeImageInstall
38
39     $whitelist = @(
40                             # whitelist
41                             #quassel
42                             "quassel.*",
43                             #
44                             #gccruntime",
45                             "bin\\libgomp.*\.dll",
46                             "bin\\libgcc_s_.*\.dll",
47                             "bin\\libwinpthread.*\.dll",
48                             "bin\\libstdc.*\.dll",
49                             #
50                             #snore
51                             "bin\\.*snore.*\.dll",
52                             "lib\\plugins\\libsnore.*\\libsnore_backend.*\.dll",
53                             "lib\\plugins\\libsnore.*\\libsnore_settings_backend.*\.dll",
54                             "lib\\plugins\\libsnore.*\\libsnore_secondarybackend.*\.dll", "lib\\plugins\\libsnore.*\\libsnore_settings_secondarybackend.*\.dll", "bin\\SnoreToast\.exe",
55                             #
56                             #Growl
57                             "bin\\.*snoregrowl.*\.dll",
58                             #
59                             #ssl
60                             ".*\\libeay32\.dll",
61                             ".*\\ssleay32\.dll",
62                             #
63                             #icu
64                             "bin\\icuin\d+\.dll",
65                             "bin\\icuuc\d+\.dll",
66                             "bin\\icudt\d+\.dll",
67                             #
68                             #qt
69                             "bin\\Qt5Core\.dll",
70                             "bin\\Qt5Declarative\.dll",
71                             "bin\\Qt5Gui\.dll",
72                             "bin\\Qt5Network\.dll",
73                             "bin\\Qt5Opengl\.dll",
74                             "bin\\Qt5Multimedia\.dll",
75                             "bin\\Qt5MultimediaWidgets\.dll",
76                             "bin\\Qt5Qml\.dll",
77                             "bin\\Qt5Quick\.dll",
78                             "bin\\Qt5Script\.dll",
79                             "bin\\Qt5Sql\.dll",
80                             "bin\\Qt5WebChannel\.dll",
81                             "bin\\Qt5Widgets\.dll",
82                             "bin\\Qt5XmlPatterns\.dll",
83                             "bin\\.*libglesv2\.dll",
84                             "bin\\.*libEGL\.dll",
85                             "qml\\.*",
86                             #bin\\QtXml\.dll
87                             #
88                             "plugins\\imageformats\\(?!.*d\.dll).*\.dll$",
89                             "plugins\\sqldrivers\\qsqlite(?!.*d\.dll).*\.dll$",
90                             "plugins\\codecs\\(?!.*d\.dll).*\.dll$",
91                             "plugins\\platforms\\qwindows(?!.*d\.dll).*\.dll$",
92                             #
93                             #
94                             #zlib
95                             "bin\\libz.dll",
96                             #
97                             #qca
98                             "bin\\libqca.*\.dll",
99                             "lib\\qca-qt5\\crypto\\.*",
100                             "certs\\.*",
101                             #
102                             #phonon
103                             "bin\\libphonon.*\.dll",
104                             "bin\\phonon.*\.dll",
105                             "bin\\libphononexperimental.*\.dll",
106                             "bin\\phonon_backend\\.*",
107                             "plugins\\phonon_backend\\.*",
108                             "plugins\\phonon4qt5_backend\\.*")
109
110     $whitelist += $webPrevFiles
111
112     $imageDir = CreateDeployImage $whitelist @(
113                             #blacklist
114                             "include",
115                             ".*\.h",
116                             "lib\\plugins\\libsnore.*\\libsnore_backend_freedesktop\.dll",
117                             ".*\.pdb",
118                             ".*plugind\.dll"
119                             )
120
121     mv "$imageDir\bin\*" "$imageDir\"
122     #mv "$imageDir\lib\qca-qt5\crypto" "$imageDir\crypto"
123     mv "$imageDir\qml\*" "$imageDir"
124     mv "$imageDir\plugins\*" "$imageDir"
125     if(Test-Path "$imageDir\lib\plugins")
126     {
127         mv "$imageDir\lib\plugins\*" "$imageDir"
128     }
129     if(Test-Path "$imageDir\resources")
130     {
131         mv "$imageDir\resources\*" "$imageDir"
132     }
133     DeleteEmptyFodlers $imageDir
134     7ZipDeployImage
135     NsisDeployImage $env:APPVEYOR_BUILD_FOLDER\scripts\build\NullsoftInstaller.nsi
136
137 environment:
138     QT_VER: 5.6
139
140     matrix:
141     #msvc
142     - COMPILER: msvc2015_64
143     - COMPILER: msvc2015
144
145     #mingw
146     - COMPILER: mingw49_32
147
148 test: off
149
150 cache:
151     - work\install -> appveyor.yml
152     - C:\ProgramData\chocolatey\bin -> appveyor.yml
153     - C:\ProgramData\chocolatey\lib -> appveyor.yml