How to build web version of easyrpg player?

Hello.
We only support building it on Linux (you can also use WSL on Windows for this).

First run the 0.sh script from this repository:

If the script fails you probably miss some packages such as pkg-config, unzip or patch.

When the script fails due to this run “3.sh” and then “0.sh” again.


Now about building Player. Run the following cmake command in the Player repository:

TOOLCHAIN_DIR is the path of the emscripten directory that contains “0.sh” etc.

cmake . -GNinja -Bbuild \
  -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN_DIR/emsdk-portable/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \
  -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH \
  -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH \
  -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH \
  -DCMAKE_PREFIX_PATH="$TOOLCHAIN_DIR" \
  -DCMAKE_INSTALL_PREFIX=output -DCMAKE_BUILD_TYPE=Release \
  -DPLAYER_BUILD_LIBLCF=ON \
  -DPLAYER_JS_BUILD_SHELL=ON"

Then build and install:

cmake --build build --target install

The output dir will contain the files you need.