-
Notifications
You must be signed in to change notification settings - Fork 2
Build for GNU Linux
Daijiro Fukuda edited this page Dec 15, 2022
·
5 revisions
The following steps assume Ubuntu.
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 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
- Build the forked raylib in which we are developing IME support: https://github.com/clear-code/raylib/tree/4.2-2022-12-14+better-ime-support-all
- Refer to: https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux
- Set
USE_EXTERNAL_GLFW
ON
- Specify the path of GLFW built in step-1 to
CMAKE_PREFIX_PATH
- Ex:
-DCMAKE_PREFIX_PATH=/test/glfw/bin
- Ex:
$ git clone --branch=4.2-2022-12-14+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
- Build and run this app
- Set
USE_EXTERNAL_GLFW
ON
- Set
USE_SOFT_FULLSCREEN
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;"
- Ex:
- Set
$ cmake -B build -DCMAKE_INSTALL_PREFIX=bin \
-DUSE_EXTERNAL_GLFW=ON \
-DUSE_SOFT_FULLSCREEN=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
Basically the same, but some additional options need to be set for building GLFW and raylib.
- GLFW: in addition to the above steps, please set the following options as well.
- Set
GLFW_BUILD_WAYLAND
ON
- Set
GLFW_BUILD_X11
OFF
- Set
$ 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 -DGLFW_BUILD_WAYLAND=ON -DGLFW_BUILD_X11=OFF
$ make -C build -j$(nproc) install
- raylib: in addition to the above steps, please set the following options as well.
- Set
USE_WAYLAND
ON
too
- Set
$ git clone --branch=4.2-2022-12-14+better-ime-support-all https://github.com/clear-code/raylib.git
$ cd raylib
$ cmake -B build -DCMAKE_INSTALL_PREFIX=bin \
-DUSE_EXTERNAL_GLFW=ON \
-DUSE_WAYLAND=ON \
-DCMAKE_PREFIX_PATH="{path of GLFW built in step-1}"
$ make -C build -j$(nproc) install
- This app: no need to set additional options. Please build it as above.
We are not currently developing in this way.
- 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
- 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
- Ex:
- Specify the path of raylib built in step-1 to
$ cmake -B build -DCMAKE_INSTALL_PREFIX=bin -DCMAKE_PREFIX_PATH={...}
$ make -C build -j$(nproc) install
$ cd bin
$ ./RaylibIMEInputSampleApp