Unofficial-Godot-Engine-Raspberry-Pi icon indicating copy to clipboard operation
Unofficial-Godot-Engine-Raspberry-Pi copied to clipboard

Mono version of Godot?

Open Crogarox opened this issue 2 years ago • 8 comments

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

Crogarox avatar Aug 24 '21 23:08 Crogarox

I don't know how.

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

hiulit avatar Sep 08 '21 09:09 hiulit

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!

irishgreencitrus avatar Sep 28 '21 10:09 irishgreencitrus

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

hiulit avatar Sep 28 '21 10:09 hiulit

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

irishgreencitrus avatar Sep 28 '21 11:09 irishgreencitrus

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

horseyhorsey avatar Feb 04 '22 14:02 horseyhorsey

Any updates?

CodeDoctorDE avatar Aug 07 '22 14:08 CodeDoctorDE

@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 :)

hiulit avatar Aug 07 '22 14:08 hiulit

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.

serega404 avatar Oct 04 '22 08:10 serega404