[DOC] Update INSTALL,md with remark-lint fixes.

This commit is contained in:
Dave Davenport 2023-03-27 00:24:51 +02:00
parent 9482f3c508
commit feb173a4ea
1 changed files with 123 additions and 45 deletions

View File

@ -1,6 +1,7 @@
# Installation guide # Installation guide
This guide explains how to install rofi using its build system and how you can make debug builds. This guide explains how to install rofi using its build system and how you can
make debug builds.
Rofi uses autotools (GNU Build system), for more information see Rofi uses autotools (GNU Build system), for more information see
[here](https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html). [here](https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html).
@ -8,41 +9,64 @@ You can also use [Meson](https://mesonbuild.com/) as an alternative.
## DEPENDENCY ## DEPENDENCY
### For building: ### For building
* C compiler that supports the c99 standard. (gcc or clang) - C compiler that supports the c99 standard. (gcc or clang)
* make
* autoconf - make
* automake (1.11.3 or up)
* pkg-config - autoconf
* flex 2.5.39 or higher
* bison - automake (1.11.3 or up)
* check (Can be disabled using the `--disable-check` configure flag)
- pkg-config
- flex 2.5.39 or higher
- bison
- check (Can be disabled using the `--disable-check` configure flag)
check is used for build-time tests and does not affect functionality. check is used for build-time tests and does not affect functionality.
* Developer packages of the external libraries
* glib-compile-resources - Developer packages of the external libraries
- glib-compile-resources
### External libraries ### External libraries
* libpango >= 1.50 - libpango >= 1.50
* libpangocairo
* libcairo
* libcairo-xcb
* libglib2.0 >= 2.68
* gmodule-2.0
* gio-unix-2.0
* libgdk-pixbuf-2.0
* libstartup-notification-1.0
* libxkbcommon >= 0.4.1
* libxkbcommon-x11
* libxcb (sometimes split, you need libxcb, libxcb-xkb and libxcb-randr libxcb-xinerama)
* xcb-util
* xcb-util-wm (sometimes split as libxcb-ewmh and libxcb-icccm)
* xcb-util-cursor
* xcb-imdkit (optional, 1.0.3 or up preferred)
On debian based systems, the developer packages are in the form of: `<package>-dev` on rpm based - libpangocairo
`<package>-devel`.
- libcairo
- libcairo-xcb
- libglib2.0 >= 2.68
- gmodule-2.0
- gio-unix-2.0
- libgdk-pixbuf-2.0
- libstartup-notification-1.0
- libxkbcommon >= 0.4.1
- libxkbcommon-x11
- libxcb (sometimes split, you need libxcb, libxcb-xkb and libxcb-randr
libxcb-xinerama)
- xcb-util
- xcb-util-wm (sometimes split as libxcb-ewmh and libxcb-icccm)
- xcb-util-cursor
- xcb-imdkit (optional, 1.0.3 or up preferred)
On debian based systems, the developer packages are in the form of:
`<package>-dev` on rpm based `<package>-devel`.
## Install from a release ## Install from a release
@ -50,59 +74,79 @@ On debian based systems, the developer packages are in the form of: `<package>-d
Create a build directory and enter it: Create a build directory and enter it:
```bash
mkdir build && cd build mkdir build && cd build
```
Check dependencies and configure build system: Check dependencies and configure build system:
```bash
../configure ../configure
```
Build Rofi: Build Rofi:
```bash
make make
```
The actual install, execute as root (if needed): The actual install, execute as root (if needed):
```bash
make install make install
```
The default installation prefix is: `/usr/local/` use `./configure --prefix={prefix}` to install into another location. The default installation prefix is: `/usr/local/` use `./configure
--prefix={prefix}` to install into another location.
### Meson ### Meson
Check dependencies and configure build system: Check dependencies and configure build system:
```bash
meson setup build meson setup build
```
Build Rofi: Build Rofi:
```bash
ninja -C build ninja -C build
```
The actual install, execute as root (if needed): The actual install, execute as root (if needed):
```bash
ninja -C build install ninja -C build install
```
The default installation prefix is: `/usr/local/` use `meson setup build --prefix={prefix}` to install into another location. The default installation prefix is: `/usr/local/` use `meson setup build
--prefix={prefix}` to install into another location.
## Install a checkout from git ## Install a checkout from git
The GitHub Pages version of these directions may be out of date. Please use The GitHub Pages version of these directions may be out of date. Please use
[INSTALL.md from the online repo][master-install] or your local repository. [INSTALL.md from the online repo][master-install] or your local repository.
[master-install]: https://github.com/DaveDavenport/rofi/blob/master/INSTALL.md#install-a-checkout-from-git
If you don't have a checkout: If you don't have a checkout:
```bash
git clone --recursive https://github.com/DaveDavenport/rofi git clone --recursive https://github.com/DaveDavenport/rofi
cd rofi/ cd rofi/
```
If you already have a checkout: If you already have a checkout:
```bash
cd rofi/ cd rofi/
git pull git pull
git submodule update --init git submodule update --init
```
For Autotools you have an extra step, to generate build system: For Autotools you have an extra step, to generate build system:
```bash
autoreconf -i autoreconf -i
```
From this point, use the same steps you use for a release. From this point, use the same steps you use for a release.
@ -112,36 +156,45 @@ When you run the configure step there are several options you can configure.
For Autotools, you can see the full list with `./configure --help`. For Autotools, you can see the full list with `./configure --help`.
For Meson, before the initial setup, you can see rofi options in `meson_options.txt` and Meson options with `meson setup --help`. For Meson, before the initial setup, you can see rofi options in
Meson's built-in options can be set using regular command line arguments, like so: `meson setup build --option=value`. `meson_options.txt` and Meson options with `meson setup --help`. Meson's
Rofi-specific options can be set using the `-D` argument, like so: `meson setup build -Doption=value`. built-in options can be set using regular command line arguments, like so:
After the build dir is set up by `meson setup build`, the `meson configure build` command can be used to configure options, by the same means. `meson setup build --option=value`. Rofi-specific options can be set using the
`-D` argument, like so: `meson setup build -Doption=value`. After the build dir
is set up by `meson setup build`, the `meson configure build` command can be
used to configure options, by the same means.
The most useful one to set is the installation prefix: The most useful one to set is the installation prefix:
```bash
# Autotools # Autotools
../configure --prefix=<installation path> ../configure --prefix=<installation path>
# Meson # Meson
meson setup build --prefix <installation path> meson setup build --prefix <installation path>
```
f.e. f.e.
```bash
# Autotools # Autotools
../configure --prefix=/usr/ ../configure --prefix=/usr/
# Meson # Meson
meson setup build --prefix /usr meson setup build --prefix /usr
```
### Install locally ### Install locally
or to install locally: or to install locally:
```bash
# Autotools # Autotools
../configure --prefix=${HOME}/.local/ ../configure --prefix=${HOME}/.local/
# Meson # Meson
meson setup build --prefix ${HOME}/.local meson setup build --prefix ${HOME}/.local
```
## Options for make ## Options for make
@ -151,38 +204,45 @@ When you run make you can tweak the build process a little.
Show the commands called: Show the commands called:
```bash
# Autotools # Autotools
make V=1 make V=1
# Meson # Meson
ninja -C build -v ninja -C build -v
```
### Debug build ### Debug build
Compile with debug symbols and no optimization, this is useful for making backtraces: Compile with debug symbols and no optimization, this is useful for making
backtraces:
```bash
# Autotools # Autotools
make CFLAGS="-O0 -g3" clean rofi make CFLAGS="-O0 -g3" clean rofi
# Meson # Meson
meson configure build --debug meson configure build --debug
ninja -C build ninja -C build
```
### Get a backtrace ### Get a backtrace
Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it grabs keyboard and Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it
mouse. So if it crashes in GDB you are stuck. grabs keyboard and mouse. So if it crashes in GDB you are stuck. The best way
The best way to go is to enable core file. (ulimit -c unlimited in bash) then make rofi crash. You to go is to enable core file. (ulimit -c unlimited in bash) then make rofi
can then load the core in GDB. crash. You can then load the core in GDB.
```bash
# Autotools # Autotools
gdb rofi core gdb rofi core
# Meson (because it uses a separate build directory) # Meson (because it uses a separate build directory)
gdb build/rofi core gdb build/rofi core
```
> Where the core file is located and what its exact name is different on each distributions. Please consult the > Where the core file is located and what its exact name is different on each
> relevant documentation. > distributions. Please consult the relevant documentation.
For more information see the rofi-debugging(5) manpage. For more information see the rofi-debugging(5) manpage.
@ -190,26 +250,36 @@ For more information see the rofi-debugging(5) manpage.
### Debian or Ubuntu ### Debian or Ubuntu
```bash
apt install rofi apt install rofi
````
### Fedora ### Fedora
```bash
dnf install rofi dnf install rofi
````
### ArchLinux ### ArchLinux
```bash
pacman -S rofi pacman -S rofi
````
### Gentoo ### Gentoo
An ebuild is available, `x11-misc/rofi`. It's up to date, but you may need to An ebuild is available, `x11-misc/rofi`. It's up to date, but you may need to
enable ~arch to get the latest release: enable ~arch to get the latest release:
```bash
echo 'x11-misc/rofi ~amd64' >> /etc/portage/package.accept_keywords echo 'x11-misc/rofi ~amd64' >> /etc/portage/package.accept_keywords
````
for amd64 or: for amd64 or:
```bash
echo 'x11-misc/rofi ~x86' >> /etc/portage/package.accept_keywords echo 'x11-misc/rofi ~x86' >> /etc/portage/package.accept_keywords
````
for i386. for i386.
@ -219,14 +289,22 @@ To install it, simply issue `emerge rofi`.
On both openSUSE Leap and openSUSE Tumbleweed rofi can be installed using: On both openSUSE Leap and openSUSE Tumbleweed rofi can be installed using:
```bash
sudo zypper install rofi sudo zypper install rofi
````
### FreeBSD ### FreeBSD
```bash
sudo pkg install rofi sudo pkg install rofi
````
### macOS ### macOS
On macOS rofi can be installed via [MacPorts](https://www.macports.org): On macOS rofi can be installed via [MacPorts](https://www.macports.org):
```bash
sudo port install rofi sudo port install rofi
```
[master-install]: https://github.com/DaveDavenport/rofi/blob/master/INSTALL.md#install-a-checkout-from-git