mirror of
https://github.com/nzp-team/tools.git
synced 2024-11-10 06:31:34 +00:00
fteqw-docker: Add emscripten SDK setup
This commit is contained in:
parent
a57f2f5e55
commit
2bd94d2b7a
1 changed files with 36 additions and 2 deletions
|
@ -1,11 +1,19 @@
|
|||
# Source Ubuntu for better package sourcing
|
||||
FROM ubuntu:18.04
|
||||
|
||||
# Currently broken macOS SDK
|
||||
COPY MacOSX10.14.sdk.tar.xz /
|
||||
|
||||
WORKDIR /fteqw
|
||||
# Set up some EMSDK variables
|
||||
ARG EMSCRIPTEN_VERSION=tot
|
||||
ENV EMSDK /emsdk
|
||||
|
||||
WORKDIR /
|
||||
|
||||
# For building 32 bit binaries
|
||||
RUN dpkg --add-architecture i386
|
||||
|
||||
# First round of apt spam
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
build-essential \
|
||||
|
@ -41,12 +49,28 @@ RUN apt-get update \
|
|||
mingw-w64-tools \
|
||||
linux-libc-dev:i386
|
||||
|
||||
# EMSDK apt spam (2nd round)
|
||||
RUN apt-get install -y \
|
||||
binutils \
|
||||
ca-certificates \
|
||||
file \
|
||||
python3 \
|
||||
python3-pip
|
||||
|
||||
# Third wave + delete apt list to save space
|
||||
RUN apt-get install -y \
|
||||
gcc-arm-linux-gnueabihf \
|
||||
gcc-aarch64-linux-gnu \
|
||||
binutils-aarch64-linux-gnu \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Proceed with EMSDK install
|
||||
RUN cd / && \
|
||||
git clone https://github.com/emscripten-core/emsdk && \
|
||||
cd ${EMSDK} && \
|
||||
./emsdk install ${EMSCRIPTEN_VERSION}
|
||||
|
||||
# Set up OSXCross with the macOS SDK
|
||||
RUN cd /opt \
|
||||
&& git clone https://github.com/tpoechtrager/osxcross.git \
|
||||
&& cd osxcross \
|
||||
|
@ -54,4 +78,14 @@ RUN cd /opt \
|
|||
&& mv /MacOSX10.14.sdk.tar.xz tarballs \
|
||||
&& PORTABLE=1 UNATTENDED=1 ./build.sh
|
||||
|
||||
ENV PATH $PATH:/opt/osxcross/target/bin
|
||||
# OSXCross path
|
||||
ENV PATH $PATH:/opt/osxcross/target/bin
|
||||
|
||||
# Edit path again, but for EMSDK
|
||||
ENV EMSDK=/emsdk \
|
||||
EM_CONFIG=/emsdk/.emscripten \
|
||||
EMSDK_NODE=/emsdk/node/14.18.2_64bit/bin/node \
|
||||
PATH="/emsdk:/emsdk/upstream/emscripten:/emsdk/upstream/bin:/emsdk/node/14.18.2_64bit/bin:${PATH}"
|
||||
|
||||
# (Finally) create a config for emcc
|
||||
RUN emcc --generate-config
|
||||
|
|
Loading…
Reference in a new issue