mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 02:11:57 -05:00
Remove dockerfile and build scripts
This commit is contained in:
parent
eff6d6e5b4
commit
7d25483e5d
3 changed files with 0 additions and 148 deletions
14
.gitignore
vendored
14
.gitignore
vendored
|
@ -310,17 +310,3 @@ discord-rpc
|
|||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# Emscripten
|
||||
src/thirdparty/nlohmann/
|
||||
emscripten/ext/
|
||||
emscripten/www/
|
||||
emscripten/temp/
|
||||
emscripten/Makefile
|
||||
emscripten/CMake*
|
||||
emscripten/cmake*
|
||||
emscripten/*.a
|
||||
emscripten/*.js
|
||||
emscripten/*.wasm
|
||||
emscripten/static/assets*
|
||||
emscripten-output/
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
FROM docker.io/library/fedora:41 AS builder
|
||||
|
||||
RUN dnf update -y && dnf install -y git cmake make gcc g++ nlohmann-json-devel autoreconf libtool openssl-devel libcurl-devel fontconfig-devel libzip-devel SDL2-devel zip speexdsp-devel ninja-build
|
||||
|
||||
WORKDIR /
|
||||
|
||||
RUN git clone https://github.com/emscripten-core/emsdk.git
|
||||
|
||||
WORKDIR /emsdk/
|
||||
|
||||
# Pin version - to prevent sudden breakage of the CI
|
||||
RUN ./emsdk install 3.1.74
|
||||
RUN ./emsdk activate 3.1.74
|
||||
|
||||
WORKDIR /openrct2/
|
||||
|
||||
COPY ./ ./
|
||||
|
||||
RUN rm -rf emscripten/temp/ emscripten/www/ emscripten/ext/
|
||||
|
||||
WORKDIR /emsdk/
|
||||
|
||||
RUN . ./emsdk_env.sh && cd /openrct2/emscripten/ && ./build_emscripten.sh
|
||||
|
||||
FROM scratch AS export
|
||||
|
||||
COPY --from=builder /openrct2/emscripten/www/* .
|
|
@ -1,107 +0,0 @@
|
|||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
START_DIR=$(pwd)
|
||||
ICU_ROOT=$(pwd)/ext/icu/icu4c/source
|
||||
JSON_DIR=/usr/include/nlohmann/
|
||||
|
||||
build_ext() {
|
||||
mkdir -p ext/
|
||||
cd ext/
|
||||
# Pin versions - to prevent sudden breakage
|
||||
if [ ! -d "speexdsp" ]; then
|
||||
git clone https://gitlab.xiph.org/xiph/speexdsp.git --depth 1 --branch SpeexDSP-1.2.1
|
||||
cd speexdsp
|
||||
cd ..
|
||||
fi
|
||||
if [ ! -d "icu" ]; then
|
||||
git clone https://github.com/unicode-org/icu.git --depth 1 --branch release-76-1
|
||||
cd icu
|
||||
cd ..
|
||||
fi
|
||||
if [ ! -d "libzip" ]; then
|
||||
git clone https://github.com/nih-at/libzip.git --depth 1 --branch v1.11.2
|
||||
cd libzip
|
||||
cd ..
|
||||
fi
|
||||
if [ ! -d "zlib" ]; then
|
||||
git clone https://github.com/madler/zlib.git --depth 1 --branch v1.3.1
|
||||
cd zlib
|
||||
cd ..
|
||||
fi
|
||||
if [ ! -d "$JSON_DIR" ]; then
|
||||
echo "$JSON_DIR does not exist. Set in build_emscripten.sh or install the nlohmann-json headers!"
|
||||
exit 1
|
||||
fi
|
||||
rm -rf ../../src/thirdparty/nlohmann
|
||||
cp -r $JSON_DIR ../../src/thirdparty/nlohmann
|
||||
|
||||
cd speexdsp
|
||||
emmake ./autogen.sh
|
||||
emmake ./configure --enable-shared --disable-neon
|
||||
emmake make -j$(nproc)
|
||||
cd $START_DIR/ext/
|
||||
|
||||
cd icu/icu4c/source
|
||||
ac_cv_namespace_ok=yes icu_cv_host_frag=mh-linux emmake ./configure \
|
||||
--enable-release \
|
||||
--enable-shared \
|
||||
--disable-icu-config \
|
||||
--disable-extras \
|
||||
--disable-icuio \
|
||||
--disable-layoutex \
|
||||
--disable-tools \
|
||||
--disable-tests \
|
||||
--disable-samples
|
||||
emmake make -j$(nproc)
|
||||
cd $START_DIR/ext/
|
||||
|
||||
cd zlib
|
||||
emcmake cmake ./
|
||||
emmake make zlib -j$(nproc)
|
||||
emmake make install
|
||||
ZLIB_ROOT=$(pwd)
|
||||
cd $START_DIR/ext/
|
||||
|
||||
cd libzip
|
||||
mkdir -p build/
|
||||
cd build/
|
||||
emcmake cmake ../ -DZLIB_INCLUDE_DIR="$ZLIB_ROOT" -DZLIB_LIBRARY="$ZLIB_ROOT/libz.a"
|
||||
emmake make zip -j$(nproc)
|
||||
emmake make install
|
||||
|
||||
cd $START_DIR
|
||||
}
|
||||
|
||||
if [ "$1" != "skip" ] ; then
|
||||
build_ext
|
||||
fi
|
||||
|
||||
emcmake cmake ../ \
|
||||
-G Ninja \
|
||||
-DDISABLE_NETWORK=ON \
|
||||
-DDISABLE_HTTP=ON \
|
||||
-DDISABLE_TTF=ON \
|
||||
-DDISABLE_FLAC=ON \
|
||||
-DDISABLE_DISCORD_RPC=ON \
|
||||
-DCMAKE_SYSTEM_NAME=Emscripten \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DSPEEXDSP_INCLUDE_DIR="$(pwd)/ext/speexdsp/include/" \
|
||||
-DSPEEXDSP_LIBRARY="$(pwd)/ext/speexdsp/libspeexdsp/.libs/libspeexdsp.a" \
|
||||
-DICU_INCLUDE_DIR="$ICU_ROOT/common" \
|
||||
-DICU_DATA_LIBRARIES=$ICU_ROOT/lib/libicuuc.so \
|
||||
-DICU_DT_LIBRARY_RELEASE="$ICU_ROOT/stubdata/libicudata.so" \
|
||||
-DLIBZIP_LIBRARIES="$(pwd)/ext/libzip/build/lib/libzip.a" \
|
||||
-DEMSCRIPTEN_FLAGS="-s USE_SDL=2 -s USE_BZIP2=1 -s USE_LIBPNG=1 -pthread -O3" \
|
||||
-DEMSCRIPTEN_LDFLAGS="-Wno-pthreads-mem-growth -s ASYNCIFY -s FULL_ES3 -s SAFE_HEAP=0 -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s INITIAL_MEMORY=2GB -s MAX_WEBGL_VERSION=2 -s PTHREAD_POOL_SIZE=120 -pthread -s EXPORTED_RUNTIME_METHODS=FS,callMain,UTF8ToString,stringToNewUTF8 -lidbfs.js --use-preload-plugins -s MODULARIZE=1 -s 'EXPORT_NAME=\"OPENRCT2_WEB\"'"
|
||||
|
||||
emmake ninja -j$(nproc)
|
||||
|
||||
rm -rf www/
|
||||
mkdir -p www/
|
||||
cd www/
|
||||
cp -r ../openrct2.* ./
|
||||
cp -r ../static/* ./
|
||||
cp -r ../static/.* ./
|
||||
|
||||
echo "finished!"
|
Loading…
Reference in a new issue