-
Notifications
You must be signed in to change notification settings - Fork 16
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
Adds support for sdl_image and sdl_ttf (also other libs) #179
base: master
Are you sure you want to change the base?
Conversation
I think we should separate the csprojs, so we'd have the current |
Technically, dotnet will only lazy load native dependencies when those functions are first called. So without calling any SDL3.TTF_* no ttf dll would be required. |
I meant the inclusion of the native libs, because we're also going to have to build + package them here in addition to the bindings. The native |
Ah, yes of course. I haven't thought about the nuget package implications I can split it up into their respective csproj with PackageReferences to the SDL3-CS package. |
eee3362
to
e4a722d
Compare
For Android, I'm tempted to multi target and require the workflow for build. Including for (and removing) the existing package (@Susko3 would you agree with that?). |
I agree with multi targetting Android. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not checked the python code and the sourcegen output. Both checks are needed before merge.
f3cfe66
to
06fabcf
Compare
I've now split up the projects into their respective libraries. There is currently a chicken or egg problem, where the sister projects depend on the main project nuget package, but before they can work they need a change in the main project (see af476b4) |
cp SDL_image/install_output/bin/tiff.dll ../native/$NAME/tiff.dll | ||
elif [[ $RUNNER_OS == 'Linux' ]]; then | ||
cp SDL_image/install_output/lib/libSDL3_image.so ../native/$NAME/libSDL3_image.so | ||
# TODO: find out if webp, etc. are also needed on linux here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With these TODOs, is it just that you haven't tested if these are output at all, or only if they're necessary at runtime? If they're output they I think we should include them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Output at all. I know that the Linux build statically compiles a lot more dependencies than a windows build by default
I agree that they should be included, if they are built
Have applied a few fixes here. Of importance (to me, for testing), I replaced the Haven't tested things yet but have checked the SG output. |
I have used a PackageReference to SDL3_CS for dependency management when included in another project via nuget. Otherwise with just a project reference the SDL3-CS binary would either need to be manually added as dependency in nuget or be included in the bundle as well. Bundling shouldn't be done, as that would lead to multiple copies when more than one extra library is included For that Package reference to work we either need to first publish a version with the InternalsVisibleTo change, or add the -t:package output of SDL3-CS as nuget store source to the other projects |
I'd really like to avoid local nuget package sources. We've had to do that in other projects and it gets really finicky if you don't version it appropriately (i.e. timestamp or commit depth). In theory it should be guided by the generated
I'll need to read more on the documentation, as I find it hard to believe |
I needed the new versions of SDL3_image and SDL3_ttf, and I liked the implementation of this library for SDL3.
I've refactored the bindings script to be able to use different external libraries.
For now only image and ttf are added, as they are the only ones I need, but the code change allows for easy addition of the other SDL libs.