ryzom / ryzomcore

Ryzom Core is the open-source project related to the Ryzom game. This community repository is synchronized with the Ryzom Forge repository, based on the Core branch.
https://wiki.ryzom.dev
GNU Affero General Public License v3.0
341 stars 90 forks source link

hunter package manager support #650

Closed nimetu closed 2 years ago

nimetu commented 3 years ago

This adds support to Hunter package manager to compile needed static external libraries.

Does not quite work with QT apps yet.

This should probably also bump cmake version to 3.16 (version I used under linux) as some packages (png, zlib I think) fail.

macOS not tested.

Use cmake option -DHUNTER_ENABLED=ON to enable hunter build

kaetemi commented 2 years ago

Neat. Is your luabind fork much different from this one https://github.com/Oberon00/luabind?

nimetu commented 2 years ago

Neat. Is your luabind fork much different from this one https://github.com/Oberon00/luabind?

My fork is older. Its from Kervala hq repo, so I think its same as used in live.

nimetu commented 2 years ago

I updated this to use core4 branch and are using ValyriaTear/luabind now.

kaetemi commented 2 years ago

Could you add a build script in azure-pipelines.yml to auto-build it under Windows with Hunter?

nimetu commented 2 years ago

I think gitlab-github sync force pushed over my changes.

kaetemi commented 2 years ago

Yikes, that gitlab sync is aggressive...

kaetemi commented 2 years ago

@ulukyn Can you please update your mirror settings to enable "Overwrite diverged branches" on pulling?

ulukyn commented 2 years ago

@kaetemi the current option are :

image

Keep divergent refs must be checked so?

kaetemi commented 2 years ago

Hm, no, that's the push option. That should remain off, otherwise the mirror will diverge. Is the pull option not visible?

ulukyn commented 2 years ago

Ok i have removed and created a new pull mirror and see the options. It's enabled now

kaetemi commented 2 years ago

Alright. Let's see if that works right. :)

nimetu commented 2 years ago

win2019 works fine(ish). I hope caching hunter cache folder works as compiling all the packages (openssl/luabind are slow to compile) takes about 40min otherwise.

nimetu commented 2 years ago

Direct3D / XAudio2 drivers need some work until they compile from DirectX from Win10 SDK. I think nuget has a package with missing files and might be possible to use that.

kaetemi commented 2 years ago

Apparently it might be possible to just download https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe and extract it with 7zip to C:\.

Let's try this 6525990b849ac4d0a12081cfcb5e624f9d5c40b4 c509410743460fee82ca44283cfb28b764f660f2 ...

kaetemi commented 2 years ago

I think it needs the whole c:/.hunter/_Base folder cached. It appears to be rebuilding still.

nimetu commented 2 years ago

I tried caching entire hunter folder, but next run failed to unpack it because of hard links error.

2021-11-24T19:16:09.7257064Z -- [hunter] HUNTER_ROOT: C:/.hunter
2021-11-24T19:16:09.7258382Z -- [hunter] [ Hunter-ID: fbdd94b | Toolchain-ID: c7d9676 | Config-ID: caac3d7 ]
2021-11-24T19:16:10.0886336Z -- [hunter] ZLIB_ROOT: C:/.hunter/_Base/fbdd94b/c7d9676/caac3d7/Install (ver.: 1.2.11-p1)
2021-11-24T19:16:10.1093602Z -- [hunter] Cache HIT: ZLIB
2021-11-24T19:16:10.1094495Z -- [hunter] Cache info: C:/.hunter/_Base/Cache/meta/c7d9676/ZLIB/1.2.11-p1/fbb8be7/da39a3e/a23c16c/e5fa44f/da39a3e/cache.sha1

I have this in the pipeline build log on second run. cmake task took less than 3min that time. cache is also per branch (I see you added dxsdk with different branch).

kaetemi commented 2 years ago

Ah, you're right. It's because of the branch.

kaetemi commented 2 years ago

Looks good, then.

kaetemi commented 2 years ago

Does this work on Linux as well, or is this Windows-only?

Supporting the Qt tools doesn't seem like a requirement, right now. They haven't been maintained properly.

nimetu commented 2 years ago

It will work on linux/windows/macOS. I will add them.

macOS currently has issues (probably Xcode 13 related) and hunter insists compiling both debug and release packages.

nimetu commented 2 years ago

ubuntu18 and macOS versions for hunter added. Changing to ubuntu20 is just a vmImage change, I used 18 because that I can actually run, ubuntu20 uses newer glibc so it does not work on my (ubuntu 18) home linux.