Skip to content

Commit 5d6de17

Browse files
authored
thirdparty,sokol: add wayland support (#26682)
* thirdparty,sokol: add wayland support * review * chore: include headers and sources directly instead of static linking
1 parent 4b29e67 commit 5d6de17

68 files changed

Lines changed: 31826 additions & 10504 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs_ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
runs-on: ubuntu-24.04
4040
timeout-minutes: 5
4141
env:
42-
MOPTIONS: --diff --deprecated --relative-paths --exclude /vlib/v/ --exclude /builtin/linux_bare/ --exclude /testdata/ --exclude /tests/
42+
MOPTIONS: --diff --deprecated --relative-paths --exclude /vlib/v/ --exclude /vlib/v2/ --exclude /builtin/linux_bare/ --exclude /testdata/ --exclude /tests/ --exclude /vlib/sokol/ --exclude /vlib/x/
4343
steps:
4444
- uses: actions/checkout@v6
4545
- name: Build V

.github/workflows/gg_regressions_ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ jobs:
3636
- name: Build local v
3737
run: make -j4 && ./v symlink
3838

39+
- name: Clear module cache
40+
run: ./v wipe-cache
41+
3942
- name: Setup dependencies
4043
run: |
4144
# imagemagick : convert, mogrify
@@ -44,9 +47,10 @@ jobs:
4447
# libxcursor-dev libxi-dev : V gfx deps
4548
# libgl1-mesa-dri : For headless rendering / software DRI driver (LIBGL_ALWAYS_SOFTWARE=true)
4649
# freeglut3-dev : Fixes graphic apps compilation with tcc
50+
# libx11-dev : X11 headers for clipboard and sokol (default backend on Linux)
4751
.github/workflows/disable_azure_mirror.sh
4852
./v retry -- sudo apt update
49-
./v retry -- sudo apt install imagemagick openimageio-tools libgl1-mesa-dri xvfb libxcursor-dev libxi-dev libxrandr-dev freeglut3-dev xsel xclip
53+
./v retry -- sudo apt install imagemagick openimageio-tools libgl1-mesa-dri xvfb libxcursor-dev libxi-dev libxrandr-dev freeglut3-dev xsel xclip libx11-dev
5054
./v retry -- ./v download https://raw.githubusercontent.com/tremby/imgur.sh/c98345d/imgur.sh
5155
./v retry -- git clone https://github.com/Larpon/gg-regression-images gg-regression-images
5256
chmod +x ./imgur.sh

ci/linux_ci.vsh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ fn install_dependencies_for_examples_and_tools_tcc() {
5555
}
5656
exec('v retry -- sudo apt update')
5757
exec('v retry -- sudo apt install --quiet -y libssl-dev sqlite3 libsqlite3-dev valgrind')
58-
exec('v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev')
58+
exec('v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev libegl-dev')
59+
// Wayland development libraries for sokol Wayland support
60+
exec('v retry -- sudo apt install --quiet -y libwayland-dev libxkbcommon-dev libwayland-egl1-mesa libxkbcommon-x11-dev')
5961
// The following is needed for examples/wkhtmltopdf.v
6062
exec('v retry -- sudo apt install --quiet -y xfonts-75dpi xfonts-base expect')
6163
exec('v retry -- wget --quiet https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb')
@@ -179,6 +181,8 @@ fn install_dependencies_for_examples_and_tools_gcc() {
179181
exec('v retry -- sudo apt update')
180182
exec('v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind')
181183
exec('v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev')
184+
// Wayland development libraries for sokol Wayland support
185+
exec('v retry -- sudo apt install --quiet -y libwayland-dev libxkbcommon-dev libwayland-egl1-mesa libxkbcommon-x11-dev wayland-protocols libegl-dev')
182186
}
183187
184188
fn recompile_v_with_cstrict_gcc() {
@@ -301,6 +305,8 @@ fn install_dependencies_for_examples_and_tools_clang() {
301305
exec('v retry -- sudo apt update')
302306
exec('v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind')
303307
exec('v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev')
308+
// Wayland development libraries for sokol Wayland support
309+
exec('v retry -- sudo apt install --quiet -y libwayland-dev libxkbcommon-dev libwayland-egl1-mesa libxkbcommon-x11-dev wayland-protocols libegl-dev')
304310
exec('v retry -- sudo apt install --quiet -y clang')
305311
}
306312

examples/sokol/07_simple_shader_glsl/simple_shader.v

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ fn (mut a App) run() {
6060
init_userdata_cb: init
6161
frame_userdata_cb: frame
6262
window_title: &char(title.str)
63-
html5_canvas_name: &char(title.str)
6463
cleanup_userdata_cb: cleanup
6564
sample_count: 4 // Enables MSAA (Multisample anti-aliasing) x4 on rendered output, this can be omitted.
6665
}

examples/sokol/drawing.v

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ fn main() {
1919
init_userdata_cb: init
2020
frame_userdata_cb: frame
2121
window_title: &char(title.str)
22-
html5_canvas_name: &char(title.str)
2322
}
2423
sapp.run(&desc)
2524
}

examples/sokol/fonts.v

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ fn main() {
2424
init_userdata_cb: init
2525
frame_userdata_cb: frame
2626
window_title: &char(title.str)
27-
html5_canvas_name: &char(title.str)
2827
}
2928
sapp.run(&desc)
3029
}

examples/sokol/freetype_raven.v

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ fn main() {
8181
init_userdata_cb: init
8282
frame_userdata_cb: frame
8383
window_title: &char(title.str)
84-
html5_canvas_name: &char(title.str)
8584
width: 600
8685
height: 700
8786
high_dpi: true

examples/sokol/particles/particles.v

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ fn (mut a App) run() {
5757
frame_userdata_cb: frame
5858
event_userdata_cb: event
5959
window_title: &char(title.str)
60-
html5_canvas_name: &char(title.str)
6160
cleanup_userdata_cb: cleanup
6261
}
6362
sapp.run(&desc)

0 commit comments

Comments
 (0)