Merge pull request #143 from TheOneRing/windows-ci
[quassel.git] / appveyor.yml
1 version: '{build}'
2 build_script:
3 - ps: |
4     if ( !(Test-Path "$env:APPVEYOR_BUILD_FOLDER\work\appveyorHelp.psm1"))
5     {
6         mkdir $env:APPVEYOR_BUILD_FOLDER\work\
7         Start-FileDownload https://raw.githubusercontent.com/TheOneRing/appVeyorHelp/master/appveyorHelp.psm1 -FileName $env:APPVEYOR_BUILD_FOLDER\work\appveyorHelp.psm1
8     }
9     $ErrorActionPreference="Stop"
10
11     Import-Module $env:APPVEYOR_BUILD_FOLDER\work\appveyorHelp.psm1
12
13     Init @("ninja", "png2ico", "nsis") ([ordered]@{"git://anongit.kde.org/extra-cmake-modules.git" = @{"branch" = "master"};
14                                  "https://github.com/Snorenotify/SnoreGrowl.git" = @{"branch" = "v0.4.0"; "buildType" = "Release"};
15                                  "git://anongit.kde.org/snorenotify.git" = @{"branch" = "v0.6.0"; "buildType" = "Release"}})
16
17
18     mkdir -Force $env:APPVEYOR_BUILD_FOLDER\work\build\$env:APPVEYOR_PROJECT_NAME
19     cd $env:APPVEYOR_BUILD_FOLDER\work\build\$env:APPVEYOR_PROJECT_NAME
20     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 -DWITH_WEBKIT=OFF
21     CmakeImageInstall
22
23     $imageDir = CreateDeployImage @(
24                             # whitelist
25                             #quassel
26                             "quassel.*",
27                             #
28                             #gccruntime",
29                             "bin\\libgomp.*\.dll",
30                             "bin\\libgcc_s_.*\.dll",
31                             "bin\\libwinpthread.*\.dll",
32                             "bin\\libstdc.*\.dll",
33                             #
34                             #snore
35                             "bin\\.*snore.*\.dll",
36                             "lib\\plugins\\libsnore.*\\libsnore_backend.*\.dll",
37                             "lib\\plugins\\libsnore.*\\libsnore_secondary_backend.*\.dll",
38                             #snorenotify 0.5
39                             "lib\\libsnore.*\\libsnore_backend.*\.dll",
40                             #
41                             "bin\\SnoreToast\.exe",
42                             #
43                             #Growl
44                             "bin\\.*snoregrowl.*\.dll",
45                             #
46                             #ssl
47                             "bin\\libeay32\.dll",
48                             "bin\\ssleay32\.dll",
49                             #
50                             #icu
51                             "bin\\icuin\d+\.dll",
52                             "bin\\icuuc\d+\.dll",
53                             "bin\\icudt\d+\.dll",
54                             #
55                             #qt
56                             "bin\\Qt5Core\.dll",
57                             "bin\\Qt5Declarative\.dll",
58                             "bin\\Qt5Gui\.dll",
59                             "bin\\Qt5Network\.dll",
60                             "bin\\Qt5Opengl\.dll",
61                             "bin\\Qt5Multimedia\.dll",
62                             "bin\\Qt5MultimediaWidgets\.dll",
63                             "bin\\Qt5Qml\.dll",
64                             "bin\\Qt5Quick\.dll",
65                             "bin\\Qt5Script\.dll",
66                             "bin\\Qt5Sql\.dll",
67                             "bin\\Qt5Widgets\.dll",
68                             "bin\\Qt5XmlPatterns\.dll",
69                             "bin\\.*libglesv2\.dll",
70                             "bin\\.*libEGL\.dll",
71                             "qml\\.*",
72                             #bin\\QtXml\.dll
73                             #
74                             "plugins\\imageformats\\(?!.*d\.dll).*\.dll$",
75                             "plugins\\sqldrivers\\qsqlite(?!.*d\.dll).*\.dll$",
76                             "plugins\\codecs\\(?!.*d\.dll).*\.dll$",
77                             "plugins\\platforms\\qwindows(?!.*d\.dll).*\.dll$",
78                             #
79                             #
80                             #zlib
81                             "bin\\libz.dll",
82                             #
83                             #qca
84                             "bin\\libqca.*\.dll",
85                             "lib\\qca-qt5\\crypto\\.*",
86                             "certs\\.*",
87                             #
88                             #phonon
89                             "bin\\libphonon.*\.dll",
90                             "bin\\phonon.*\.dll",
91                             "bin\\libphononexperimental.*\.dll",
92                             "bin\\phonon_backend\\.*",
93                             "plugins\\phonon_backend\\.*",
94                             "plugins\\phonon4qt5_backend\\.*") @(
95                             #blacklist
96                             ".*\.h",
97                             "lib\\plugins\\libsnore.*\\libsnore_backend_freedesktop\.dll"
98                             )
99
100     mv "$imageDir\bin\*" "$imageDir\"
101     #mv "$imageDir\lib\qca-qt5\crypto" "$imageDir\crypto"
102     mv "$imageDir\plugins\*" "$imageDir"
103     if(Test-Path "$imageDir\lib\plugins")
104     {
105         mv "$imageDir\lib\plugins\*" "$imageDir"
106     }
107     #snorenotify 0.5 plugins
108     if(Test-Path "$imageDir\lib\libsnore-qt5")
109     {
110         mv "$imageDir\lib\libsnore-qt5\*" "$imageDir"
111     }
112     rm -Recurse "$imageDir\plugins\*"
113     rm -Recurse "$imageDir\lib"
114     rm -Recurse "$imageDir\bin"
115     7ZipDeployImage
116     NsisDeployImage $env:APPVEYOR_BUILD_FOLDER\scripts\build\NullsoftInstaller.nsi
117
118 environment:
119     QT_VER: 5.5
120
121     matrix:
122     #mingw
123     - COMPILER: mingw492_32
124     #msvc
125     - COMPILER: msvc2013
126     - COMPILER: msvc2013_64
127
128 test: off
129
130 cache:
131     - work\install -> appveyor.yml
132     - C:\ProgramData\chocolatey\bin -> appveyor.yml
133     - C:\ProgramData\chocolatey\lib -> appveyor.yml
134     - work\appveyorHelp.psm1 -> appveyor.yml