Skip to content

Commit

Permalink
[godot] Fix web builds for Godot <= 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
badlogic committed Oct 17, 2024
1 parent cf5b340 commit 623e2b9
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions spine-godot/build/build-templates-v4.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
pushd "$dir" > /dev/null
Expand Down Expand Up @@ -132,18 +133,41 @@ elif [ "$platform" = "web" ]; then
scons platform=web tools=no target=template_debug custom_modules="../spine_godot" --jobs=$cpus
mv bin/godot.web.template_release.wasm32.zip bin/web_release.zip
mv bin/godot.web.template_debug.wasm32.zip bin/web_debug.zip

scons platform=web tools=no threads=no target=template_release custom_modules="../spine_godot" --jobs=$cpus
scons platform=web tools=no threads=no target=template_debug custom_modules="../spine_godot" --jobs=$cpus
mv bin/godot.web.template_release.wasm32.nothreads.zip bin/web_nothreads_release.zip
mv bin/godot.web.template_debug.wasm32.nothreads.zip bin/web_nothreads_debug.zip

if [ -f bin/godot.web.template_release.wasm32.nothreads.zip ]; then
mv bin/godot.web.template_release.wasm32.nothreads.zip bin/web_nothreads_release.zip
else
mv bin/godot.web.template_release.wasm32.zip bin/web_nothreads_release.zip
fi

if [ -f bin/godot.web.template_debug.wasm32.nothreads.zip ]; then
mv bin/godot.web.template_debug.wasm32.nothreads.zip bin/web_nothreads_debug.zip
else
mv bin/godot.web.template_debug.wasm32.zip bin/web_nothreads_debug.zip
fi

scons platform=web tools=no dlink_enabled=yes target=template_release custom_modules="../spine_godot" --jobs=$cpus
scons platform=web tools=no dlink_enabled=yes target=template_debug custom_modules="../spine_godot" --jobs=$cpus
mv bin/godot.web.template_release.wasm32.dlink.zip bin/web_dlink_release.zip
mv bin/godot.web.template_debug.wasm32.dlink.zip bin/web_dlink_debug.zip

scons platform=web tools=no threads=no dlink_enabled=yes target=template_release custom_modules="../spine_godot" --jobs=$cpus
scons platform=web tools=no threads=no dlink_enabled=yes target=template_debug custom_modules="../spine_godot" --jobs=$cpus
mv bin/godot.web.template_release.wasm32.nothreads.dlink.zip bin/web_dlink_nothreads_release.zip
mv bin/godot.web.template_debug.wasm32.nothreads.dlink.zip bin/web_dlink_nothreads_debug.zip

if [ -f bin/godot.web.template_release.wasm32.nothreads.dlink.zip ]; then
mv bin/godot.web.template_release.wasm32.nothreads.dlink.zip bin/web_dlink_nothreads_release.zip
else
mv bin/godot.web.template_release.wasm32.dlink.zip bin/web_dlink_nothreads_release.zip
fi

if [ -f bin/godot.web.template_debug.wasm32.nothreads.dlink.zip ]; then
mv bin/godot.web.template_debug.wasm32.nothreads.dlink.zip bin/web_dlink_nothreads_debug.zip
else
mv bin/godot.web.template_debug.wasm32.dlink.zip bin/web_dlink_nothreads_debug.zip
fi
elif [ "$platform" = "android" ]; then
# --- ANROID ---
# generates android_release.apk, android_debug.apk, android_source.zip
Expand Down

0 comments on commit 623e2b9

Please sign in to comment.