From a853b62caf4cc4c09844a7a045f5d7f1fc4bfe1a Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 2 Jan 2025 14:48:09 +0200 Subject: [PATCH] add install instructions for libxrandr-dev --- .github/workflows/other_ci.yml | 2 +- .github/workflows/sanitized_ci.yml | 10 +++++----- .../workflows/v_apps_and_modules_compile_ci.yml | 2 +- README.md | 15 ++++++++++----- ci/linux_ci.vsh | 6 +++--- examples/tetris/README.md | 1 + 6 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/other_ci.yml b/.github/workflows/other_ci.yml index 9b7c5da77a8676..d9f0cfc8c82d75 100644 --- a/.github/workflows/other_ci.yml +++ b/.github/workflows/other_ci.yml @@ -101,7 +101,7 @@ jobs: run: | ./v retry -- sudo apt update ./v retry -- sudo apt install --quiet -y libsodium-dev libssl-dev sqlite3 libsqlite3-dev postgresql libpq-dev valgrind - ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libasound2-dev xfonts-75dpi xfonts-base + ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev xfonts-75dpi xfonts-base ./v retry -- sudo apt install --quiet -y g++-9 g++-10 - name: g++-9 version diff --git a/.github/workflows/sanitized_ci.yml b/.github/workflows/sanitized_ci.yml index 8120f6e097ef87..7143e675c109b4 100644 --- a/.github/workflows/sanitized_ci.yml +++ b/.github/workflows/sanitized_ci.yml @@ -90,7 +90,7 @@ jobs: run: | ./v retry -- sudo apt update ./v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind - ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libasound2-dev + ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev ./v retry -- sudo apt install clang - name: Recompile V with -cstrict run: ./v -cg -cstrict -o v cmd/v @@ -116,7 +116,7 @@ jobs: run: | ./v retry -- sudo apt update ./v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind - ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libasound2-dev + ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev - name: Recompile V with -cstrict run: ./v -cg -cstrict -o v cmd/v - name: Self tests (-fsanitize=undefined) @@ -141,7 +141,7 @@ jobs: run: | ./v retry -- sudo apt update ./v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind - ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libasound2-dev + ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev ./v retry -- sudo apt install clang - name: Recompile V with -cstrict run: ./v -cg -cstrict -o v cmd/v @@ -194,7 +194,7 @@ jobs: run: | ./v retry -- sudo apt update ./v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind - ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libasound2-dev + ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev ./v retry -- sudo apt install clang - name: Recompile V with -cstrict run: ./v -cg -cstrict -o v cmd/v @@ -224,7 +224,7 @@ jobs: run: | ./v retry -- sudo apt update ./v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind - ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libasound2-dev + ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev ./v retry -- sudo apt install clang - name: Recompile V with clang and -cstrict run: ./v -cc clang -cg -cstrict -o v cmd/v diff --git a/.github/workflows/v_apps_and_modules_compile_ci.yml b/.github/workflows/v_apps_and_modules_compile_ci.yml index 1937e525067dd5..569deae304941c 100644 --- a/.github/workflows/v_apps_and_modules_compile_ci.yml +++ b/.github/workflows/v_apps_and_modules_compile_ci.yml @@ -40,7 +40,7 @@ jobs: if [ $RUNNER_OS == 'Linux' ]; then v retry -- sudo apt -qq update v retry -- sudo apt -qq install libgc-dev libsodium-dev libssl-dev sqlite3 libsqlite3-dev - v retry -- sudo apt -qq install libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libasound2-dev xfonts-75dpi xfonts-base + v retry -- sudo apt -qq install libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev xfonts-75dpi xfonts-base v retry -- sudo apt -qq install sassc libgit2-dev # needed by gitly else v retry brew install sassc libgit2 diff --git a/README.md b/README.md index eee4eef374db35..0c7840b9d22023 100644 --- a/README.md +++ b/README.md @@ -266,16 +266,21 @@ v run news_fetcher.v v run tetris/tetris.v ``` + tetris screenshot -In order to build Tetris or 2048 (or anything else using `sokol` or `gg` graphics modules), -you will need additional development libraries for your system. +## Sokol and GG GUI apps/games: + +In order to build Tetris or 2048 (or anything else using the `sokol` or `gg` graphics modules), +you will need to install additional development libraries for your system. | System | Installation method | |---------------------|----------------------------------------------------------------------------------------------------| -| Debian/Ubuntu based | `sudo apt install libxi-dev libxcursor-dev libgl-dev libasound2-dev` | -| Fedora/RH/CentOS | `sudo dnf install libXcursor-devel libXi-devel libX11-devel libglvnd-devel` | -| NixOS | add `xorg.libX11.dev xorg.libXcursor.dev xorg.libXi.dev libGL.dev` to `environment.systemPackages` | +| Debian/Ubuntu based | Run `sudo apt install libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev` | +| Fedora/RH/CentOS | Run `sudo dnf install libXi-devel libXcursor-devel libX11-devel libXrandr-devel libglvnd-devel` | +| | | +| NixOS | Add `xorg.libX11.dev xorg.libXcursor.dev xorg.libXi.dev xorg.libXrandr.dev libGL.dev` to | +| | to `environment.systemPackages` | ## V net.http, net.websocket, `v install` diff --git a/ci/linux_ci.vsh b/ci/linux_ci.vsh index 1974b969bf0742..24ccd11a887d9f 100644 --- a/ci/linux_ci.vsh +++ b/ci/linux_ci.vsh @@ -58,7 +58,7 @@ fn build_v_with_prealloc() { fn install_dependencies_for_examples_and_tools_tcc() { exec('v retry -- sudo apt update') exec('v retry -- sudo apt install --quiet -y libssl-dev sqlite3 libsqlite3-dev valgrind') - exec('v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libasound2-dev') + exec('v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev') // The following is needed for examples/wkhtmltopdf.v exec('v retry -- wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb') exec('v retry -- sudo apt install --quiet -y xfonts-75dpi xfonts-base') @@ -171,7 +171,7 @@ fn all_code_is_formatted_gcc() { fn install_dependencies_for_examples_and_tools_gcc() { exec('v retry -- sudo apt update') exec('v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind') - exec('v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libasound2-dev') + exec('v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev') } fn recompile_v_with_cstrict_gcc() { @@ -287,7 +287,7 @@ fn all_code_is_formatted_clang() { fn install_dependencies_for_examples_and_tools_clang() { exec('v retry -- sudo apt update') exec('v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind') - exec('v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libasound2-dev') + exec('v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev') exec('v retry -- sudo apt install --quiet -y clang') } diff --git a/examples/tetris/README.md b/examples/tetris/README.md index 06fcba5e961845..e3192522873a7d 100644 --- a/examples/tetris/README.md +++ b/examples/tetris/README.md @@ -5,6 +5,7 @@ sudo apt install libx11-dev sudo apt install libxi-dev sudo apt install libxcursor-dev +sudo apt install libxrandr-dev sudo apt install libgl-dev ```