Open coolymike opened 1 month ago
Thanks for the detailed research.
I'll resolve this when I can.
After having used the workaround for a while, I have run into an issue with the Dash resetting when modified and synced on the Linux native build. I am unsure what causes this, and it most likely will need a different issue on the main repo.
Currently, Brotli.NET does not work on Linux, causing in-game cloud syncing to be entirely broken. There are 2 issues preventing it from loading:
Resonite/Resonite_Data/Plugins
directory, wherebrolib_x64.so
is stored.Once these two issues are resolved, Brotli.NET (and in turn, Brotli) function on Linux as expected. This allows for syncing records on the Linux native build of Resonite.
Issue 1
This is caused by
RuntimeInformation.IsOSPlatform
, which returns results for the compile target, and not the current runtime. According to the issue I linked above, this is intended behavior of the library. I verified this behavior by logging the output of that library against the output of #1 (on the Linux native build)This issue can be fixed either:
RuntimeInformation.IsOSPlatform
with a custom implementation like #1. The implementation that FrooxEngine itself uses to determine the platform could possibly be used here too, as it works and is well tested.System.Runtime.InteropServices.RuntimeInformation.dll
included with the Linux build of Resonite to have a Linux compile target. This would allow theRuntimeInformation.IsOSPlatform
function to return the proper values for Linux. (I have not explicitly tested this solution)Issue 2
Brotli.NET is a .NET wrapper for the native Brotli library. Resonite includes this library for both Windows and Linux under
Resonite/Resonite_Data/Managed/brolib_x64.dll
for Windows andResonite/Resonite_Data/Plugins/brolib_x64.so
for Linux. The path for thePlugins
directory is not used to search for the Brotli native library, as such Brotli.NET fails to find the library on Linux.The paths Brotli.NET uses on Linux to find the native Brotli library include:
These paths are almost the same as on Windows, except on Windows,
win
is used instead oflinux
.This issue can be fixed either:
brolib_x64.so
toResonite/Resonite_Data/Managed
, wherebrolib_x64.dll
is also located.Plugins
directory to the output of theGetPossibleRuntimeDirectories
function.