Skip to content
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

Build mono module #8

Closed
TingPing opened this issue Jan 31, 2018 · 15 comments
Closed

Build mono module #8

TingPing opened this issue Jan 31, 2018 · 15 comments
Labels
enhancement New feature or request

Comments

@TingPing
Copy link
Member

Build with module_mono_enabled=yes. This currently fails trying to find monosgen-2 module.

@TingPing TingPing added the enhancement New feature or request label Jan 31, 2018
@TingPing
Copy link
Member Author

TingPing commented Jul 1, 2019

No, feel free to try yourself.

@ricvelozo
Copy link

@TingPing I managed to fix monosgen-2 error. Now I'm stuck on the following NuGet error:

scons: *** [bin/GodotSharp/Tools/GodotSharpTools.dll] /usr/lib/sdk/mono5/lib/nuget/nuget.exe: Exec format error

@ricvelozo
Copy link

ricvelozo commented May 18, 2020

@TingPing Can't we use build-args on Flathub (#50 (comment))?

@TingPing
Copy link
Member Author

@ricvelozo No, its unsafe.

@PureTryOut
Copy link

Has there been any progress on this?

@Calinou
Copy link
Collaborator

Calinou commented Nov 2, 2020

@PureTryOut Not that I know of. I don't have much Mono experience or time to help with this, unfortunately.

@ricvelozo
Copy link

The glue code of Mono doesn't compile (#50) because of the Flatpak sandbox. A solution is use the official binaries, like flathub/org.blender.Blender@08eace8.

@xaqbr
Copy link

xaqbr commented Aug 27, 2022

Now that .NET 6 has been merged to the master branch, is C# support for the flatpak version feasible?

@Calinou
Copy link
Collaborator

Calinou commented Aug 27, 2022

Now that .NET 6 has been merged to the master branch, is C# support for the flatpak version feasible?

I haven't checked if this changes much with regards to packaging .NET 6 on Linux, but I wouldn't expect it to be a cakewalk still. I don't have time to look into it, so feel free to tinker with this if you'd like.

Remember that when building a Flatpak, the goal is to build all components from source (with the exception of the base platform). Therefore, using pre-compiled binary distributions is frowned upon (even if it's technically allowed).

@CharlieQLe
Copy link
Contributor

CharlieQLe commented Sep 3, 2022

I got a fork of this that has dotnet6 support via the org.freedesktop.Sdk.Extension.dotnet6 SDK extension. It's not finished yet, but it doesn't seem to be too hard to complete. I'll submit a PR soon. If no huge problems come up, this should be ready by the first Godot 4 beta.

@CharlieQLe
Copy link
Contributor

CharlieQLe commented Sep 4, 2022

For anyone interested, PR #109 should have a working build of Godot 4 Alpha 15 with .NET 6 support. There are a few caveats however:

  • The external mono editor does not work. However, using an external editor as in the README does work, as long as the editor has access to .NET 6.
  • The Nuget packages needs to be accessible by the .NET 6 SDK extension. This can be done by running the following at the system level- not in a flatpak.
mkdir ~/MyLocalNugetSource
FLATPAK_ENABLE_SDK_EXT=dotnet flatpak run --command=sh org.godotengine.Godot -c 'cp /app/bin/GodotSharp/Tools/nupkgs/* ~/MyLocalNugetSource/; dotnet nuget add source ~/MyLocalNugetSource -n MyLocalNugetSource'
flatpak run --command=sh --runtime=org.freedesktop.Sdk//21.08 --filesystem=host org.freedesktop.Sdk.Extension.dotnet6//21.08 -c 'PATH="${PATH}:/usr/lib/sdk/dotnet6/bin" LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/sdk/dotnet6/lib" exec dotnet nuget add source ~/MyLocalNugetSource -n MyLocalNugetSource'
  • Projects need to be restored. This can be done like so in the editor's integrated terminal:
dotnet restore

EDIT: Updated one of the commands, which should now allow Godot to properly build and rebuild the solution.

@Beryesa
Copy link

Beryesa commented Mar 5, 2023

Are there any updates on this since now Godot's latest stable release uses dotnet instead of mono which seems to have better flatpak support?

@Calinou
Copy link
Collaborator

Calinou commented Mar 5, 2023

Are there any updates on this since now Godot's latest stable release uses dotnet instead of mono which seems to have better flatpak support?

Please test #109 (see its latest comments) and report back if it works correctly 🙂

Note that this will have to be a separate Flatpak, as C# support not only makes the Flatpak larger but also requires all projects exported with it to contain the .NET runtime (which makes your exported project larger). This is problematic for projects that only use GDScript.

@Zishan-Rahman
Copy link
Contributor

Now that both Godot 3's Mono version and Godot 4's .NET version have their own Flatpaks on Flathub, I think this issue can be closed now 👍

@Calinou
Copy link
Collaborator

Calinou commented Jun 3, 2024

Closing per the above comment. Thanks @Zishan-Rahman for their continued work on these Flatpaks 🙂

@Calinou Calinou closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants