Build raylib native library locally
before this changes we don't know if our change is working without copying native library manually, this pr download build native library and copy that native library to output directory
i only test this on linux, this pr need testing on macos and windows
i will implement android build on #171 if this changes merged
this required cmake
This is interesting. It effectively moves/duplicates the GitHub Action for building native raylib into the .csproj.
I think there is a place for this in the repo, this could be very useful, but I don't think it should be implicitly or done automatically, on build of the main project.
Maybe put this in an empty project Raylib-cs.Native with a readme.md explaining why?
If we are going to do this, then the duplicate code in the GH Action needs to be removed.
One thing I do agree with, is that this is a much better way of maintaining custom build/environment flags then hidden in the .github folder
should i create new Raylib-cs.Native package and move native library there? and maybe turn Raylib-cs package into metapackage so user can use custom native library, this would make #169 possible
so my idea is
Raylib-cs reference Raylib-cs.Core and Raylib-cs.Native similar to Microsoft.AspNetCore.All
Raylib-cs.Core previously Raylib-cs
Raylib-cs.Native only contains native libraries
so when user want to build custom native library they need to install Raylib-cs.Core and get Raylib-cs.Native source code and build it locally
@anggape Just added Raylib-cs.Native.csproj using your pr build changes. Feel free to add android build changes to this.
the problem with this implementations is we need to download raylib source code for each target frameworks, is fine for ci environment such as github actions, but for slow internet like mine is gonna take long time to download raylib source, can we add raylib as submodule as well? this will resolve the problem since we dont need to download for each target frameworks
seems like its become a problem on ci as well
error MSB3932: Failed to unzip file "obj/Release/net5.0/raylib.zip" because the file does not exist or is inaccessible.
https://github.com/ChrisDill/Raylib-cs/actions/runs/5952288439/job/16144511559
@anggape Changed to just one framework. Unsure on the build error with cmake. https://github.com/ChrisDill/Raylib-cs/actions/runs/5952960115/job/16146279254
Would it possible with this PR to disable even the recoding thing on F12?
@anggape Considered submodules though makes setup more complex and pulls in raylib examples as well. Could include a copy of what we need instead? @9ParsonsB Any thoughts on this?
@MrScautHD Should be possible since it is a config option in raylib.
Closing this since Raylib-cs.Native has been setup. Still experimental so I opened #235 to improve it and potentially make it part of the workflow.