-
Notifications
You must be signed in to change notification settings - Fork 87
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
Generate NuGet packages #160
Conversation
I tested this PR on a Window 64 machine and have come across a couple issues.
|
@joshward |
If I run Native\build.win.ps1 I get the following error
Is that also missing or did I do a thing incorrectly? |
@rustybox Try running |
I did not, cheers Built native modules, ran the following from repo root $ dotnet build -c Release I end up with some nuget packages containing .net dll's and native dll's , seems good to me. Is there a good reason to have the native dll's in the git repo, isn't that going to slow git down forever? |
It's a timesaver and convenience for the contributors. The alternatives would be:
|
Would it not be possible to have SFML.Net list another (for example) SFML.Net.Native nuget package as a dependency in the nuspec? |
Sure, but then we just move the problem one package further - how would that I suppose we could then leave that package out of the repository and let the maintainers manage it privately, but that would just create a bigger burden on them. I can set up the packages like that if the maintainers prefer it that way, but the current setup is the most "painless" one in my view |
Thanks a lot for this contribution and sorry that I haven't gotten back to you sooner. With SFML itself, we've added the dependencies as binaries to the repo, for convenience, because building the dependencies isn't always trivial and there's no fully established package manager for C++ (especially at the time SFML started out). I would not recommend to repeat this. It seems great at the beginning, but the longer it's there the more it blows up the repository size, stale dependencies, etc. Since you seem to have the right experience, would it be possible to provide a similar NuGet setup for CSFML? Personally, I'd suggest to link SFML statically against CSFML, so you end up with just the CSFML DLLs plus OpenAL32.dll. But if you feel it should all be DLLs, then I'm fine with this as well. Let me know, what you're willing to do and where I can help you with anything. 🙂 |
Sure, I can help with the CSFML packages. Should I set it up in this Repository, or in CSFML's repository (and make a pull request there)? Also, a few caveats:
|
Thanks a lot 🙂 |
I've created PR #133 on CSFML and updated this PR to use the CSFML NuGet packages |
Looking good, cant wait for this to be merged into master. |
Since the CSFML PR got merged, we could probably merge this aswell now. |
Finally gotten around to test this. Something seems to go wrong though, when I build the solution with VS 2017 it generates And then the script will try to publish it all things Should I build the package through the command line to begin with? I'll try to investigate some more tomorrow, but maybe you have some insights in the meantime. 🙂 |
Hm, that's weird, my Visual Studio 2017 generates the |
Yep, I was running .NET Core 2.1 or so. Now I just need to get in contact with Sam w.r.t. the ID, but we also seem to have an issue where NuGet thinkgs SFML.System and sfml-system are too close, while it's fine with all the other modules. Maybe I'll need to check that with NuGet support. Otherwise it looks great and after some final checking this evening, I'll merge it. Thanks a lot again! 🙂 |
Great work folks, HYPE for this!! |
Haven't heard back from NuGet support yet. If worse comes to worst, do you think we could pick different IDs, like SFML.Net.System? |
Well, I'd rather have the official packages with IDs that match the namespaces of the code itself, like other official packages, but sure, we could change it to |
Still no reply from NuGet support. I'm currently checking with @ctxnop if this could be worked around if I'm an owner of both IDs. If not, we probably need to change the .NET IDs. |
It actually worked! All the SFML.Net packages have been published. 🎉 https://www.nuget.org/packages/CSFML/ |
Really good timing. Just this morning I was looking for a way to use SFML with .net core. I installed and ran the examples on macOS with the following:
At the top of the examples:
Thanks! |
Again, thanks a lot for all the work that went into this! 🎉 |
You may also have to check with @xapdkop, he had forked my script for building nuget packages and it seems that he did a lot of work on them, updated them and so on. It seems that he provides nuget packages on his own. |
This pull request adds all of the machinery required to distribute SFML.Net as a NuGet package.
Once it is merged, every module will generate a full NuGet
.nupkg
complete with the proper metadata on build, and one simply needs to runPushNuGet.ps1
orpushnuget.sh
to upload them to nuget.org.Every individual module generates a NuGet package (
SFML.Audio
,SFML.Graphics
, etc), and asingle empty package named
SFML.Net
references all modules as dependencies.I have spoken with Sam, the owner of the SFML.Net Package on NuGet, and he is willing to transfer the Package ID to the owners of this repo.
Every module ships with its required CSFML and SFML native libraries for all platforms available on the official download page, and I have added extra scripts under
src/Native
to help build the native libraries for other platforms (mainly linux distros).While you can verify that the
.dll
s and.dylib
s on my repo are the same available officially from sfml-dev.org, I understand if you are wary of merging opaque executable binaries. I can remove those binaries from my repo and let you manually add them yourself, if needed.Fixes #158
Fixes #154