How to build web version of easyrpg player?

I really like easyrpg player, but it’s not easy for me to understand how to compile it :slight_smile:

Could anyone describe steps how to compile js/wasm version of easyrpg player please?

OS doesn’t matter, I will install windows/any linux if needed.

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

First run the 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 “” and then “” 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 “” etc.

cmake . -GNinja -Bbuild \
  -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN_DIR/emsdk-portable/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \

Then build and install:

cmake --build build --target install

The output dir will contain the files you need.

Ghabry, thank you very much!

If somebody gonna build it on Ubuntu - there’s command to install all necessary packages:
sudo apt install git curl autoconf libtool build-essential cmake ninja-build


Wow… This script takes hours to complete… Like 3 hours minimum, is that normal? :sweat_smile:

I tried this but I have this error :
I checked for the icu libs I could find, I have everything up-to-date but it still shows this…

    -- The following ICU libraries were not found:
    --   i18n (required)
    --   uc (required)
    --   data (required)
    CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
      Failed to find all ICU components (missing: ICU_INCLUDE_DIR ICU_LIBRARY
    Call Stack (most recent call first):
      /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
      /usr/share/cmake-3.13/Modules/FindICU.cmake:317 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
      lib/liblcf/CMakeLists.txt:330 (find_package)

    -- Configuring incomplete, errors occurred!

That depends on your computer and your internet connection. For me it takes 30 minutes.

Also for this index.html changing you do not need to recompile the Player. Just edit the index.html of the available bundle.

Did you correctly replace “$TOOLCHAIN_DIR” (including the $) with the path to your emscripten directory? Also always delete the CMakeCache.txt file before you retry the Cmake command.

You could also check if you see “icu*.a” files in emscripten/lib.

I’ve made an environment variable with that name (TOOLCHAIN_DIR) containing the path…
I will see in few hours after the end of the script I have re-runned just in case. :sweat_smile:
EDIT: Ok, I needed to use the absolute path, not a relative path… ^^"
EDIT2: Seems to work, now! Thank you very much, Ghabry!

Err… no, it’s not for my previous question, I am attempting to change the font with my own custom font… Not sure I’ve done everything right but I managed to edit the shionome generate_cxx_font.rb in order to inject my bdf font, I followed some older topics about it.
I think I have to re-compile the player if I want to change the font…

I am on Windows/WSL and I am using my phone shared 4G internet connection, I guess that’s why it takes so much time. :sweat_smile: The “checking” parts seems to be the longest…

Well… I did it!! I managed to change the font!! :partying_face:
My game would have been boring without its own weird custom funny font! (I am maniac)

Thank you very much, Ghabry!

Default (top) VS Custom (bottom)

1 Like