1 version: '{branch}-{build}'
3 # Do not build on tags (GitHub only)
6 image: Visual Studio 2022
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
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
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)
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")
43 - CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
44 - SET PATH=%PATH%;C:\Qt\5.15.2\msvc2019_64\bin;%CACHE_DIR%\jom
46 - COPY /Y "%CACHE_DIR%\conf.pri" "%REPO_DIR%"
49 - MKLINK /J "c:\qbt\base" "%CACHE_DIR%\base"
53 # lupdate chokes when it parses headers from system includes, especially Boost
54 # it also chokes with the sources from src/app/qtlocalpeer (formerly qtsingleapplication)
55 # Workaround: temporarily rename them to run lupdate with the .pro file
56 - RENAME conf.pri conf.pri.temp
57 - RENAME src\app\qtlocalpeer qtlocalpeer.temp
58 - lupdate qbittorrent.pro
59 - RENAME conf.pri.temp conf.pri
60 - RENAME src\app\qtlocalpeer.temp qtlocalpeer
61 - qmake qbittorrent.pro && cd src && qmake src.pro
62 - jom -j2 -f Makefile.Release
67 - COPY dist\windows\qt.conf upload
68 - COPY src\release\qbittorrent.exe upload
69 - COPY src\release\qbittorrent.pdb upload
70 - COPY "%CACHE_DIR%\base\bin\libcrypto-1_1-x64.dll" upload
71 - COPY "%CACHE_DIR%\base\bin\libcrypto-1_1-x64.pdb" upload
72 - COPY "%CACHE_DIR%\base\bin\libssl-1_1-x64.dll" upload
73 - COPY "%CACHE_DIR%\base\bin\libssl-1_1-x64.pdb" upload
74 - COPY "%CACHE_DIR%\base\bin\torrent-rasterbar.dll" upload
75 - COPY "%CACHE_DIR%\base\bin\torrent-rasterbar.pdb" upload
76 - COPY "%CACHE_DIR%\base\lib\zlib1.dll" upload
77 - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Core.dll upload
78 - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Gui.dll upload
79 - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Network.dll upload
80 - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Sql.dll upload
81 - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Svg.dll upload
82 - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Widgets.dll upload
83 - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5WinExtras.dll upload
84 - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Xml.dll upload
85 - MKDIR upload\plugins\iconengines
86 - COPY C:\Qt\5.15.2\msvc2019_64\plugins\iconengines\qsvgicon.dll upload\plugins\iconengines
87 - MKDIR upload\plugins\imageformats
88 - COPY C:\Qt\5.15.2\msvc2019_64\plugins\imageformats\qico.dll upload\plugins\imageformats
89 - COPY C:\Qt\5.15.2\msvc2019_64\plugins\imageformats\qsvg.dll upload\plugins\imageformats
90 - MKDIR upload\plugins\platforms
91 - COPY C:\Qt\5.15.2\msvc2019_64\plugins\platforms\qwindows.dll upload\plugins\platforms
92 - MKDIR upload\plugins\sqldrivers
93 - COPY C:\Qt\5.15.2\msvc2019_64\plugins\sqldrivers\qsqlite.dll upload\plugins\sqldrivers
94 - MKDIR upload\plugins\styles
95 - COPY C:\Qt\5.15.2\msvc2019_64\plugins\styles\qwindowsvistastyle.dll upload\plugins\styles
101 name: qBittorrent-Appveyor_Windows-x64