Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,28 @@ if [ "${build_classical}" == "1" ]; then
zip -q -9 "${reldir}/${binname}.zip" ${binname} ${wrpname}
rm ${binname} ${wrpname}

binname="${godot_basename}_arm64.exe"
wrpname="${godot_basename}_arm64_console.exe"
cp out/windows/arm64/tools/godot.windows.editor.arm64.llvm.exe ${binname}
sign_windows ${binname}
cp out/windows/arm64/tools/godot.windows.editor.arm64.llvm.console.exe ${wrpname}
sign_windows ${wrpname}
zip -q -9 "${reldir}/${binname}.zip" ${binname} ${wrpname}
rm ${binname} ${wrpname}

# Templates
cp out/windows/x86_64/templates/godot.windows.template_release.x86_64.exe ${templatesdir}/windows_release_x86_64.exe
cp out/windows/x86_64/templates/godot.windows.template_debug.x86_64.exe ${templatesdir}/windows_debug_x86_64.exe
cp out/windows/x86_32/templates/godot.windows.template_release.x86_32.exe ${templatesdir}/windows_release_x86_32.exe
cp out/windows/x86_32/templates/godot.windows.template_debug.x86_32.exe ${templatesdir}/windows_debug_x86_32.exe
cp out/windows/arm64/templates/godot.windows.template_release.arm64.llvm.exe ${templatesdir}/windows_release_arm64.exe
cp out/windows/arm64/templates/godot.windows.template_debug.arm64.llvm.exe ${templatesdir}/windows_debug_arm64.exe
cp out/windows/x86_64/templates/godot.windows.template_release.x86_64.console.exe ${templatesdir}/windows_release_x86_64_console.exe
cp out/windows/x86_64/templates/godot.windows.template_debug.x86_64.console.exe ${templatesdir}/windows_debug_x86_64_console.exe
cp out/windows/x86_32/templates/godot.windows.template_release.x86_32.console.exe ${templatesdir}/windows_release_x86_32_console.exe
cp out/windows/x86_32/templates/godot.windows.template_debug.x86_32.console.exe ${templatesdir}/windows_debug_x86_32_console.exe
cp out/windows/arm64/templates/godot.windows.template_release.arm64.llvm.console.exe ${templatesdir}/windows_release_arm64_console.exe
cp out/windows/arm64/templates/godot.windows.template_debug.arm64.llvm.console.exe ${templatesdir}/windows_debug_arm64_console.exe

## macOS (Classical) ##

Expand Down Expand Up @@ -462,15 +475,30 @@ if [ "${build_mono}" == "1" ]; then
zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname}
rm -rf ${binname}

binname="${godot_basename}_mono_arm64"
wrpname="${godot_basename}_mono_arm64_console"
mkdir -p ${binname}
cp out/windows/arm64/tools-mono/godot.windows.editor.arm64.llvm.mono.exe ${binname}/${binname}.exe
sign_windows ${binname}/${binname}.exe
cp -rp out/windows/arm64/tools-mono/GodotSharp ${binname}/
cp out/windows/arm64/tools-mono/godot.windows.editor.arm64.llvm.mono.console.exe ${binname}/${wrpname}.exe
sign_windows ${binname}/${wrpname}.exe
zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname}
rm -rf ${binname}

# Templates
cp out/windows/x86_64/templates-mono/godot.windows.template_debug.x86_64.mono.exe ${templatesdir_mono}/windows_debug_x86_64.exe
cp out/windows/x86_64/templates-mono/godot.windows.template_release.x86_64.mono.exe ${templatesdir_mono}/windows_release_x86_64.exe
cp out/windows/x86_32/templates-mono/godot.windows.template_debug.x86_32.mono.exe ${templatesdir_mono}/windows_debug_x86_32.exe
cp out/windows/x86_32/templates-mono/godot.windows.template_release.x86_32.mono.exe ${templatesdir_mono}/windows_release_x86_32.exe
cp out/windows/arm64/templates-mono/godot.windows.template_debug.arm64.llvm.mono.exe ${templatesdir_mono}/windows_debug_arm64.exe
cp out/windows/arm64/templates-mono/godot.windows.template_release.arm64.llvm.mono.exe ${templatesdir_mono}/windows_release_arm64.exe
cp out/windows/x86_64/templates-mono/godot.windows.template_debug.x86_64.mono.console.exe ${templatesdir_mono}/windows_debug_x86_64_console.exe
cp out/windows/x86_64/templates-mono/godot.windows.template_release.x86_64.mono.console.exe ${templatesdir_mono}/windows_release_x86_64_console.exe
cp out/windows/x86_32/templates-mono/godot.windows.template_debug.x86_32.mono.console.exe ${templatesdir_mono}/windows_debug_x86_32_console.exe
cp out/windows/x86_32/templates-mono/godot.windows.template_release.x86_32.mono.console.exe ${templatesdir_mono}/windows_release_x86_32_console.exe
cp out/windows/arm64/templates-mono/godot.windows.template_debug.arm64.llvm.mono.console.exe ${templatesdir_mono}/windows_debug_arm64_console.exe
cp out/windows/arm64/templates-mono/godot.windows.template_release.arm64.llvm.mono.console.exe ${templatesdir_mono}/windows_release_arm64_console.exe

## macOS (Mono) ##

Expand Down
26 changes: 25 additions & 1 deletion build-windows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ set -e
# Config

export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="production=yes angle_libs=/root/angle mesa_libs=/root/mesa d3d12=yes"
export OPTIONS="production=yes use_mingw=yes angle_libs=/root/angle mesa_libs=/root/mesa d3d12=yes"
export OPTIONS_MONO="module_mono_enabled=yes"
export OPTIONS_LLVM="use_llvm=yes mingw_prefix=/root/llvm-mingw"
export TERM=xterm

rm -rf godot
Expand Down Expand Up @@ -40,6 +41,17 @@ if [ "${CLASSICAL}" == "1" ]; then
mkdir -p /root/out/x86_32/templates
cp -rvp bin/* /root/out/x86_32/templates
rm -rf bin

$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_LLVM target=editor
mkdir -p /root/out/arm64/tools
cp -rvp bin/* /root/out/arm64/tools
rm -rf bin

$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_LLVM target=template_debug
$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_LLVM target=template_release
mkdir -p /root/out/arm64/templates
cp -rvp bin/* /root/out/arm64/templates
rm -rf bin
fi

# Mono
Expand Down Expand Up @@ -73,6 +85,18 @@ if [ "${MONO}" == "1" ]; then
mkdir -p /root/out/x86_32/templates-mono
cp -rvp bin/* /root/out/x86_32/templates-mono
rm -rf bin

$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_MONO $OPTIONS_LLVM target=editor
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=windows
Copy link
Member Author

@bruvzg bruvzg Jul 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to the PR, but do we need to build .NET assemblies for each architecture, it seems to contain only managed code, and scripts aren't even taking arch as argument, so it probably can be done once.

mkdir -p /root/out/arm64/tools-mono
cp -rvp bin/* /root/out/arm64/tools-mono
rm -rf bin

$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_MONO $OPTIONS_LLVM target=template_debug
$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_MONO $OPTIONS_LLVM target=template_release
mkdir -p /root/out/arm64/templates-mono
cp -rvp bin/* /root/out/arm64/templates-mono
rm -rf bin
fi

echo "Windows build successful"
22 changes: 16 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,19 +148,29 @@ if [ ! -d "deps/angle" ]; then
echo "Missing ANGLE libraries, downloading them."
mkdir -p deps/angle
pushd deps/angle
curl -L -o windows.zip https://github.com/godotengine/godot-angle-static/releases/download/chromium%2F6029/Windows.6029-1.MinGW_11.x86_64.x86_32.zip
curl -L -o macos.zip https://github.com/godotengine/godot-angle-static/releases/download/chromium%2F6029.1/macOS.6029.1.Xcode_15.arm64.x86_64.zip
unzip windows.zip && rm -f windows.zip
unzip macos.zip && rm -f macos.zip
curl -L -o windows_arm64.zip https://github.com/godotengine/godot-angle-static/releases/download/chromium%2F6601/godot-angle-static-arm64-llvm-release.zip
curl -L -o windows_x86_64.zip https://github.com/godotengine/godot-angle-static/releases/download/chromium%2F6601/godot-angle-static-x86_64-gcc-release.zip
curl -L -o windows_x86_32.zip https://github.com/godotengine/godot-angle-static/releases/download/chromium%2F6601/godot-angle-static-x86_32-gcc-release.zip
curl -L -o macos_arm64.zip https://github.com/godotengine/godot-angle-static/releases/download/chromium%2F6601/godot-angle-static-arm64-macos-release.zip
curl -L -o macos_x86_64.zip https://github.com/godotengine/godot-angle-static/releases/download/chromium%2F6601/godot-angle-static-x86_64-macos-release.zip
unzip -o windows_arm64.zip && rm -f windows_arm64.zip
unzip -o windows_x86_64.zip && rm -f windows_x86_64.zip
unzip -o windows_x86_32.zip && rm -f windows_x86_32.zip
unzip -o macos_arm64.zip && rm -f macos_arm64.zip
unzip -o macos_x86_64.zip && rm -f macos_x86_64.zip
popd
fi

if [ ! -d "deps/mesa" ]; then
echo "Missing Mesa/NIR libraries, downloading them."
mkdir -p deps/mesa
pushd deps/mesa
curl -L -o mesa.zip https://github.com/godotengine/godot-nir-static/releases/download/23.1.9/godot-nir-23.1.9.zip
unzip mesa.zip && rm -f mesa.zip
curl -L -o mesa_arm64.zip https://github.com/godotengine/godot-nir-static/releases/download/23.1.9-1/godot-nir-static-arm64-llvm-release.zip
curl -L -o mesa_x86_64.zip https://github.com/godotengine/godot-nir-static/releases/download/23.1.9-1/godot-nir-static-x86_64-gcc-release.zip
curl -L -o mesa_x86_32.zip https://github.com/godotengine/godot-nir-static/releases/download/23.1.9-1/godot-nir-static-x86_32-gcc-release.zip
unzip -o mesa_arm64.zip && rm -f mesa_arm64.zip
unzip -o mesa_x86_64.zip && rm -f mesa_x86_64.zip
unzip -o mesa_x86_32.zip && rm -f mesa_x86_32.zip
popd
fi

Expand Down