Update files for javascript build and export

Adds some files to making building and export for HTML5 more convenient.
This commit is contained in:
Leroy Hopson 2021-06-15 13:54:35 +07:00
parent 2f4cbacf15
commit bdda1458c0
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
11 changed files with 83 additions and 26 deletions

View file

@ -2,7 +2,7 @@
set -e
# Get the absolute path to the directory this script is in.
#GODOT_DIR Get the absolute path to the directory this script is in.
NATIVE_DIR="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
@ -34,6 +34,6 @@ scons generate_bindings=yes -j$(nproc)
cd ${NATIVE_DIR}
scons -j$(nproc)
echo "To Build libgodot-xterm for javascript platform inside a docker container, run:"
echo 'UID_GID="$(id -u):$(id -g)" docker-compose run javascript-build'
# Use Docker to build libgodot-xterm javascript.
UID_GID="0:0" docker-compose build javascript
UID_GID="$(id -u):$(id -g)" docker-compose run javascript

View file

@ -1,6 +1,14 @@
services:
javascript-build:
build: misc/docker
javascript:
build: ../../../misc/docker
user: ${UID_GID}
volumes:
- .:/godot
- .:/src
command:
- /bin/bash
- -c
- |
cd /src/thirdparty/godot-cpp
scons platform=javascript target=debug -j$$(nproc)
cd /src
scons platform=javascript target=debug -j$$(nproc)

View file

@ -1,12 +0,0 @@
FROM ponders/godot-cpp-ci
RUN git clone https://github.com/emscripten-core/emsdk.git
WORKDIR emsdk
RUN ./emsdk install 2.0.10
RUN ./emsdk activate 2.0.10
RUN chmod -R 777 /emsdk
WORKDIR /godot
RUN apt-get update && apt-get install -y vim
COPY ./build.sh /build.sh
RUN chmod +x /build.sh
CMD /build.sh

View file

@ -1,7 +0,0 @@
#!/bin/bash
source /emsdk/emsdk_env.sh
export EM_CACHE=/godot/.emcache
cd /godot/thirdparty/godot-cpp
scons platform=javascript -j$(nproc)
cd /godot
scons platform=javascript -j$(nproc)

View file

@ -5,5 +5,9 @@ mkShell {
scons
cacert # Required for git clone on GithHub actions runner.
# Used to build for javascript platform.
docker
docker-compose
];
}