diff --git a/README.md b/README.md index ceb928b..6e4aed5 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ documented here. ## Requirements -These containers have been tested under Fedora 33 and Ubuntu 18.04 (others may work too). +These containers have been tested under Fedora 34 and Ubuntu 18.04 (others may work too). The tool used to build and manage the containers is `podman`. @@ -55,11 +55,13 @@ If you don't need to build all versions or you want to try with a single target you can comment out the corresponding lines from the script: $podman_build_mono -t godot-linux:${img_version} -f Dockerfile.linux . 2>&1 | tee logs/linux.log - $podman_build_mono -t godot-windows:${img_version} -f Dockerfile.windows --ulimit nofile=65536 . 2>&1 | tee logs/windows.log + $podman_build_mono -t godot-windows:${img_version} -f Dockerfile.windows . 2>&1 | tee logs/windows.log $podman_build_mono -t godot-javascript:${img_version} -f Dockerfile.javascript . 2>&1 | tee logs/javascript.log $podman_build_mono -t godot-android:${img_version} -f Dockerfile.android . 2>&1 | tee logs/android.log ... +Note: The MSVC image (used for UWP builds) does not work currently. + ## Host OS preparation ### Podman Fedora image @@ -67,18 +69,21 @@ you can comment out the corresponding lines from the script: To be extra-sure that you are building with the same base container image as the official builds, you can use: - podman pull registry.fedoraproject.org/fedora@sha256:acc80ce6652d35f55ad220aa1cfa3787cbaf19b0016b202f1ab29dc5060f5392 - podman image tag registry.fedoraproject.org/fedora@27a979020952 fedora:32 + podman pull registry.fedoraproject.org/fedora@sha256:sha256:8b01cffca564ca914d5d3c8dc8c6eca12a755ee4d1d898e22e83ad7128fae256 + podman image tag registry.fedoraproject.org/fedora@abec9a7a7dc6 fedora:34 -### Fedora 33 Host +### Fedora 34 Host -Fedora 33 default configuration is able to build the containers. Ensure the tools +Fedora 34 default configuration is able to build the containers. Ensure the tools are installed: sudo dnf -y install podman ### Ubuntu 18.04 Host +Note: Using a Ubuntu 18.04 host is not recommended, we strongly recommend to use +Fedora hosts to guarantee compatibility with what the official buildsystem uses. + Install `podman` (as per https://podman.io/getting-started/installation). On Ubuntu 18.04, podman 2.2.1 was used successfully: @@ -114,7 +119,7 @@ Install wine64, binfmt_misc, and configure it: This `binfmt` configuration **is not persistent**, you need to do it after a reboot in order to build the containers. -(Note that this may break previous .exe binfmt support through `run-detectors`). +(Note that this may break previous .exe binfmt support through `run-detectors`.) ## Appendix: Image sizes @@ -132,7 +137,6 @@ These are the expected container image sizes, so you can plan your disk usage in localhost/godot-android 3.x-mono-6.12.0.147 19.6 GB localhost/godot-osx 3.x-mono-6.12.0.147 5.85 GB localhost/godot-ios 3.x-mono-6.12.0.147 7.08 GB - localhost/godot-msvc 3.x-mono-6.12.0.147 11.2 GB In addition to this, generating containers will also require some host disk space (up to 30 GB) for the downloaded Mono sources and dependencies (Xcode, MSVC). diff --git a/build.sh b/build.sh index fa9f8de..8f4738d 100755 --- a/build.sh +++ b/build.sh @@ -8,15 +8,6 @@ if [ -z $podman ]; then exit 1 fi -if ! grep -rq '/usr/bin/wine' /proc/sys/fs/binfmt_misc; then - echo "binfmt_misc support for PE pointing to /usr/bin/wine must be enabled to build the Windows mono container." - echo "This can be done by:" - echo 'mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc' - echo 'echo ":windows:M::MZ::/usr/bin/wine:" > /proc/sys/fs/binfmt_misc/register' - echo 'echo ":windowsPE:M::PE::/usr/bin/wine:" > /proc/sys/fs/binfmt_misc/register' - exit 1 -fi - if [ -z "$1" -o -z "$2" ]; then echo "Usage: $0 [ ]" echo @@ -43,6 +34,7 @@ img_version=$godot_branch-$mono_version files_root=$(pwd)/files mono_commit= mono_commit_str= +build_msvc=0 # If optional Mono git branch and commit hash were passed, use them. if [ ! -z "$3" -a ! -z "$4" ]; then @@ -135,16 +127,18 @@ fi $podman_build_mono -t godot-osx:${img_version} -f Dockerfile.osx . 2>&1 | tee logs/osx.log $podman_build_mono -t godot-ios:${img_version} -f Dockerfile.ios . 2>&1 | tee logs/ios.log -if [ ! -e files/msvc2017.tar ]; then - echo - echo "files/msvc2017.tar is missing. This file can be created on a Windows 7 or 10 machine by downloading the 'Visual Studio Tools' installer." - echo "here: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017" - echo "The required components can be installed by running" - echo "vs_buildtools.exe --add Microsoft.VisualStudio.Workload.UniversalBuildTools --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop --add Microsoft.VisualStudio.Component.Windows10SDK.16299.UWP.Native --passive" - echo "after that create a zipfile of C:/Program Files (x86)/Microsoft Visual Studio" - echo "tar -cf msvc2017.tar -C \"c:/Program Files (x86)/ Microsoft Visual Studio\"" - echo - exit 1 -fi +if [ "${build_msvc}" != "0" ]; then + if [ ! -e files/msvc2017.tar ]; then + echo + echo "files/msvc2017.tar is missing. This file can be created on a Windows 7 or 10 machine by downloading the 'Visual Studio Tools' installer." + echo "here: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017" + echo "The required components can be installed by running" + echo "vs_buildtools.exe --add Microsoft.VisualStudio.Workload.UniversalBuildTools --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop --add Microsoft.VisualStudio.Component.Windows10SDK.16299.UWP.Native --passive" + echo "after that create a zipfile of C:/Program Files (x86)/Microsoft Visual Studio" + echo "tar -cf msvc2017.tar -C \"c:/Program Files (x86)/ Microsoft Visual Studio\"" + echo + exit 1 + fi -$podman_build -t godot-msvc:${img_version} -f Dockerfile.msvc -v ${files_root}:/root/files . 2>&1 | tee logs/msvc.log + $podman_build -t godot-msvc:${img_version} -f Dockerfile.msvc -v ${files_root}:/root/files . 2>&1 | tee logs/msvc.log +fi