Skip to content

Build for GNU Linux

Daijiro Fukuda edited this page Dec 9, 2022 · 5 revisions

The following steps assume Ubuntu.

Prepare

Install dependent packages:

$ sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev

If freetype is not found, you may need libfreetype6-dev or libfreetype-dev.

$ sudo apt install libfreetype6-dev

Build

  1. Build the forked GLFW in which we are developing IME support: https://github.com/clear-code/glfw/tree/3.4-2022-09-21+im-support-all
$ git clone --branch=3.4-2022-09-21+im-support-all https://github.com/clear-code/glfw.git
$ cd glfw
$ cmake -B build -DCMAKE_INSTALL_PREFIX=bin
$ make -C build -j$(nproc) install
  1. Build the forked raylib in which we are developing IME support: https://github.com/clear-code/raylib/tree/4.2-2022-11-29+better-ime-support-all
$ git clone --branch=4.2-2022-11-29+better-ime-support-all https://github.com/clear-code/raylib.git
$ cd raylib
$ cmake -B build -DCMAKE_INSTALL_PREFIX=bin \
  -DUSE_EXTERNAL_GLFW=ON \
  -DCMAKE_PREFIX_PATH="{path of GLFW built in step-1}"
$ make -C build -j$(nproc) install
  1. Build and run this app
    • Set USE_EXTERNAL_GLFW ON
    • Specify both of the path of GLFW built in step-1 and raylib built in step-2 to CMAKE_PREFIX_PATH
      • Ex: -DCMAKE_PREFIX_PATH="/test/glfw/bin;/test/raylib/bin;"
$ cmake -B build -DCMAKE_INSTALL_PREFIX=bin \
  -DUSE_EXTERNAL_GLFW=ON \
  -DCMAKE_PREFIX_PATH="{path of GLFW built in step-1};{path of raylib built in step-2};"
$ make -C build -j$(nproc) install
$ bin/RaylibIMEInputSampleApp

Use internal GLFW for Build

We are not currently developing in this way.

  1. Build the forked raylib in which we are developing IME support: https://github.com/clear-code/raylib/tree/better-ime-support-for-internal-glfw
$ git clone --branch=better-ime-support-for-internal-glfw [email protected]:clear-code/raylib.git
$ cd raylib
$ cmake -B build -DCMAKE_INSTALL_PREFIX=bin
$ make -C build -j$(nproc) install
  1. Build and run this app
    • Specify the path of raylib built in step-1 to CMAKE_PREFIX_PATH
      • Ex: -DCMAKE_PREFIX_PATH=/test/raylib/bin
$ cmake -B build -DCMAKE_INSTALL_PREFIX=bin -DCMAKE_PREFIX_PATH={...}
$ make -C build -j$(nproc) install
$ cd bin
$ ./RaylibIMEInputSampleApp

Clone this wiki locally