Update vcpkg baseline commit
Pull Request Prelude
- [x] I have followed proper The Forgotten Server code styling.
- [x] I have read and understood the contribution guidelines before making this PR.
- [x] I am aware that this PR may be closed if the above-mentioned criteria are not fulfilled.
Changes Proposed
Issues addressed:
How to test:
Please fix the builds
can you try do this for VS project? Solution Explorer -> Properties -> Configuration Properties -> C/C++ -> Command Line -> Additional Options -> add "/utf-8" While ago, I faced the same issue :|
error from build job
Error:
C:\a\forgottenserver\forgottenserver\build\vcpkg_installed\x64-windows\include\fmt\base.h(458): error C2338: static_assert failed: 'Unicode support requires compiling with /utf-8'
@ranisalt Build fails in VS22 after that change!
I removed vcpkg_installed, updated vcpkg to newest commit, replaced baseline in vcpkg.json to ef7dbf94b9198bc58f45951adcf1f041fcbc5ea0 and tried to compile Debug x64 build in Visual Studio. It failed with error:
Severity Code Description Project File Line Suppression State Details
Error C2338 static_assert failed: 'Unicode support requires compiling with /utf-8' theforgottenserver C:\ots\forgottenserver\vcpkg_installed\x64-windows\x64-windows\include\fmt\base.h 458
can you try do this for VS project? Solution Explorer -> Properties -> Configuration Properties -> C/C++ -> Command Line -> Additional Options -> add "/utf-8" While ago, I faced the same issue :|
I have this already set in VS by default TFS config:
https://github.com/otland/forgottenserver/blob/191ebb5084a635a51d1dccc75ebf801a94bf98ef/vc17/theforgottenserver.vcxproj#L160
but it does not fix compilation problem. It should be set for vcpkg fmt compilation probably, not for TFS project.
To fix VS compilation problem I had to add:
#define FMT_UNICODE 0
under: https://github.com/otland/forgottenserver/blob/c8f06250eada35315c2ab789f0f7593fdbfadac2/src/otpch.h#L8
No credits for that, I just clicked 'GitHub Copilot' in VS and it was second answer 😄 (after add /utf-8 to properties, which was already set).
I also tested Docker and CMake build on Windows and both works.
It seems that vcpkg already does that, but half assed like everything else Microsoft touches
I can't install Visual Studio
Huh. How come it worked 😆
@ranisalt @ArturKnopik
Huh. How come it worked 😆
It did not! It only worked for cmake Windows build, not VS compiler build.
EDIT:
I found problem with VS. This line (<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>):
https://github.com/otland/forgottenserver/pull/4793/files#diff-1b32b5497a1881aca6a2c3d9ea7672360483601484fa6713394cbd9a98ddec79R155
Should be added here:
https://github.com/otland/forgottenserver/blob/9736af0287d2c0d1bec27b943e9cf3d9aa07f96f/vc17/settings.props#L17
To make it work in all 4 possible builds, not just in Release x64