Skip to content

Commit 0bd0362

Browse files
committed
Web: Handle new template names and dlink_enabled=yes
Follow-up to godotengine/godot#65094. Also reverts LTO change from #62, we found that while it's much slower to link, full LTO still produces smaller binaries and that's quite important for the Web platform.
1 parent 1262703 commit 0bd0362

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

build-release.sh

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -248,17 +248,17 @@ if [ "${build_classical}" == "1" ]; then
248248
## Web (Classical) ##
249249

250250
# Editor
251-
unzip out/web/tools/godot.web.opt.tools.threads.zip -d ${webdir}/
251+
unzip out/web/tools/godot.web.opt.tools.wasm32.zip -d ${webdir}/
252252
brotli --keep --force --quality=11 ${webdir}/*
253253
binname="${godot_basename}_web_editor.zip"
254-
cp out/web/tools/godot.web.opt.tools.threads.zip ${reldir}/${binname}
254+
cp out/web/tools/godot.web.opt.tools.wasm32.zip ${reldir}/${binname}
255255

256256
# Templates
257-
cp out/web/templates/godot.web.opt.threads.zip ${templatesdir}/webassembly_threads_release.zip
258-
cp out/web/templates/godot.web.opt.debug.threads.zip ${templatesdir}/webassembly_threads_debug.zip
257+
cp out/web/templates/godot.web.opt.wasm32.zip ${templatesdir}/web_release.zip
258+
cp out/web/templates/godot.web.opt.debug.wasm32.zip ${templatesdir}/web_debug.zip
259259

260-
cp out/web/templates/godot.web.opt.gdnative.threads.zip ${templatesdir}/webassembly_gdnative_threads_release.zip
261-
cp out/web/templates/godot.web.opt.debug.gdnative.threads.zip ${templatesdir}/webassembly_gdnative_threads_debug.zip
260+
cp out/web/templates/godot.web.opt.wasm32.dlink.zip ${templatesdir}/web_dlink_release.zip
261+
cp out/web/templates/godot.web.opt.debug.wasm32.dlink.zip ${templatesdir}/web_dlink_debug.zip
262262

263263
## Android (Classical) ##
264264

@@ -451,14 +451,11 @@ if [ "${build_mono}" == "1" ]; then
451451
rm -rf macos_template.app
452452
sign_macos_template ${templatesdir_mono} 1
453453

454-
# ## Web (Mono) ##
455-
#
456-
# # Templates
457-
# cp out/web/templates-mono/godot.web.opt.debug.mono.zip ${templatesdir_mono}/webassembly_debug.zip
458-
# cp out/web/templates-mono/godot.web.opt.mono.zip ${templatesdir_mono}/webassembly_release.zip
459-
#
460-
# mkdir -p ${templatesdir_mono}/bcl
461-
# cp -r out/web/templates-mono/bcl/wasm ${templatesdir_mono}/bcl/
454+
## Web (Mono) ##
455+
456+
# Templates
457+
cp out/web/templates-mono/godot.web.opt.debug.wasm32.mono.zip ${templatesdir_mono}/web_debug.zip
458+
cp out/web/templates-mono/godot.web.opt.wasm32.mono.zip ${templatesdir_mono}/web_release.zip
462459

463460
## Android (Mono) ##
464461

build-web/build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ set -e
55
# Config
66

77
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
8-
export OPTIONS="production=yes use_thinlto=yes"
9-
export OPTIONS_MONO="module_mono_enabled=yes"
8+
export OPTIONS="production=yes"
9+
export OPTIONS_MONO="module_mono_enabled=yes use_lto=no"
1010
export TERM=xterm
1111

1212
source /root/emsdk/emsdk_env.sh
@@ -24,8 +24,8 @@ if [ "${CLASSICAL}" == "1" ]; then
2424
$SCONS platform=web ${OPTIONS} target=release_debug tools=no
2525
$SCONS platform=web ${OPTIONS} target=release tools=no
2626

27-
$SCONS platform=web ${OPTIONS} target=release_debug tools=no gdnative_enabled=yes
28-
$SCONS platform=web ${OPTIONS} target=release tools=no gdnative_enabled=yes
27+
$SCONS platform=web ${OPTIONS} target=release_debug tools=no dlink_enabled=yes
28+
$SCONS platform=web ${OPTIONS} target=release tools=no dlink_enabled=yes
2929

3030
mkdir -p /root/out/templates
3131
cp -rvp bin/*.zip /root/out/templates

build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ fi
180180
export basedir="$(pwd)"
181181
mkdir -p ${basedir}/out
182182
mkdir -p ${basedir}/out/logs
183+
mkdir -p ${basedir}/mono-glue
183184

184185
export podman_run="${podman} run -it --rm --env BUILD_NAME --env GODOT_VERSION_STATUS --env NUM_CORES --env CLASSICAL=${build_classical} --env MONO=${build_mono} -v ${basedir}/godot-${godot_version}.tar.gz:/root/godot.tar.gz -v ${basedir}/mono-glue:/root/mono-glue -w /root/"
185186
export img_version=4.x-f36

0 commit comments

Comments
 (0)