qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
27.84k stars 3.93k forks source link

Build instructions for Windows and Debian are out-of-date and post-build does not deploy all required dlls on Windows #21603

Open D-0000000000 opened 1 week ago

D-0000000000 commented 1 week ago

qBittorrent & operating system versions

Qt: 6.7.3 Libtorrent: 2.0.10.0 Boost: 1.85.0 OpenSSL: 3.3.2 zlib: 1.3.1 Windows 11 x64 23H2 22621.4317

What is the problem?

Build instruction for qbittorrent 5.0.0 on Windows and Debian is out-of-date. On Debian those packages are needed for Qt6 qt6-base-dev qt6-base-private-dev qt6-svg-dev qt6-tools-dev qt6-tools-private-dev. libtorrent-rasterbar on current Debian stable (bookworm) does not meet requirements. There are some problems with post-build on Windows. Cannot launch qBittorrent because some dlls are not copied to install dir.

Steps to reproduce

  1. Configure vcpkg
  2. Install boost-circular-buffer boost-stacktrace openssl qtbase qtsvg qttools libtorrent on vcpkg
  3. Run cmake -G "Ninja" -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="C:\path\to\vcpkg\scripts\buildsystems\vcpkg.cmake" -DMSVC_RUNTIME_DYNAMIC=OFF
  4. Run cmake --build build
  5. Launch qBittorrent

Additional context

If nothing was changed in step 2, step 4 would got some errors like #20805 . To solve this problem, build configurations for Qt6 in vcpkg need some patch to build with C++20. I don't think it is a good idea because if vcpkg update Qt6 we need to patch these again. Is there any good solution for this? Post-build looks fine. There are lots of dlls and qbittorrent.exe qbittorrent.pdb. But qBittorrent cannot be launched because no Qt6 platform plugins. Post-build does not deploy Qt6 platform plugins. I need to manually copy plugins from vcpkg to qBittorrent dir. Now qBittorrent can start but no icons. I think qtsvg is missing so I copy all dlls to qBittorrent.(I only use vcpkg to build qBittorrent so copying all dlls is ok) Then everything looks normal. I also tried to build on Debian trixie and got no problem. The only one need to changed in instructions for Debian is installed Qt6 packages not Qt5.

Log(s) & preferences file(s)

No logs. But if needed it's same as #20805 .

Edit: I forgot to explain something. I didn't use -DVCPKG_TARGET_TRIPLET="x64-windows-static". I want to build a dynamic linked binary since it's more compact. Static linked pdb file is much bigger. I think there should be an option to choose static or dynamic or explain why static linkage is mandatory. -DVCPKG_TARGET_TRIPLET="x64-windows-static" has the same issue but no need to copy dlls.

HanabishiRecca commented 1 week ago

Related:

userdocs commented 1 week ago

I can't even remember how I provided this page nor how to provide edits or changes for it now, it just seems locked down and a barrier to contribution.

https://github.com/qbittorrent/qBittorrent/wiki/Compilation-Alpine-Linux/143a77a9f39d7e85229d26e26f4c202333cfcc20

There are things I'd change in it if there was some reasonable sensible way to approach it, like a /docs folder + a pull request.

I'm not sure how to even approach it now.

Write it somewhere else, open a pr, ask for someone to manually merge it? Feels difficult.

sledgehammer999 commented 1 week ago

Wiki pages are edited via PR in this repo:

I can't even remember how I provided this page nor how to provide edits or changes for it now, it just seems locked down and a barrier to contribution.

https://github.com/qbittorrent/qBittorrent/wiki/Compilation-Alpine-Linux/143a77a9f39d7e85229d26e26f4c202333cfcc20

There are things I'd change in it if there was some reasonable sensible way to approach it, like a /docs folder + a pull request.

I'm not sure how to even approach it now.

Write it somewhere else, open a pr, ask for someone to manually merge it? Feels difficult.

Look at the very top of the wiki home page for instructions

userdocs commented 1 week ago

Thanks, I missed that bit, I guess for always going directly to the page and not really understanding what changed, but this closed issue does explain why - https://github.com/qbittorrent/wiki/issues/1

I must have done it when the wiki was open. So i'll just do a pr there.