Commit Graph

26 Commits

Author SHA1 Message Date
bruvzg 22b763b5df
Add pre-built MinGW/LLVM toolchain to the Windows build container to support ARM64 Windows builds. (#144) 2024-07-19 13:59:55 +02:00
Rémi Verschelde 58a04947c4 .NET 6: Remove all Mono build code, install .NET SDK 6.0 2022-08-29 09:11:39 +02:00
Rémi Verschelde 56418cb8d8 Windows: Update godot-mono-builds with fixed copy_bcl for win32 2021-07-27 08:56:46 +02:00
Rémi Verschelde 428340a423 Windows: Use `godot-mono-builds` scripts, remove Wine dependency
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.
2021-07-12 22:29:03 +02:00
Rémi Verschelde 57fdc2cebf Windows: Request net_4_x explicitly so that configure aborts if it can't be built 2021-02-10 23:25:47 +01:00
Rémi Verschelde dede88afa4 Update to Mono 6.12.0.102, use Fedora 32
- 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
2020-10-20 13:27:57 +02:00
Cory Petkovsek 86739a8185 Optimize mono & dnf downloads 2020-03-20 01:13:06 +08:00
Rémi Verschelde cb26a84aea Mono: Add patch from Unity fork to fix TLS re-attachment
Fixes godotengine/godot#33735.
2020-01-21 15:06:46 +01:00
Rémi Verschelde 8a912c7f0e Windows: Set WINEPATH for 32-bit wine to fix Mono build
Symlinking the BCL from `/usr/lib/mono` no longer seems needed
for either architecture, everything is built properly.

Fixes #34.
2020-01-07 14:01:22 +01:00
Rémi Verschelde 58ab466fd8 Windows: Prevent 32-bit build failure from skipping symlinks
Like most programming language, in a logic statement `A && B || C`,
bash will not evaluate B if A is false (failing in our case).
Using `A && (B || C)` to prevent that.

A build error in the Windows 32-bit Mono build thus caused skipping
all subsequent `ln` statements up until `|| /bin/true`, which is used
to link only the folders which are missing from the self-built mono
prefix.

The build error still needs to be fixed but it doesn't seem to prevent
using the resulting container to build 32-bit Windows binaries.
2020-01-07 09:57:27 +01:00
Rémi Verschelde 4cbbe672b5 Windows: Workaround Mono 6 BCL cross-compiling bug using Wine
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>
2019-12-18 08:18:10 +01:00
Rémi Verschelde 0a63061960 Mono: Allow specifying fixed git hash and pretty image version
Specifying only a branch like '2019-08' is problematic if upstream commits
something between the builds of two containers.

We could make a tarball in the first container build and reuse that, but we
need the flexibility of Git for some patching in the Android and JavaScript
builds, so instead we allow specifying a git tree-ish as the third argument.

We can therefore also give a pretty version string to use for the image name
as second argument, e.g. 6.6.0.160 for bef1e6335812d32f8eab648c0228fc624b9f8357.

As we can't `git clone` a commit hash directly, we still need to provide both
branch name and then commit hash for this use case.
2019-12-04 11:50:04 +01:00
Rémi Verschelde 35b535b6bc Windows: Drop patched mingw-binutils, upstream F31 has the fix
The mingw-binutils fix for LTO was backported upstream to Fedora 31
with https://bodhi.fedoraproject.org/updates/FEDORA-2019-3d381baace
2019-12-03 08:13:45 +01:00
Rémi Verschelde cd973e1d9f Properly pass img_version to all containers
Continuation and fixup of #23.
2019-12-03 08:13:45 +01:00
Rémi Verschelde 1aec8652d3 mono: Update msbuild to 16.3, support for git branches
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.
2019-11-21 09:47:48 +01:00
Rémi Verschelde a5ceea36da Use /bin/bash as default CMD instruction
The previous `['/bin/bash']` was not working, running the image
with `podman run -it <name>` would evaluate to:
```
> sh -c ['/bin/bash']
sh: [/bin/bash]: No such file or directory
```
2019-11-18 21:52:37 +01:00
Rémi Verschelde 668e36373b Use git tag to checkout stable mono releases
The main reason is that upstream Mono tends to miss some
important files in its tarballs, so Git tags appears to be
a more reliable medium.

Also group RUN commands to reduce the number of intermediate
dependencies.
2019-11-18 21:49:58 +01:00
Rémi Verschelde f7966f0a1e Disable installation of weak deps
This saves us from pulling gtk2 and gtk3 as weak deps of
perl and git or whatnot... And we don't need to pull in all
the documentation on Ubuntu.

Also ensures that we properly run `dnf clean all` after each
installation.
2019-11-18 17:09:03 +01:00
Rémi Verschelde 046e892f76 Install common dependencies in Dockerfile.base 2019-11-15 10:17:07 +01:00
Rémi Verschelde 895d8e308e mono: Update msbuild and support for mono 6.0.x
Install xz/xz-utils and conditionally handle tar.xz tarballs from 6.0+.

On Windows, I ran into a build issue due to `make distclean` being
bogus in 6.0.0.319 (mono/mono#16605), so I worked it around by starting
from a clean folder for each build.

The hotfixed mingw-binutils packages should likely be rebuilt against
Fedora 30's mingw-binutils, but I didn't find the src.rpm in the repo
to do it. There were no functional changes between F29 and F30's
mingw-binutils though, so we should be fine as is:
https://src.fedoraproject.org/rpms/mingw-binutils/commits/f30

The `MONO32_PREFIX` and `MONO64_PREFIX` are no longer used by the
buildsystem (replaced by a `mono_prefix` build option), but I kept them
where relevant to point to non-standard install locations.
2019-09-30 08:12:56 +02:00
Hein-Pieter van Braam-Stewart a62e85620a Don't build executables only to immediately delete them 2019-05-22 18:21:44 -07:00
Hein-Pieter van Braam c37204859d Add a fix to binutils that fixes LTO for us
The patch in question is
https://sourceware.org/bugzilla/show_bug.cgi?id=24267#c11

Patch is includes in the src.rpm in this commit
2019-02-28 17:29:55 +01:00
Hein-Pieter van Braam 0c45f623d5 Add YASM to all containers where it makes sense 2019-02-23 22:31:19 +01:00
Hein-Pieter van Braam 747120073d Add HAVE_STRUCT_SOCKADDR_IN6 to mono's config.h 2019-02-23 22:30:48 +01:00
Hein-Pieter van Braam e5d6158b9e Several small fixes
* Mono config on MacOSX is not portable from the Linux and Windows
version.
* Rename the compilers so that 'gcc' and 'g++' are the new version by
default.
* Add default environment variables to containers.
2019-01-17 23:12:40 +01:00
Hein-Pieter van Braam 0a9d7b2777 Initial commit 2019-01-07 21:51:22 +01:00