Streamlines the build process as done for Linux and macOS in previous commits,
and as was done for mobile and web platforms from the start. We're now fully
in sync with `godot-mono-builds`.
This also removes the need to hack around cross-compilation issues using Wine,
which also seemed no longer to work on Fedora 34 anyway.
This changes our handmade `configure` calls to rely on the streamlined build
process from `godot-mono-builds`, so that our builds are consistent with the
ones generated there.
This enables us to target macOS arm64 easily as neikeq did the relevant work
in the `godot-mono-builds` scripts.
Includes a backport of https://github.com/mono/mono/pull/21147 to fix Mono
build with `godot-mono-builds` using a wrapper for osxcross.
This is a Preview release of Mono, so we use `centos8-preview` packages which
correspond to its MSBuild version requirements (16.10.1).
For osxcross, we need to build compiler-rt to be able to link the new Apple
Silicon support code. See #83 for details.
Includes a backport of https://github.com/tpoechtrager/osxcross/pull/284 to
simplify the install process.
Actual macOS arm64 builds will be added in a follow-up commit.
- Base container: Fedora 32
- Mono uses version 6.12.0.102, MSBuild 16.6
- Linux builds use GCC 9
- Windows builds use Fedora 32's mingw-gcc (GCC 9)
- JavaScript uses Emscripten 1.39.9 (Mono 6.12 requires 1.39.7 but that version
fails generating .wasm, so we backport a patch to get 1.39.9)
- Install SCons 4.0.1 from pip
Provides SDKs for iOS 14.0 and macOS 10.15.
Mono is patched to fix a regression in Xcode 11.4+, still unfixed by Apple.
Another patch is backported from Unity's Mono fork to fix another issue with
the macOS 11.0 beta SDK.
Fixes missing arguments in Xcode and iOS dockerfiles, seems like some changes
were not properly committed during the last refactor.
This can be reverted once a proper fix has been deployed in upstream
Mono. No ETA yet as we're busy and it's unlikely to happen if we don't
do it ourselves :)
Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
Cherry-pick the whole https://github.com/mono/mono/pull/16636
We were also attempting to patch the wrong folder previously (I had it
working in my local tests but committed the wrong patch when rebasing
to make the Git history pretty... :)).
To get WebAssembly templates to actually work, we need to use
Mono 6.6 (currently in preview), which doesn't have tags yet
but is in the `2019-08` branch. So I dehardcoded the `mono-`
prefix for the git tree-ish to allow using `./build.sh 2019-08`.
6.6 doesn't build with msbuild 16.0, so I'm upgrading to its
matching version 16.3. There are no DEB files for 16.3 on the
EOL'ed Ubuntu 14.04, but it seems that the 16.04 packages install
cleanly.
We also backport a patch from mono's master branch to fix wasm
support further, and enable parallel build jobs for make.
We force using Emscripten 1.38.47 as there is a regression in 1.38.48
and 1.39.x which makes the generation of our .wasm file fail.
Up until now we used the desktop BCL (compiled with desktop Mono)
for both desktop and Android, but that does not work for WebAssembly
(and we suspect Android issues related to it).
So we now build the Android and WebAssembly BCLs in the relevant
containers, which are later copied in the templates directory to
include on export. We already have the desktop BCL from the regular
build.
Adds support for building Mono templates for Android in 3.2/master.
We use the script from https://github.com/godotengine/godot-mono-builds
to build Mono for all arches with the right options, and a patch included
from https://github.com/godotengine/godot/blob/master/modules/mono/build_scripts/patches/fix-mono-android-tkill.diff
which is also necessary.
I also moved the SDK to a `sdk` folder to make the `$HOME` more tidy,
especially since the Mono build scripts install the mono toolchains in
`$HOME` too by default.
Using a git clone for specific mono version tag, as the upstream tarballs
are iffy (the 5.18.1.3 tarball lacks files needed to build on Android).