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 in manifest mode #40

Merged
merged 9 commits into from
Apr 11, 2024
Merged

Conversation

janisozaur
Copy link
Member

This updates our usage of vcpkg from "classic" to "manifest" mode. Manifest mode uses vcpkg.json to detect which packages are needed.

I encountered several issues when doing that switch, initially planned for Windows only:

  1. vcpkg auto-detects presence of vcpkg.json, prompting me to update macos jobs at the same time
  2. many packages changed, some no longer build cleanly for universal macos and required manual cleanup of LC_ID_DYLIB, LC_RPATH, LC_LOAD_DYLIB. Inspired by code already present for libzip, I updated freetype/brotli and left checks in place to detect possible issues of that kind in the future
  3. I updated all the actions used to current versions
  4. Got annoyed with the turn-around times for building macos packages and split arm64 and x86_64 builds into their own jobs to be done in parallel
  5. Due to issues with building OpenSSL, I switched to LibreSSL, which is quite well supported and API-compatible with OpenSSL.

I have requested users to test macos builds with those libraries and they came back positive. Tests included:

  1. master server listing
  2. joining multiplayer
  3. using TTF (so CJK languages should work no worse than in regular version)
  4. sounds playing correctly
  5. screenshot working
  6. if discord-rpc worked earlier for you, then that as well

I tested Windows builds with updated libraries myself.

janisozaur and others added 9 commits April 6, 2024 23:37
This uses vcpkg's "manifest mode" where packages are read from
`vcpkg.json`. As vcpkg automatically detects presence on `vcpkg.json`
and switches to manifest mode, this required reworking how macOS
libraries are built. I opted to split building of packages into
per-architecture jobs to speed up the builds.
LibreSSL is API-compatible with OpenSSL, but much easier to build.
@janisozaur
Copy link
Member Author

  • benchmark 1.7.1 -> 1.8.3
  • breakpad v2022.07.12 -> v2023.01.27
  • discord-rpc 3.4.0 (no change)
  • freetype 2.12.1 -> 2.13.2
  • brotli (freetype dependency) 1.0.9 -> 1.1.0
  • fribidi 1.0.12 -> 1.0.13
  • gtest 1.13.0 -> 1.14.0
  • icu 72.1 -> 74.2
  • libflac 1.4.2 -> 1.4.3
  • libogg 1.3.5 (no change)
  • libpng 1.6.39 -> 1.6.43
  • libvorbis 1.3.7 (no change)
  • libzip 1.9.2 -> 1.10.1
  • nlohmann-json 3.11.2 -> 3.11.3
  • openal-soft 1.23.0 -> 1.23.1
  • openssl 3.1.0 -> libressl 3.8.2
  • sdl2 2.26.4 -> 2.30.0
  • speexdsp 1.2.1 (no change)
  • zlib 1.2.13 -> 1.3.1

git diff c9f906558f9bb12ee9811d6edc98ec9255c6cda5..11ed79186fe850bd3a98cfbf1854514d2b3070a2 ports/<library>/vcpkg.json in vcpkg repo

@marijnvdwerf
Copy link

marijnvdwerf commented Apr 11, 2024

Builds tested on macOS 12.6.2 (M1 Max), retina

  • Graphics work correctly (only tested windowed mode)
  • Could fetch server list
  • Japanese rendered succesfully
  • Sound played

Found an issue with Show dirty visuals (only supported in 'Software (Hardware displ' it seems?)
The dirty rectangles only cover 1/4th of the viewport.
image

Update: Dirty visuals are also broken on 0.4.10, so no regression here.

@janisozaur
Copy link
Member Author

I've filed OpenRCT2/OpenRCT2#21768 for the dirty visuals issue

@janisozaur janisozaur merged commit c4023e3 into OpenRCT2:master Apr 11, 2024
7 checks passed
@janisozaur janisozaur deleted the vcpkg-manifest branch April 11, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants