2014-07-27 10:46:00 +00:00
# Installation guide
2014-07-27 07:54:10 +00:00
2017-03-24 08:44:08 +00:00
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
[here ](https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html ).
2019-03-26 12:58:37 +00:00
You can also use [Meson ](https://mesonbuild.com/ ) as an alternative.
2017-03-24 08:44:08 +00:00
2014-07-27 07:54:10 +00:00
## DEPENDENCY
### For building:
2014-07-27 10:46:00 +00:00
* C compiler that supports the c99 standard. (gcc or clang)
2014-07-27 07:54:10 +00:00
* make
* autoconf
2015-03-24 15:02:03 +00:00
* automake (1.11.3 or up)
2015-05-25 08:30:32 +00:00
* pkg-config
2017-04-04 15:54:04 +00:00
* flex 2.5.39 or higher
2016-12-16 08:28:13 +00:00
* bison
2018-11-06 22:39:14 +00:00
* check (Can be disabled using the `--disable-check` configure flag)
2018-12-14 15:42:18 +00:00
check is used for build-time tests and does not affect functionality.
2015-03-24 15:02:03 +00:00
* Developer packages of the external libraries
2014-07-27 07:54:10 +00:00
### External libraries
2014-08-03 13:27:13 +00:00
* libpango
2015-10-25 10:11:42 +00:00
* libpangocairo
* libcairo
2016-03-05 10:38:41 +00:00
* libcairo-xcb
2015-12-01 21:35:05 +00:00
* libglib2.0 >= 2.40
2017-03-24 08:44:08 +00:00
* gmodule-2.0
* gio-unix-2.0
2017-09-04 19:39:22 +00:00
* librsvg2.0
2015-09-13 15:29:50 +00:00
* libstartup-notification-1.0
2017-05-28 00:18:09 +00:00
* libxkbcommon >= 0.4.1
2016-03-05 15:04:24 +00:00
* libxkbcommon-x11
2016-08-31 08:01:49 +00:00
* libxcb (sometimes split, you need libxcb, libxcb-xkb and libxcb-randr libxcb-xinerama)
2016-03-05 15:04:24 +00:00
* xcb-util
* xcb-util-wm (sometimes split as libxcb-ewmh and libxcb-icccm)
2018-11-06 22:39:14 +00:00
* xcb-util-xrm [new module might not be available in your distribution. The source can be found
here](https://github.com/Airblader/xcb-util-xrm/)
2014-07-27 07:54:10 +00:00
2015-05-25 08:30:32 +00:00
On debian based systems, the developer packages are in the form of: `<package>-dev` on rpm based
2016-03-05 15:04:24 +00:00
`<package>-devel` .
2015-05-25 08:30:32 +00:00
2014-07-27 10:46:00 +00:00
## Install from a release
2014-07-21 14:41:31 +00:00
2019-03-26 12:58:37 +00:00
### Autotools
Create a build directory and enter it:
```
mkdir build & & cd build
```
2014-07-21 14:41:31 +00:00
Check dependencies and configure build system:
2014-07-27 07:54:10 +00:00
```
2019-03-26 12:58:37 +00:00
../configure
2014-07-27 07:54:10 +00:00
```
2014-07-21 14:41:31 +00:00
Build Rofi:
2014-07-27 07:54:10 +00:00
```
make
```
2014-07-21 14:41:31 +00:00
The actual install, execute as root (if needed):
2014-07-27 07:54:10 +00:00
```
make install
```
2014-07-21 14:41:31 +00:00
2017-03-24 08:44:08 +00:00
The default installation prefix is: `/usr/local/` use `./configure --prefix={prefix}` to install into another location.
2014-07-21 14:41:31 +00:00
2019-05-10 18:05:38 +00:00
### Meson
Check dependencies and configure build system:
```
meson setup build
```
Build Rofi:
```
ninja -C build
```
The actual install, execute as root (if needed):
```
ninja -C build install
```
The default installation prefix is: `/usr/local/` use `meson setup build --prefix={prefix}` to install into another location.
2014-07-27 10:46:00 +00:00
## Install a checkout from git
2014-07-21 14:41:31 +00:00
2016-03-27 03:04:03 +00:00
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.
[master-install]: https://github.com/DaveDavenport/rofi/blob/master/INSTALL.md#install-a-checkout-from-git
2019-03-26 12:58:37 +00:00
If you don't have a checkout:
2017-03-24 08:44:08 +00:00
```
2019-03-26 12:58:37 +00:00
git clone --recursive https://github.com/DaveDavenport/rofi
2017-03-24 08:45:52 +00:00
cd rofi/
2017-03-24 08:44:08 +00:00
```
2019-03-26 12:58:37 +00:00
If you already have a checkout:
2016-03-05 12:36:18 +00:00
```
2019-03-26 12:58:37 +00:00
cd rofi/
git pull
2016-03-05 12:36:18 +00:00
git submodule update --init
```
2019-03-26 12:58:37 +00:00
For Autotools you have an extra step, to generate build system:
2014-07-21 14:41:31 +00:00
2014-07-27 07:54:10 +00:00
```
autoreconf -i
```
2014-07-21 14:41:31 +00:00
2019-03-26 12:58:37 +00:00
From this point, use the same steps you use for a release.
2014-07-21 14:41:31 +00:00
2014-07-27 10:46:00 +00:00
## Options for configure
2014-07-21 14:41:31 +00:00
2019-03-26 12:58:37 +00:00
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 Meson, before the initial setup, you can see rofi options in `meson_options.txt` and Meson options with `meson setup --help` .
After the initial setup, use `meson configure build` .
2014-07-21 14:41:31 +00:00
The most useful one to set the installation prefix:
2014-07-27 07:54:10 +00:00
```
2019-03-26 12:58:37 +00:00
# Autotools
../configure --prefix=< installation path >
# Meson
meson setup build --prefix < installation path >
2014-07-27 07:54:10 +00:00
```
2014-07-21 14:41:31 +00:00
f.e.
2014-07-27 07:54:10 +00:00
```
2019-03-26 12:58:37 +00:00
# Autotools
../configure --prefix=/usr/
# Meson
meson setup build --prefix /usr
2014-07-27 07:54:10 +00:00
```
2014-07-21 14:41:31 +00:00
2014-07-27 10:46:00 +00:00
### Install locally
2014-07-21 14:41:31 +00:00
or to install locally:
2014-07-27 07:54:10 +00:00
```
2019-03-26 12:58:37 +00:00
# Autotools
../configure --prefix=${HOME}/.local/
# Meson
meson setup build --prefix ${HOME}/.local
2014-07-27 07:54:10 +00:00
```
2014-07-21 14:41:31 +00:00
2014-07-27 10:46:00 +00:00
2015-03-24 15:02:03 +00:00
## Options for make
When you run make you can tweak the build process a little.
### Verbose output
Show the commands called:
```
2019-03-26 12:58:37 +00:00
# Autotools
2015-03-24 15:02:03 +00:00
make V=1
2019-03-26 12:58:37 +00:00
# Meson
ninja -C build -v
2015-03-24 15:02:03 +00:00
```
### Debug build
2017-03-24 08:44:08 +00:00
Compile with debug symbols and no optimization, this is useful for making backtraces:
2015-03-24 15:02:03 +00:00
```
2019-03-26 12:58:37 +00:00
# Autotools
2015-03-24 15:02:03 +00:00
make CFLAGS="-O0 -g3" clean rofi
2019-03-26 12:58:37 +00:00
# Meson
meson configure build --debug
2019-05-10 18:05:38 +00:00
ninja -C build
2015-03-24 15:02:03 +00:00
```
2015-03-28 16:04:34 +00:00
### Get a backtrace
Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it grabs keyboard and
mouse. So if it crashes in GDB you are stuck.
The best way to go is to enable core file. (ulimit -c unlimited in bash) then make rofi crash. You
can then load the core in GDB.
```
2019-03-26 12:58:37 +00:00
# Autotools
2015-03-28 16:04:34 +00:00
gdb rofi core
2019-03-26 12:58:37 +00:00
# Meson (because it uses a separate build directory)
gdb build/rofi core
2015-03-28 16:04:34 +00:00
```
2015-10-25 12:54:41 +00:00
2017-03-24 08:44:08 +00:00
> Where the core file is located and what its exact name is different on each distributions. Please consult the
> relevant documentation.
2015-10-25 12:54:41 +00:00
## Install distribution
### Debian or Ubuntu
```
2017-03-24 08:44:08 +00:00
apt install rofi
2015-10-25 12:54:41 +00:00
```
2017-08-10 13:39:27 +00:00
#### Ubuntu 16.04 Xenial
2019-03-26 12:58:37 +00:00
**Please note that the latest version of rofi in Ubuntu 16.04 is extremely outdated (v0.15.11)**
2017-08-10 13:39:27 +00:00
2018-02-12 20:37:29 +00:00
This will cause issues with newer scripts (i.e. with clerk) and misses important updates and bug-fixes.
2018-02-12 20:38:24 +00:00
Newer versions of Rofi however requires versions of xcb-util-xrm and libxkbcommon that are not available in the 16.04 repositories.
2018-02-12 20:37:29 +00:00
These need to be manually installed before rofi can be installed either via source code or Zesty version from the [ubuntu's launchpad page for rofi ](https://launchpad.net/ubuntu/+source/rofi ).
2017-08-10 13:39:27 +00:00
2015-10-25 12:54:41 +00:00
### Fedora
rofi from [russianfedora repository ](http://ru.fedoracommunity.org/repository )
and also
2016-08-10 12:55:46 +00:00
[Yaroslav's COPR (Cool Other Package Repo) ](https://copr.fedorainfracloud.org/coprs/yaroslav/i3desktop/ )
2015-10-25 12:54:41 +00:00
2017-03-24 08:44:08 +00:00
### ArchLinux
```
pacman -S rofi
```
2017-10-02 11:13:04 +00:00
### Gentoo
An ebuild is available, `x11-misc/rofi` . It's up to date, but you may need to
enable ~arch to get the latest release:
```
echo 'x11-misc/rofi ~amd64' >> /etc/portage/package.accept_keywords
```
for amd64 or:
```
echo 'x11-misc/rofi ~x86' >> /etc/portage/package.accept_keywords
```
for i386.
To install it, simply issue `emerge rofi` .
2019-03-01 14:49:34 +00:00
### openSUSE
On both openSUSE Leap and openSUSE Tumbleweed rofi can be installed using:
```
sudo zypper install rofi
```