Fix "Free space on disk" in new torrent dialog
[qBittorrent.git] / .appveyor.yml
blobfb3471120d75529306eda49109da39fe2a41cdcc
1 version: '{branch}-{build}'
3 # Do not build on tags (GitHub only)
4 skip_tags: true
6 image: Visual Studio 2022
8 branches:
9   except:  # blacklist
10     - coverity_scan
12 environment:
13   REPO_DIR: &REPO_DIR c:\qbittorrent
14   CACHE_DIR: &CACHE_DIR c:\qbt_cache
16   QBT_VER_URL: https://builds.shiki.hu/appveyor/version_64
17   QBT_LIB_URL: https://builds.shiki.hu/appveyor/qbt_libraries_64.7z
19 # project directory
20 clone_folder: *REPO_DIR
22 # cache size should < 100MB (after compressing with fastest option):
23 # see: https://www.appveyor.com/docs/build-cache#save-update-cache-before-build-finishes
24 cache:
25   - *CACHE_DIR
27 clone_depth: 50
29 install:
30   # check if library needs update
31   - appveyor DownloadFile "%QBT_VER_URL%" -FileName "c:\version_new" && SET /P newVersion=<"c:\version_new"
32   - IF EXIST "%CACHE_DIR%\version" (SET /P oldVersion=<"%CACHE_DIR%\version")
33   - IF NOT EXIST "%CACHE_DIR%\version" (SET updateCache=1)
34   - IF NOT "%oldVersion%" == "%newVersion%" (SET updateCache=1)
35   # update library
36   - IF "%updateCache%" == "1" (ECHO "--- Will redownload libraries ---" &&
37       RMDIR /S /Q "%CACHE_DIR%" & MKDIR "%CACHE_DIR%" &&
38       appveyor DownloadFile "%QBT_LIB_URL%" -FileName "c:\qbt_lib.7z" && 7z x "c:\qbt_lib.7z" -o"%CACHE_DIR%" > nul &&
39       COPY "c:\version_new" "%CACHE_DIR%\version")
40   # Qt stay compressed in cache
41   - 7z x "%CACHE_DIR%\qt5_64.7z" -o"c:\qbt" > nul
43 before_build:
44   # setup env
45   - CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
46   - SET PATH=%PATH%;C:\Qt\5.15.2\msvc2019_64\bin;%CACHE_DIR%\jom
47   # setup project
48   - COPY /Y "%CACHE_DIR%\conf.pri" "%REPO_DIR%"
49   # workarounds
50   - MKLINK /J "c:\qbt\base" "%CACHE_DIR%\base"
52 build_script:
53   - cd "%REPO_DIR%"
54   # scan only as lupdate is prone to hang
55   - lupdate -extensions c,cpp,h,hpp,ui .
56   - qmake qbittorrent.pro && cd src && qmake src.pro
57   - jom -j2 -f Makefile.Release
59 after_build:
60   - cd "%REPO_DIR%"
61   - MKDIR upload
62   - COPY dist\windows\qt.conf upload
63   - COPY src\release\qbittorrent.exe upload
64   - COPY src\release\qbittorrent.pdb upload
65   - COPY "%CACHE_DIR%\base\bin\libcrypto-1_1-x64.dll" upload
66   - COPY "%CACHE_DIR%\base\bin\libssl-1_1-x64.dll" upload
67   - COPY "%CACHE_DIR%\base\lib\torrent-rasterbar.dll" upload
68   - COPY "%CACHE_DIR%\base\lib\zlib1.dll" upload
69   - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Core.dll upload
70   - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Gui.dll upload
71   - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Network.dll upload
72   - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Sql.dll upload
73   - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Svg.dll upload
74   - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Widgets.dll upload
75   - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5WinExtras.dll upload
76   - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Xml.dll upload
77   - MKDIR upload\plugins\iconengines
78   - COPY C:\Qt\5.15.2\msvc2019_64\plugins\iconengines\qsvgicon.dll upload\plugins\iconengines
79   - MKDIR upload\plugins\imageformats
80   - COPY C:\Qt\5.15.2\msvc2019_64\plugins\imageformats\qico.dll upload\plugins\imageformats
81   - COPY C:\Qt\5.15.2\msvc2019_64\plugins\imageformats\qsvg.dll upload\plugins\imageformats
82   - MKDIR upload\plugins\platforms
83   - COPY C:\Qt\5.15.2\msvc2019_64\plugins\platforms\qwindows.dll upload\plugins\platforms
84   - MKDIR upload\plugins\sqldrivers
85   - COPY C:\Qt\5.15.2\msvc2019_64\plugins\sqldrivers\qsqlite.dll upload\plugins\sqldrivers
86   - MKDIR upload\plugins\styles
87   - COPY C:\Qt\5.15.2\msvc2019_64\plugins\styles\qwindowsvistastyle.dll upload\plugins\styles
89 test: off
91 artifacts:
92   - path: upload
93     name: qBittorrent-Appveyor_Windows-x64