mirror of
https://github.com/swaywm/sway.git
synced 2024-11-24 00:41:28 +00:00
small edits here and there
parent
791c38d8dc
commit
0a4b1985bc
|
@ -1,11 +1,11 @@
|
|||
This page is intended as a guide for those who wish to build the HEAD of Sway and wlroots for testing or development purposes. If you are an end-user, this page isn't relevant to you.
|
||||
This page is intended as a guide for those who wish to build the HEAD of sway and wlroots for testing or development purposes. This page isn't relevant to end-users.
|
||||
|
||||
# Dependencies
|
||||
|
||||
You're going to need the following tools to get started:
|
||||
|
||||
* git
|
||||
* gcc or clang
|
||||
* [git](https://git-scm.com/)
|
||||
* [gcc](https://gcc.gnu.org/) or [clang](https://clang.llvm.org/)
|
||||
* [meson](https://mesonbuild.com/)
|
||||
* [ninja](https://ninja-build.org/)
|
||||
|
||||
|
@ -13,7 +13,7 @@ You'll also need the dependencies, which you can find in the [README](https://gi
|
|||
|
||||
## Arch Linux
|
||||
|
||||
The Arch User Repository (AUR) has the convenient `sway-git` and `wlroots-git` package bundles, which contain everything you'll need to compile their respective projects. Use your preferred AUR helper to install these.
|
||||
The Arch User Repository (AUR) has the convenient `sway-git` and `wlroots-git` packages, which contain everything you'll need to compile their respective projects. Use your preferred AUR helper to install these.
|
||||
|
||||
## Fedora
|
||||
|
||||
|
@ -21,7 +21,7 @@ Fedora requires installing all of the dependencies one-by-one. `--releasever=29`
|
|||
|
||||
**Note**: `wayland-protocols-devel` is currently outdated for release 29. You will need to pull and install this for yourself from https://github.com/wayland-project/wayland-protocols.
|
||||
|
||||
```
|
||||
```sh
|
||||
dnf install -y --releasever=29 git gcc meson ninja-build wayland-devel mesa-libEGL-devel mesa-libGLES-devel mesa-dri-drivers xorg-x11-server-Xwayland libdrm-devel libgbm-devel libxkbcommon-devel libudev-devel pixman-devel libinput-devel libevdev-devel systemd-devel cairo-devel libpcap-devel json-c-devel pam-devel pango-devel pcre-devel gdk-pixbuf2-devel
|
||||
```
|
||||
|
||||
|
@ -31,7 +31,7 @@ On Debian-based distributions, library packages are commonly suffixed by `-dev`.
|
|||
|
||||
# Compiling as a subproject
|
||||
|
||||
To run Sway, you don't need to install it. You can build it and start it directly. Using a subproject will allow you to easily work on wlroots and Sway at the same time.
|
||||
You can build and run sway directly without installing it. A subproject allows to easily work on wlroots and sway at the same time.
|
||||
|
||||
```sh
|
||||
# Clone repositories
|
||||
|
@ -40,11 +40,11 @@ cd sway
|
|||
mkdir subprojects
|
||||
git clone git@github.com:swaywm/wlroots.git subprojects/wlroots
|
||||
|
||||
# Build Sway and wlroots
|
||||
# Build sway and wlroots
|
||||
meson build/
|
||||
ninja -C build/
|
||||
|
||||
# Start Sway
|
||||
# Start sway
|
||||
build/sway/sway
|
||||
```
|
||||
|
||||
|
@ -54,21 +54,21 @@ When pulling from the Sway repo, remember to also pull from the wlroots repo.
|
|||
|
||||
# System-wide installation
|
||||
|
||||
This section is relevant if you want to install both wlroots and Sway system-wide (without using a subproject).
|
||||
This section is relevant if you want to install both wlroots and sway system-wide (not using a subproject).
|
||||
|
||||
# Variables
|
||||
## Variables
|
||||
|
||||
_If you don't want to add the paths below to your `~/.profile`, you can paste these lines into your terminal to set the variables for the current terminal session only._
|
||||
|
||||
Ensure that `/usr/local/bin` is in your `PATH` by executing `echo $PATH`. If it isn't, open `~/.profile` and add:
|
||||
|
||||
```
|
||||
```sh
|
||||
export PATH=/usr/local/bin:$PATH
|
||||
```
|
||||
|
||||
Ensure that your `PKG_CONFIG_PATH` contains `/usr/local/lib/pkgconfig`, `/usr/local/lib64/pkgconfig`, and `/usr/local/share/pkgconfig` by executing `echo $PKG_CONFIG_PATH`. If it doesn't, open `~/.profile` and add:
|
||||
|
||||
```
|
||||
```sh
|
||||
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:$PKG_CONFIG_PATH
|
||||
export PKG_CONFIG_PATH=/usr/local/share/pkgconfig:$PKG_CONFIG_PATH
|
||||
|
@ -76,26 +76,27 @@ export PKG_CONFIG_PATH=/usr/local/share/pkgconfig:$PKG_CONFIG_PATH
|
|||
|
||||
Ensure that your `LD_LIBRARY_PATH` contains `/usr/local/lib/` and `/usr/local/lib64/` by executing `echo $LD_LIBRARY_PATH`. If it doesn't, open the `~/.profile` file located in your home directory and add:
|
||||
|
||||
```
|
||||
```sh
|
||||
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH=/usr/local/lib64/:$LD_LIBRARY_PATH
|
||||
```
|
||||
|
||||
Execute `source ~/.profile` to update the variables for your current terminal session. You should ensure that your chosen shell sources `~/.profile` on login (you may need to delete `~/.bash_profile` for it to take precedent).
|
||||
|
||||
# Compiling
|
||||
You're now ready to compile wlroots, which is the Wayland compositor library used by Sway.
|
||||
## Compiling
|
||||
|
||||
You're now ready to compile wlroots, which is the Wayland compositor library used by sway.
|
||||
* Clone the [`wlroots`](https://github.com/swaywm/wlroots) repository with git
|
||||
* Execute `meson build`, which will create the `build` directory
|
||||
* Execute `ninja -C build` to build
|
||||
* Execute `sudo ninja -C build install` to install
|
||||
* Verify that either `/usr/local/lib` or `/usr/local/lib64` contain `libwlroots.so`
|
||||
|
||||
Now that wlroots is built and installed, you can build Sway.
|
||||
* Clone the [`Sway`](https://github.com/swaywm/sway) repository with git
|
||||
Now that wlroots is built and installed, you can build sway.
|
||||
* Clone the [`sway`](https://github.com/swaywm/sway) repository with git
|
||||
* Execute `meson build`, which will create the `build` directory
|
||||
* Execute `ninja -C build` to build
|
||||
* Execute `sudo ninja -C build install` to install
|
||||
* Verify that `/usr/local/bin` contains the `sway`, `swaybar`, `swaylock`, etc. binaries
|
||||
|
||||
Since Sway and wlroots development moves quite fast, it's common to have issues compiling Sway if your installed version of wlroots is behind. As a first step of compile error troubleshooting, pull, build, and reinstall wlroots.
|
||||
Since sway and wlroots development moves fast, it's common to have issues compiling sway if your installed version of wlroots is behind. As a first step of compile error troubleshooting, pull, build, and reinstall wlroots.
|
Loading…
Reference in a new issue