luca-piccioni / OpenGL.Net

Modern OpenGL bindings for C#.
MIT License
574 stars 109 forks source link

Fix netcoreapp projects for Linux #131

Closed dstroup closed 5 years ago

dstroup commented 5 years ago

This should get the netcoreapp2.0 projects building again, and running on Linux. I've only tested this building with Visual Studio 2017 and running on Windows 10 (WGL) & Ubuntu 18.04 (GLX).

On Ubuntu, I had to create the symlink /usr/lib/x86_64-linux-gnu/libX11.so -> /usr/lib/x86_64-linux-gnu/libX11.so.6 in addition to these changes. This isn't required under Mono because Mono supports DLLMap. While .NET Core doesn't support DLLMap, Core 3.0 is adding similar functionality.

Project file changes were copied from pull request #101 to fix issues with the use of BaseIntermediateOutputPath in order to get the project files to load properly.

I added #defines around the dlopen DllImports to account for marshaling differences, as noted in issue #107.

Finally, I removed the #define around the version info in AssemblyInfo.cs. This was causing assembly load errors because the assembly had an incorrect version (0.0.0.0).

codecov[bot] commented 5 years ago

Codecov Report

Merging #131 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #131   +/-   ##
=======================================
  Coverage   92.14%   92.14%           
=======================================
  Files          91       91           
  Lines       27663    27663           
  Branches     1938     1938           
=======================================
  Hits        25490    25490           
  Misses       1926     1926           
  Partials      247      247
Flag Coverage Δ
#WGL_net35_x64_Release 92.22% <ø> (ø) :arrow_up:
#WGL_net35_x86_Release 90.97% <ø> (ø) :arrow_up:
#WGL_net461_x64_Release 91.59% <ø> (ø) :arrow_up:
#WGL_net461_x86_Release 90.71% <ø> (ø) :arrow_up:
Impacted Files Coverage Δ
Khronos.Net/GetProcAddressOS.cs 40% <ø> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6b954a5...a3667bf. Read the comment docs.

codecov[bot] commented 5 years ago

Codecov Report

Merging #131 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #131   +/-   ##
=======================================
  Coverage   92.14%   92.14%           
=======================================
  Files          91       91           
  Lines       27663    27663           
  Branches     1938     1938           
=======================================
  Hits        25490    25490           
  Misses       1926     1926           
  Partials      247      247
Flag Coverage Δ
#WGL_net35_x64_Release 92.22% <ø> (ø) :arrow_up:
#WGL_net35_x86_Release 90.97% <ø> (ø) :arrow_up:
#WGL_net461_x64_Release 91.59% <ø> (ø) :arrow_up:
#WGL_net461_x86_Release 90.71% <ø> (ø) :arrow_up:
Impacted Files Coverage Δ
Khronos.Net/GetProcAddressOS.cs 40% <ø> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6b954a5...a3667bf. Read the comment docs.