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

Use vcpkg for providing dependencies. #37

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from
Open

Use vcpkg for providing dependencies. #37

wants to merge 19 commits into from

Conversation

DorianBDev
Copy link
Member

Description

Use vcpkg for providing third party dependencies. This is the continuation of @agatti work on #36.

Affected area(s)

  • Core
  • GUI
  • Tests

Changes type

  • Bug fix
  • Migration
  • New feature
  • Feature rework

@DorianBDev DorianBDev self-assigned this Sep 17, 2024
@DorianBDev DorianBDev added the enhancement New feature or request label Sep 17, 2024
@DorianBDev DorianBDev linked an issue Sep 17, 2024 that may be closed by this pull request
@DorianBDev
Copy link
Member Author

Some notes on vcpkg usage:

  • Pinning dependencies' versions is a pain.
  • Cache is huge (~18gb on my machine, mainly because of Qt).
  • Porting the "deploy" CIs might be difficult.
  • Porting the Windows CIs might be difficult.
  • Initial compile time exploded, due to dependency building (maybe a good x3).
  • Qt through vcpkg implies having a bunch of dependencies pre-installed (~14 for debian-based distros, since Qt is built from source now).

@DorianBDev
Copy link
Member Author

vcpkg and github-actions have an issue with Qt and CI caching... Which force to rebuild Qt every time the CI is run. A PR is available here microsoft/vcpkg-tool#1043 but not merged. This doubles the CI execution times.

@DorianBDev
Copy link
Member Author

DorianBDev commented Sep 27, 2024

After further exploration of VCPKG and Windows :

  • Qt6 has removed Angle support, which was very useful under Windows as a fallback solution when no OpenGL runtime is found. The alternative is to use the mesa llvmpipe software renderer, which we have to provide via a dynamic library with vcpkg... Which requires to build LLVM locally. A no go for me.
  • Since we use QtInstallerFramework as installer system for Degate, and since VCPKG doesn't have a port for it, we'll still have to use Qt dependency in the deploy CIs.
  • Having to build Qt locally to work on Degate (or even in the CIs) is an issue for disk space and initial building time.

About all this, I think I'll try to create a hybrid system in which CMakeLists.txt will try to use the local version of a library (for example, provided by the system's package manager), or, if nothing has been found, it will use VCPKG. The deploy CIs/system will then only work if Qt6, QInstallerFramework and mesa llvmpipe dll (Windows only) are available locally (not via VCPKG).

Edit: windeployqt.exe is also so broken when provided by VCPKG... It create a non-working deploy folder, and copy useless things, bloating everything.

Also tried fixing the windows CI, windeployqt.exe is so broken
on Windows...
@Pospelove
Copy link

Cache is huge (~18gb on my machine, mainly because of Qt).

There is an option for cleaning the buildtrees and downloads folder of vcpkg after build:
See https://github.com/skyrim-multiplayer/skymp/blob/main/CMakeLists.txt#L25

Regards,
Yet Another Person Who Suffers From GHA Cache Limits

@DorianBDev
Copy link
Member Author

There is an option for cleaning the buildtrees and downloads folder of vcpkg after build: See https://github.com/skyrim-multiplayer/skymp/blob/main/CMakeLists.txt#L25

Thanks for the advice!

Regards, Yet Another Person Who Suffers From GHA Cache Limits

I feel this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate a C++ package manager in the build process
3 participants