-
-
Notifications
You must be signed in to change notification settings - Fork 46
Description
OS/device including version:
So I went through the entire process described in the readme and at the end of it I seem to be missing a whole bunch of files in the templates directory. Here are all the steps and the result:
Clone mono:
git clone https://github.com/mono/mono.git --recurse-submodules
git checkout tags/mono-6.12.0.111 -b mono-6.12.0.111
Clone the godot-mono-builds repository:
git clone https://github.com/godotengine/godot-mono-builds.git
Directory structure:
/
/godot-mono-builds
/mono
Patch and build
cd godot-mono-builds
export MONO_SOURCE_ROOT=../mono/
./linux.py configure --target=x86 --target=x86_64
./linux.py make --target=x86 --target=x86_64
Export paths
export ANDROID_NDK_ROOT=$HOME/Android/android-ndk-r21d
export ANDROID_HOME=$HOME/Android/Sdk/
export ANDROID_SDK_ROOT=$HOME/Android/Sdk/
Installing CMake for android
Use the Android SDK manager, if it fails to load make sure to use OpenJDK8
sudo apt-get install openjdk-8-jdk
sudo update-alternatives --config java
./sdkmanager --install "cmake;3.10.2.4988404"
Build the runtime for all supported Android ABIs.
./android.py configure --target=all-runtime
./android.py make --target=all-runtime
Build the AOT cross-compilers targeting all supported Android ABIs.
./android.py configure --target=all-cross
./android.py make --target=all-cross
###Build the AOT cross-compilers for Windows targeting all supported Android ABIs.
./android.py configure --target=all-cross-win --mxe-prefix=/usr
./android.py make --target=all-cross-win --mxe-prefix=/usr
Build the Desktop BCL.
./bcl.py make --product=desktop
Build the Desktop BCL for Windows.
./bcl.py make --product=desktop-win32
Build the Android BCL.
./bcl.py make --product=android
Build the iOS BCL.
./bcl.py make --product=ios
Build the WebAssembly BCL.
./bcl.py make --product=wasm
Copy the BCL
/linux.py copy-bcl --target=x86 --target=x86_64
Reference assemblies
./reference_assemblies.py install
Compile Godot
Clear any FrameworkPathOverride first!
export FrameworkPathOverride=
scons -j6 platform=x11 target=release_debug tools=yes module_mono_enabled=yes copy_mono_root=yes mono_prefix="$HOME/mono-installs/desktop-linux-x86_64-release/" mono_glue=no
bin/godot.x11.tools.64.mono --generate-mono-glue modules/mono/glue
scons -j6 platform=x11 target=release_debug tools=yes module_mono_enabled=yes copy_mono_root=yes mono_prefix="$HOME/mono-installs/desktop-linux-x86_64-release/"
scons -j6 platform=android target=release tools=no module_mono_enabled=yes copy_mono_root=yes mono_prefix="$HOME/mono-installs/android-armeabi-v7a-release"
scons -j6 platform=android target=release tools=no module_mono_enabled=yes copy_mono_root=yes mono_prefix="$HOME/mono-installs/android-arm64-v8a-release/" android_arch=arm64v8
scons -j6 platform=android target=release_debug tools=no module_mono_enabled=yes copy_mono_root=yes mono_prefix="$HOME/mono-installs/android-armeabi-v7a-release"
scons -j6 platform=android target=release_debug tools=no module_mono_enabled=yes copy_mono_root=yes mono_prefix="$HOME/mono-installs/android-arm64-v8a-release/" android_arch=arm64v8
cd platform/android/java
./gradlew generateGodotTemplates
At the end of this, bin/ contains:
android_debug.apk
android_release.apk
android_source.zip
godot-lib.debug.aar
godot-lib.release.aar
GodotSharp/
godot.x11.opt.tools.64.mono
libmonosgen-2.0.so
I can run godot.x11.opt.tools.64.mono and run games with C# scripts.
When I try to export the game to Android it throws an error:
Failed to export c# project, Assembly not found: "Mono.Android"
It turns out this is because ~/.local/share/godot/templates/3.2.4.beta.mono only contains the following files:
- android_debug.apk
- android_release.apk
- version.txt
whereas the the template directory for the official build contains folders such as bcl, android_source.zip, etc...
There does not seem to be a copy-bcl argument for android.py.
So where are those files and how should I copy them to the templates directory?