hiulit / Unofficial-Godot-Engine-Raspberry-Pi

Unofficial Godot Engine binaries for the Raspberry Pi.
MIT License
284 stars 11 forks source link

Mono version of Godot? #14

Open Crogarox opened 3 years ago

Crogarox commented 3 years ago

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

hiulit commented 3 years ago

I don't know how.

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

irishgreencitrus commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 2 years ago

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

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 commented 2 years ago

Any updates?

hiulit commented 2 years ago

@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 commented 2 years ago

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.