Skip to content

Commit

Permalink
add install instructions for libxrandr-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Jan 2, 2025
1 parent 86cf89c commit a853b62
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/other_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/sanitized_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/v_apps_and_modules_compile_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,16 +266,21 @@ v run news_fetcher.v
v run tetris/tetris.v
```


<img src='https://raw.githubusercontent.com/vlang/v/master/examples/tetris/screenshot.png' width=300 alt='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`

Expand Down
6 changes: 3 additions & 3 deletions ci/linux_ci.vsh
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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')
}

Expand Down
1 change: 1 addition & 0 deletions examples/tetris/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down

0 comments on commit a853b62

Please sign in to comment.