Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this issue Oct 13, 2024 · 5 comments

Comments

@D-0000000000
Copy link

D-0000000000 commented Oct 13, 2024

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.

@D-0000000000 D-0000000000 changed the title Build instructions for Windows and Debian are out-of-date and post-build does not deploy all required dlls Build instructions for Windows and Debian are out-of-date and post-build does not deploy all required dlls on Windows Oct 13, 2024
@HanabishiRecca
Copy link
Contributor

@userdocs
Copy link

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
Copy link
Member

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
Copy link

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 - qbittorrent/wiki#1

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

@D-0000000000
Copy link
Author

I wrote a short guide for Windows.
qbittorrent/wiki#15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants