mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-16 14:15:57 -06:00
[GH-ISSUE #4] Loading native library in a cross-platform way. #3
Labels
No labels
bug
enhancement
help wanted
help wanted
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/qmlnet#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pauldotknopf on GitHub (Jul 14, 2018).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/4
LibGit2Sharp is currently doing it properly:
e618156c15/LibGit2Sharp/Core/NativeMethods.csThe problem is there is no single
PInvokedll name that will work across platform. So, either we have different package (Qt.NetCore.Mac, etc), or we manually search and load the libs our self.Another option is to use a 3rd party for DLL loading: https://github.com/Firwood-Software/AdvanceDLSupport
AdvanceDLSupportlooks interesting, but it would require us to drop SWIG, which I kinda like the idea of. It would give us more control without having to understand the cryptic SWIG definition language.Using SWIG would make sense if we intended to generate wrappings for the entire Qt layer, which we don't intend on doing. This project is for QML integration only, .NET should be used for everything else.
Removing SWIG would take some time. We are almost at a good/usable point with this project though, I'd like to focus on getting it buttoned up.
@devmil commented on GitHub (Jul 14, 2018):
AdvancedDLSupport looks really promising!
I would propose to try to switching to the final Interop way first before finishing up the rest.
Especially as all the string special treatment might not be needed when we use AdvancedDLSupport.
I also think that the Qt datatypes are hidden in our case as much as possible. All the user code is inside QML or .NET.
@pauldotknopf commented on GitHub (Jul 14, 2018):
After getting the unit test project to work, I'm starting to agree.
It will take a lot of time to get swig removed though :(
I'm going to start looking into it now.
@pauldotknopf commented on GitHub (Jul 14, 2018):
Closing. Keep track with #6