Skip to content

Commit c15ddbc

Browse files
committed
Add appveyor support
1 parent a19e2e4 commit c15ddbc

2 files changed

Lines changed: 54 additions & 1 deletion

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
qBittorrent - A BitTorrent client in Qt
22
------------------------------------------
33

4-
[![Build Status](https://travis-ci.org/qbittorrent/qBittorrent.svg?branch=master)](https://travis-ci.org/qbittorrent/qBittorrent)
4+
[![TravisCI Status](https://travis-ci.org/qbittorrent/qBittorrent.svg?branch=master)](https://travis-ci.org/qbittorrent/qBittorrent)
5+
[![AppVeyor Status](https://ci.appveyor.com/api/projects/status/github/qbittorrent/qBittorrent?branch=master&svg=true)](https://ci.appveyor.com/project/qbittorrent/qBittorrent)
56
[![Coverity Status](https://scan.coverity.com/projects/5494/badge.svg)](https://scan.coverity.com/projects/5494)
67
********************************
78
### Description:

appveyor.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
version: '{branch}-{build}'
2+
3+
# Do not build on tags (GitHub only)
4+
skip_tags: true
5+
6+
os: Visual Studio 2015
7+
8+
environment:
9+
REPO_DIR: &REPO_DIR c:\qbittorrent
10+
CACHE_DIR: &CACHE_DIR c:\qbt_cache
11+
12+
QBT_VER_URL: http://builds.shiki.hu/appveyor/version
13+
QBT_LIB_URL: http://builds.shiki.hu/appveyor/qbt_libraries.7z
14+
15+
# project directory
16+
clone_folder: *REPO_DIR
17+
18+
# cache size should < 100MB (after compressing with fastest option):
19+
# see: https://www.appveyor.com/docs/build-cache#save-update-cache-before-build-finishes
20+
cache:
21+
- *CACHE_DIR
22+
23+
install:
24+
# check if library needs update
25+
- appveyor DownloadFile "%QBT_VER_URL%" -FileName "c:\version_new" && SET /P newVersion=<"c:\version_new"
26+
- IF EXIST "%CACHE_DIR%\version" (SET /P oldVersion=<"%CACHE_DIR%\version")
27+
- IF NOT EXIST "%CACHE_DIR%\version" (SET updateCache=1)
28+
- IF NOT "%oldVersion%" == "%newVersion%" (SET updateCache=1)
29+
# update library
30+
- IF "%updateCache%" == "1" (ECHO "--- Will redownload libraries ---" &&
31+
RMDIR /S /Q "%CACHE_DIR%" & MKDIR "%CACHE_DIR%" &&
32+
appveyor DownloadFile "%QBT_LIB_URL%" -FileName "c:\qbt_lib.7z" && 7z x "c:\qbt_lib.7z" -o"%CACHE_DIR%" > nul &&
33+
COPY "c:\version_new" "%CACHE_DIR%\version")
34+
# Qt stay compressed in cache
35+
- 7z x "%CACHE_DIR%\qt5_32.7z" -o"c:\qbt" > nul
36+
37+
before_build:
38+
# setup env
39+
- CALL "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat"
40+
- SET PATH=%PATH%;c:\qbt\qt5_32\bin;%CACHE_DIR%\jom;
41+
# setup project
42+
- COPY /Y "%CACHE_DIR%\winconf.pri" "%REPO_DIR%"
43+
- COPY /Y "%CACHE_DIR%\winconf-msvc.pri" "%REPO_DIR%"
44+
# workarounds
45+
- MKLINK /J "c:\qbt\base" "%CACHE_DIR%\base"
46+
47+
build_script:
48+
- cd "%REPO_DIR%"
49+
- qmake qbittorrent.pro && cd src && qmake src.pro
50+
- jom -j2 -f Makefile.Release
51+
52+
test: off

0 commit comments

Comments
 (0)