Feature/protobuf savedata#370
Conversation
PuppetMasterHex
commented
Apr 4, 2026
- Added protobuf save feature and made it the new default
- Saving -> ProtoSave::SaveCharProtobuf
- Loading -> ProtoSave::LoadCharProtobuf
- Protobuf can export to JSON -> ProtoSave::SaveCharJSON
- Compatible with old save files
- First protobuf tries to parse the data
- If it fails there is a fallback to the old save loader
- Added dockerfile for easy compiling and testing
- Can volume mount hlds in the container and run the server there
- docker/run_server.sh copies the ms.so and config files before starting hlds for faster testing
- Minor improvements
- Compile multithreaded with -j8 on linux
- Made msstring::c_str() const
|
Sorry for the delay I'll get to looking at this soon, been busy these last few days. |
SaintWish
left a comment
There was a problem hiding this comment.
Seems windows fails to compile because of the find_package for protobuf (https://github.com/MSRevive/MasterSwordRebirth/actions/runs/23979449975/job/70516350440?pr=370)
|
Still a few todo debugs as well.
Also, what are the URLs in the .cfg files?
…On Thu, 9 Apr 2026 at 13:23, Saint Wish ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Seems windows fails to compile because of the find_package for protobuf (
https://github.com/MSRevive/MasterSwordRebirth/actions/
runs/23979449975/job/70516350440?pr=370)
------------------------------
On src/game/server/save/protosave.h
<#370 (comment)>
:
That license at the top would restrict anyone but you from ever modifying
this code, and is incompatible with the HL SDK and GPL3.0 license.
------------------------------
On src/game/server/save/protosave.cpp
<#370 (comment)>
:
That license at the top would restrict anyone but you from ever modifying
this code, and is incompatible with the HL SDK and GPL3.0 license.
Instead of using the C++ std filesystem please use the engine's filesystem
https://github.com/MSRevive/MasterSwordRebirth/blob/dev/
src/game/shared/filesystem_shared.h
------------------------------
On cmake/LinuxToolchain.cmake
<#370 (comment)>
:
I'm not sure why the compiler and compile flags are set here when they
were already set here https://github.com/MSRevive/
MasterSwordRebirth/blob/dev/CMakeLists.txt
—
Reply to this email directly, view it on GitHub
<#370 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA34IYSAF2FTUJEB5HU3GTT4U4JU5AVCNFSM6AAAAACXMUMW2KVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHM2DANZZGQ3TCNZTHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Good catch! |
1dfa5b8 to
df8479f
Compare
I have removed the debug comments, only kept the The .cfg files (and these URLs) come from the default .cfgs shipped with MSR, I have replaced the URLs with example.org |
The WindowsToolchain.cmake includes vcpkg but I cannot find the file included there. I think cpm would also work. |
df8479f to
d7540df
Compare
|
The preferred way for now is to just add them manually to thirdpart either just the code or if it needs to be compiled then the compiled form, like for example the libcurl. I tried using vcpkg once but had nothing but problems with it and git dependencies.
|
At some point we want to get rid of mslist and just use the appropriate standard lib option same for msstring. |
Signed-off-by: Genesis <10389486+PuppetMasterHex@users.noreply.github.com>
Signed-off-by: Genesis <10389486+PuppetMasterHex@users.noreply.github.com>
d7540df to
adb4bff
Compare
I have added cmake/protobuf.cmake that uses CPM to fetch and build protobuf for windows, but I cannot test if the target_link_libaries works for |
adb4bff to
85db73d
Compare
|
If it fails to build again on windows I can just merge it and work on it when I have time |
|
Sorry I don't remember why specifically but whatever I was doing, it was
trying to get the Linux build to build in both GitHub and in a local Ubuntu.
If everything works without it then it can be removed.
…On Sun, 12 Apr 2026 at 08:40, Saint Wish ***@***.***> wrote:
*SaintWish* left a comment (MSRevive/MasterSwordRebirth#370)
<#370 (comment)>
If it fails to build again on windows I can just merge it and work on it
when I have time
—
Reply to this email directly, view it on GitHub
<#370 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA34IYUIZRV5EOQEEMCV3Z34VLCUTAVCNFSM6AAAAACXMUMW2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DEMZQGMYDKMZSG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
…onfigs Signed-off-by: Genesis <10389486+PuppetMasterHex@users.noreply.github.com>
The data is not modified in the function so it should be const Signed-off-by: Genesis <10389486+PuppetMasterHex@users.noreply.github.com>
85db73d to
169ac65
Compare
Also committed the protoc generated files since BPM doesnt support a two stage build to build protoc before running 'cmake -B' Signed-off-by: Genesis <10389486+PuppetMasterHex@users.noreply.github.com>
With the fedora dockerfile setting the paths manually is not necessary anymore Signed-off-by: Genesis <10389486+PuppetMasterHex@users.noreply.github.com>
169ac65 to
5f4a8d6
Compare
|
I'm trying to fix the build for Ubuntu, but it doesn't feel sane. The cmake find_package for opengl and protobuf is broken. It only works partially and fails to find existing libraries (like the OPENGL_gl_LIBRARY and OPENGL_glx_LIBRARY) OTOH the fedora dockerfile at docker/Dockerfile just installs the packages and the build works out of the box. |
|
Yeah I struggled with Ubuntu - CMake is meant to solve these problems
but... doesn't.
…On Tue, 14 Apr 2026 at 22:39, PuppetMasterHex ***@***.***> wrote:
*PuppetMasterHex* left a comment (MSRevive/MasterSwordRebirth#370)
<#370 (comment)>
I'm trying to fix the build for Ubuntu, but it doesn't feel sane.
The cmake find_package for opengl and protobuf is broken. It only works
partially and fails to find existing libraries (like the OPENGL_gl_LIBRARY
and OPENGL_glx_LIBRARY)
OTOH the fedora dockerfile at docker/Dockerfile just installs the packages
and the build works out of the box.
—
Reply to this email directly, view it on GitHub
<#370 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA34IYXJ4TVPG7EGE5NKND34VYWORAVCNFSM6AAAAACXMUMW2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DENBTHEZDSMBYGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I think the easiest way to get it to work is to provide the protoc executable and then set up the target Is there anything missing for this pull request? |
|
Sorry for the long wait, it looks like it has a problem with the submodules parameter in the workflow, but I think that can probably be removed since we don't use git submodules. For the Windows related build issues I can work on so not worried about those. |
f00cb33 to
023bbad
Compare
|
I have removed the |
023bbad to
8feed30
Compare
|
Strange in my local tests ${{github.workspace}} is the same as $GITHUB_WORKSPACE but here on github its not and checkout@v4 checks the code out in $GITHUB_WORKSPACE. Pushed a change that uses $GITHUB_WORKSPACE, hmm github actions is really weird Edit: seems to be a known bug that may or may not be fixed actions/runner#2058 |
|
Yeah not surprising, Github actions do be weird sometimes. Looks like that fixed that issue, now it's just missing a package it looks like? |
57cea33 to
c3025af
Compare
|
Yeah cmake wants to compile a test program to check gcc but it requires libatomic.x86_64 First I thought it needs the 32 bit version, but since it is only for the test program, so it seems to be no problem that it links a 64 bit lib. Edit: I really dont get why this doesn't happen locally |
c3025af to
0c75332
Compare
…of ubuntu Signed-off-by: Genesis <10389486+PuppetMasterHex@users.noreply.github.com>
0c75332 to
a2b28af
Compare
|
Found why the errors don't happen locally, 3 days ago the fedora:latest tag was moved to fedora 44, after deleting my local image and starting from scratch I get these errors too. I pushed a change that sets the image to fedora:43 for now, I'll check how to fix the errors in the next days but the build should work for now. |
Also set the github actions docker image back to fedora:latest Signed-off-by: Genesis <10389486+PuppetMasterHex@users.noreply.github.com>
|
Pushed a fix for fedora 44 |
|
LGTM, thanks. I'll merge it to it's own branch so I can work on fixing Windows build when I have time. |