-
Notifications
You must be signed in to change notification settings - Fork 141
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
Add Linux support #107
Open
pimzero
wants to merge
21
commits into
Norbyte:master
Choose a base branch
from
pimzero:linux-port
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add Linux support #107
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Aug 9, 2023
Update protobuf to the last version as we are using protobuf from the local system.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
Fist and foremost, thanks you for this project, very useful to understand how bg3 works.
This PR is more a proof of concept and will probably need some cleanup if we
want to merge it, but I am sending your way to know if I need to put the effort
(or if I should keep this as a fork on my side).
This PR does 2 things:
The toolchain used is mono instead of dotnet, as I understand dotnet doesn't
support the framework version used in this project for Linux.
Build: what is required
The build change are the biggest part of this PR. The following changes were required:
Paths
Most Linux systems/FS are case sensitive, while windows doesn't have this
requirement. I fixed them.
Also, absolute paths start with a slash
/
which is considered as an option bygplex
andgppg
. We use relative paths now (for Linux build, unchanged for Windows).LSLibNative
AFAIK managed C++ is unsupported by mono or .NET Core.
CRC32 now uses the implementation from
System.IO.Hashing
,which seems to use the same polynomial.
Convert
Granny2Compressor
andLZ4FrameCompressor
to C#. By usingDllImport
, the .NET runtime will load the correct.dll
or.so
accordingly, if they are in the library search path.
Misc
We added some packages and assemblies references required for build.
We updated build documentation for Linux.
Linux needs it own
protoc
, we provide a link to download it.Runtime
The biggest change required for runtime was to remove the dependency on
Alphaleonis.Win32.Filesystem
. It doesn't work on Linux (it expects a Windowssystem).
I believe a better way to handle long paths would be to follow the instructions
in
https://learn.microsoft.com/en-us/archive/blogs/jeremykuhne/net-4-6-2-and-long-paths-on-windows-10
although I haven't tested it.