mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-13 15:05:30 +02:00
Use default export templates for HTML5
Changes Emscripten SDK version to match that used to compile the default export templates used by Godot 3.4 (in this case 2.0.25 as can be seen here: https://github.com/godotengine/build-containers/blob/3.4/Dockerfile.javascript). This means we no longer need to compile custom export templates when exporting HTML5 for Godot 3.4. Exports from other Godot versions may requiring compiling the GDNative library with a different version of the Emscripten SDK.
This commit is contained in:
parent
03583c0a1b
commit
5f7dc2c247
15 changed files with 52 additions and 119 deletions
|
@ -1,4 +0,0 @@
|
|||
# For convenient building of the library and gdnative export templates targeted at the javacript platform.
|
||||
FROM emscripten/emsdk:3.1.5
|
||||
RUN apt-get update && apt-get install pkg-config python3 -y
|
||||
RUN pip3 install scons
|
|
@ -1,41 +0,0 @@
|
|||
set -e
|
||||
|
||||
# Parse args.
|
||||
args=$@
|
||||
while [[ $# -gt 0 ]]; do
|
||||
key="$1"
|
||||
case $key in
|
||||
-t|--target)
|
||||
target="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Usage: ./build.sh [-t|--target <release|debug>]";
|
||||
exit 128
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
# Set defaults.
|
||||
target=${target:-debug}
|
||||
|
||||
# Get the absolute path to the directory this script is in.
|
||||
EXPORT_TEMPLATES_DIR="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
|
||||
# Update git submodules.
|
||||
GODOT_DIR=${EXPORT_TEMPLATES_DIR}/godot
|
||||
if [ -z "$(ls -A -- "$GODOT_DIR")" ]; then
|
||||
cd ${EXPORT_TEMPLATES_DIR}
|
||||
git submodule update --init --recursive -- $GODOT_DIR
|
||||
fi
|
||||
|
||||
# Use Docker to build HTML5 GDNative export templates.
|
||||
UID_GID="0:0" docker-compose build javascript
|
||||
UID_GID="$(id -u):$(id -g)" docker-compose run -e TARGET=$target javascript
|
||||
|
||||
if [ "$target" == "debug" ]; then
|
||||
mv godot/bin/godot.javascript.debug.gdnative.zip godot/bin/webassembly_gdnative_debug.zip
|
||||
else
|
||||
mv godot/bin/godot.javascript.opt.gdnative.zip godot/bin/webassembly_gdnative_release.zip
|
||||
fi
|
|
@ -1,12 +0,0 @@
|
|||
services:
|
||||
javascript:
|
||||
build: ../docker
|
||||
user: ${UID_GID}
|
||||
volumes:
|
||||
- ./godot:/src
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- |
|
||||
cd src
|
||||
scons platform=javascript tools=no gdnative_enabled=yes target=$${TARGET} -j$$(nproc)
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 419e713a29f20bd3351a54d1e6c4c5af7ef4b253
|
|
@ -1 +0,0 @@
|
|||
HTML5 GDNative export templates are not provided, this is just a convient script/docker-compose file for building them locally.
|
Loading…
Add table
Add a link
Reference in a new issue