Skip to content

Commit

Permalink
Web: Handle new template names and dlink_enabled=yes
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
akien-mga committed Sep 7, 2022
1 parent 1262703 commit dc8c00c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
25 changes: 11 additions & 14 deletions build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -248,17 +248,17 @@ if [ "${build_classical}" == "1" ]; then
## Web (Classical) ##

# Editor
unzip out/web/tools/godot.web.opt.tools.threads.zip -d ${webdir}/
unzip out/web/tools/godot.web.opt.tools.zip -d ${webdir}/
brotli --keep --force --quality=11 ${webdir}/*
binname="${godot_basename}_web_editor.zip"
cp out/web/tools/godot.web.opt.tools.threads.zip ${reldir}/${binname}
cp out/web/tools/godot.web.opt.tools.zip ${reldir}/${binname}

# Templates
cp out/web/templates/godot.web.opt.threads.zip ${templatesdir}/webassembly_threads_release.zip
cp out/web/templates/godot.web.opt.debug.threads.zip ${templatesdir}/webassembly_threads_debug.zip
cp out/web/templates/godot.web.opt.zip ${templatesdir}/web_release.zip
cp out/web/templates/godot.web.opt.debug.zip ${templatesdir}/web_debug.zip

cp out/web/templates/godot.web.opt.gdnative.threads.zip ${templatesdir}/webassembly_gdnative_threads_release.zip
cp out/web/templates/godot.web.opt.debug.gdnative.threads.zip ${templatesdir}/webassembly_gdnative_threads_debug.zip
cp out/web/templates/godot.web.opt.dlink.zip ${templatesdir}/web_dlink_release.zip
cp out/web/templates/godot.web.opt.debug.dlink.zip ${templatesdir}/web_dlink_debug.zip

## Android (Classical) ##

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

# ## Web (Mono) ##
#
# # Templates
# cp out/web/templates-mono/godot.web.opt.debug.mono.zip ${templatesdir_mono}/webassembly_debug.zip
# cp out/web/templates-mono/godot.web.opt.mono.zip ${templatesdir_mono}/webassembly_release.zip
#
# mkdir -p ${templatesdir_mono}/bcl
# cp -r out/web/templates-mono/bcl/wasm ${templatesdir_mono}/bcl/
## Web (Mono) ##

# Templates
cp out/web/templates-mono/godot.web.opt.debug.mono.zip ${templatesdir_mono}/web_debug.zip
cp out/web/templates-mono/godot.web.opt.mono.zip ${templatesdir_mono}/web_release.zip

## Android (Mono) ##

Expand Down
8 changes: 4 additions & 4 deletions build-web/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ set -e
# Config

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

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

$SCONS platform=web ${OPTIONS} target=release_debug tools=no gdnative_enabled=yes
$SCONS platform=web ${OPTIONS} target=release tools=no gdnative_enabled=yes
$SCONS platform=web ${OPTIONS} target=release_debug tools=no dlink_enabled=yes
$SCONS platform=web ${OPTIONS} target=release tools=no dlink_enabled=yes

mkdir -p /root/out/templates
cp -rvp bin/*.zip /root/out/templates
Expand Down

0 comments on commit dc8c00c

Please sign in to comment.