Comments (5)
Cant we add and dll.config like https://github.com/opentk/opentk/blob/master/src/OpenTK/OpenTK.dll.config?
We can configure the new .csproj files to automatically copy this file the output directory.
from glfw-net.
AFAIK, the DLL map is framework dependent, and the way that Mono handles resolving native libraries. .NET Core uses AssemblyLoadContext
, as well as there are cross-framework implementations like NativeLibraryLoader. For some reason or another, .NET Core rejected the idea of implementing (see here and links within issue). Supposedly .NET Core 3.0 will be making some major improvements to this issue.
Changing the library name in this library will have no real effect, as the above mentioned methods will still need to be implemented if your application targets multiple frameworks and platforms. By changing the default name to drop the version suffix, it will allow Unix platforms to need no extra resolving. A Windows user will likely need to resolve the path regardless, as their are multiple binaries for x86 and x64.
By changing the name, it is basically a win-win. Nothing really changes on Windows platforms, worse-case scenario they need to edit the library name, and it will allow it to be found automatically on Unix platforms without need for resolving.
As stated above, the actual technique for resolving the library is going to be dependent on the application that uses it, and goes beyond the scope of any .NET Standard library. .NET Framework, .NET Core, and Mono all handle this differently. The name change will simply limit the number of scenarios where automatic resolving fails it need to go to a fallback in user-code, whatever way that will be.
EDIT:
After writing this and doing some thinking, I did come across this for .NET Core. Another option would be to create a few more solutions that target different frameworks, and account for each. Will definitely keep in consideration. .NET Core has been my target primary framework, so glad to see the DllMap feature added there.
from glfw-net.
Closing this for now.
Will likely revisit the idea with the official release of .NET Core 3.0, and the new features that will be including for native library resolving (the preview release has issues on my Linux machine for proper testing).
from glfw-net.
@ForeverZer0 open this again for .Net Core now that 3.1 is out?
from glfw-net.
Good call, will do. Work on this has been agonizingly slow, just life happening, but will be done in the foreseeable future.
from glfw-net.
Related Issues (20)
- Glfw.GetKeyName(Keys key, int scanCode) throws internal exception when used with non-printable key HOT 2
- Unable to load shared library 'glfw' or one of its dependencies HOT 2
- AcessViolation in FileDrop event HOT 1
- Why GLFW.NET does't see the Vulkan? HOT 10
- A callback was made on a garbage collected delegate of type 'GLFW.NET!GLFW.MouseCallback::Invoke'. HOT 4
- BadImageFormatException on .NET framework 4.7.2 via NuGet and source HOT 2
- Application crashes when running on x86 HOT 11
- Build GLFW-Net in .NET 5 ? HOT 1
- GLFW doesn't initialize HOT 2
- GLFW.Exception WGL: OpenGL profile requested but WGL_ARB_create_context_profile is unavailable HOT 2
- MouseEventArgs.cs Where is Type "Point"
- GLFW Keeps calling Garbage Collected Fields HOT 2
- Resizing Problem when using Skia HOT 4
- Illegal `glfwDestroyWindow` in window close handler HOT 2
- glTexImage2D throws System.AccessViolationException: HOT 3
- GLFW.Exception: Cannot set swap interval without a current OpenGL or OpenGL ES context HOT 1
- Glfw SetWindowPositionCallback Bug
- Calling .Fullscreen() causes an exception.
- Update Nuget Package
- AOT - Ahead of Time | native code compiling HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glfw-net.