Skip to content

Mono version of Godot? #14

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

Open
Crogarox opened this issue Aug 24, 2021 · 8 comments
Open

Mono version of Godot? #14

Crogarox opened this issue Aug 24, 2021 · 8 comments

Comments

@Crogarox
Copy link

Can you also compile the mono version of Godot for Pi3/Pi4 ?

@hiulit
Copy link
Owner

hiulit commented Sep 8, 2021

I don't know how.

If someone is avaible to compile them, feel free to send them to me :)

@irishgreencitrus
Copy link

I don't know how.

If someone is avaible to compile them, feel free to send them to me :)

just saw this now, i'll have a go!

@hiulit
Copy link
Owner

hiulit commented Sep 28, 2021

Hey! I just found out a "fork" of this project, with some mono builds https://github.com/TchnlgPsnt/Unofficial-Godot-Engine-Raspberry-Pi/releases/tag/3.3

And also this tutorial on how to compile them https://www.reddit.com/r/godot/comments/kfi0oc/comment/gl4vlpw/?utm_source=share&utm_medium=web2x&context=3

@irishgreencitrus
Copy link

Hey! I just found out a "fork" of this project, with some mono builds https://github.com/TchnlgPsnt/Unofficial-Godot-Engine-Raspberry-Pi/releases/tag/3.3

And also this tutorial on how to compile them https://www.reddit.com/r/godot/comments/kfi0oc/comment/gl4vlpw/?utm_source=share&utm_medium=web2x&context=3

The fork is 3.3 only, i'll have a look to make some more builds

@horseyhorsey
Copy link

horseyhorsey commented Feb 4, 2022

Guys...thanks for the info. I'm building export templates now but I'm pretty certain they will be fine. Tested the editor very briefly which was ok. I was just after the ability to run a godot-mono game on the Pi.

I made some notes which most of the commands are from reddit, which came from here but I logged any mishaps along the way or anything that could be missing. This was on Raspbian.

Godot / Mono / Pi

Cannot build directly to ARM32 from other machines to work on raspberry pi?

Godot has to be compiled on the PI and projects have to be built on the PI, same with export templates?

Instructions found:

https://www.reddit.com/r/godot/comments/kfi0oc/how_to_use_custom_export_templates/gl4vlpw/?utm_source=share&utm_medium=web2x&context=3

Setup PI build environment

  • sudo apt-get install build-essential scons pkg-config libx11-dev libxcursor-dev libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm
  • sudo apt-get install clang
  • sudo apt-get install lld

Setup for Mono builds

https://www.mono-project.com/download/stable/#download-lin-raspbian

Raspbian 10

sudo apt install apt-transport-https dirmngr gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/debian stable-raspbianbuster main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update

Download Godot source and checkout 3.4 branch

git clone https://github.com/godotengine/godot.git
git checkout 3.4

Compile Godot

scons platform=x11 target=release_debug tools=yes use_llvm=yes CCFLAGS="-mtune=cortex-a72 -mcpu=cortex-a72 -mfloat-abi=hard -mlittle-endian -munaligned-access -mfpu=neon-fp-armv8" module_mono_enabled=yes mono_glue=no -j4

This takes a while so go for a sleep. core/io is one of the last directories to be built. Pi4 4GB [Time elapsed: 01:17:38.915.0]

Compile Binaries

The following commands you need an X-Server setup if using SSH, startX. I just run direct from the raspberry PI terminal using Raspbian.

Generate Mono Glue

bin/godot.x11.opt.tools.32.llvm.mono --generate-mono-glue modules/mono/glue/ --video-driver GLES2

Generate Binary

Make sure you have a dotnet SDK installed. .Net5.0 built in my tests.

scons platform=x11 tools=yes use_llvm=yes CCFLAGS="-mtune=cortex-a72 -mcpu=cortex-a72 -mfloat-abi=hard -mlittle-endian -munaligned-access -mfpu=neon-fp-armv8" module_mono_enabled=yes mono_glue=yes -j4

Good 30 minutes build time.

Create export templates

scons platform=x11 tools=no use_llvm=yes CCFLAGS="-mtune=cortex-a72 -mcpu=cortex-a72 -mfloat-abi=hard -mlittle-endian -munaligned-access -mfpu=neon-fp-armv8" module_mono_enabled=yes mono_glue=yes target=debug -j4

scons platform=x11 tools=no use_llvm=yes CCFLAGS="-mtune=cortex-a72 -mcpu=cortex-a72 -mfloat-abi=hard -mlittle-endian -munaligned-access -mfpu=neon-fp-armv8" module_mono_enabled=yes mono_glue=yes target=release_debug -j4

scons platform=x11 tools=no use_llvm=yes CCFLAGS="-mtune=cortex-a72 -mcpu=cortex-a72 -mfloat-abi=hard -mlittle-endian -munaligned-access -mfpu=neon-fp-armv8" module_mono_enabled=yes mono_glue=yes target=release -j4

@CodeDoctorDE
Copy link

Any updates?

@hiulit
Copy link
Owner

hiulit commented Aug 7, 2022

@CodeDoctorDE No, I haven't had the time to take a look at it. If someone is willing to compile the binaries, I'd gladly host them :)

@serega404
Copy link

I've been creating godot templates for mono for the second day now, but I'm not doing very well, maybe someone will tell me what I'm doing wrong. If I succeed, I will publish the binaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants