mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Add Meson instructions (#943)
* INSTALL: Refactor build instructions Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> * INSTALL: Remove trailing whitespace Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> * INSTALL: Add Meson instructions Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
parent
66995fe215
commit
855fb4e22a
1 changed files with 49 additions and 40 deletions
87
INSTALL.md
87
INSTALL.md
|
@ -4,6 +4,7 @@ This guide explains how to install rofi using its build system and how you can m
|
|||
|
||||
Rofi uses autotools (GNU Build system), for more information see
|
||||
[here](https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html).
|
||||
You can also use [Meson](https://mesonbuild.com/) as an alternative.
|
||||
|
||||
## DEPENDENCY
|
||||
|
||||
|
@ -44,10 +45,18 @@ On debian based systems, the developer packages are in the form of: `<package>-d
|
|||
|
||||
## Install from a release
|
||||
|
||||
### Autotools
|
||||
|
||||
Create a build directory and enter it:
|
||||
|
||||
```
|
||||
mkdir build && cd build
|
||||
```
|
||||
|
||||
Check dependencies and configure build system:
|
||||
|
||||
```
|
||||
./configure
|
||||
../configure
|
||||
```
|
||||
|
||||
Build Rofi:
|
||||
|
@ -71,72 +80,56 @@ The GitHub Pages version of these directions may be out of date. Please use
|
|||
|
||||
[master-install]: https://github.com/DaveDavenport/rofi/blob/master/INSTALL.md#install-a-checkout-from-git
|
||||
|
||||
Make a checkout:
|
||||
If you don't have a checkout:
|
||||
|
||||
```
|
||||
git clone https://github.com/DaveDavenport/rofi
|
||||
git clone --recursive https://github.com/DaveDavenport/rofi
|
||||
cd rofi/
|
||||
```
|
||||
|
||||
|
||||
Pull in dependencies
|
||||
If you already have a checkout:
|
||||
|
||||
```
|
||||
cd rofi/
|
||||
git pull
|
||||
git submodule update --init
|
||||
```
|
||||
|
||||
Generate build system:
|
||||
For Autotools you have an extra step, to generate build system:
|
||||
|
||||
```
|
||||
autoreconf -i
|
||||
```
|
||||
|
||||
Create a build directory:
|
||||
From this point, use the same steps you use for a release.
|
||||
|
||||
```
|
||||
mkdir build
|
||||
```
|
||||
|
||||
Enter build directory:
|
||||
|
||||
```
|
||||
cd build
|
||||
```
|
||||
|
||||
Check dependencies and configure build system:
|
||||
|
||||
```
|
||||
../configure
|
||||
```
|
||||
|
||||
Build rofi:
|
||||
|
||||
```
|
||||
make
|
||||
```
|
||||
|
||||
The actual install, execute as root (if needed):
|
||||
|
||||
```
|
||||
make install
|
||||
```
|
||||
|
||||
|
||||
## Options for configure
|
||||
|
||||
When you run the configure step there are several you can configure. (To see the full list type
|
||||
`./configure --help` ).
|
||||
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`.
|
||||
|
||||
The most useful one to set the installation prefix:
|
||||
|
||||
```
|
||||
./configure --prefix=<installation path>
|
||||
# Autotools
|
||||
../configure --prefix=<installation path>
|
||||
|
||||
# Meson
|
||||
meson setup build --prefix <installation path>
|
||||
```
|
||||
|
||||
f.e.
|
||||
|
||||
```
|
||||
./configure --prefix=/usr/
|
||||
# Autotools
|
||||
../configure --prefix=/usr/
|
||||
|
||||
# Meson
|
||||
meson setup build --prefix /usr
|
||||
```
|
||||
|
||||
### Install locally
|
||||
|
@ -144,7 +137,11 @@ f.e.
|
|||
or to install locally:
|
||||
|
||||
```
|
||||
./configure --prefix=${HOME}/.local/
|
||||
# Autotools
|
||||
../configure --prefix=${HOME}/.local/
|
||||
|
||||
# Meson
|
||||
meson setup build --prefix ${HOME}/.local
|
||||
```
|
||||
|
||||
|
||||
|
@ -157,7 +154,11 @@ When you run make you can tweak the build process a little.
|
|||
Show the commands called:
|
||||
|
||||
```
|
||||
# Autotools
|
||||
make V=1
|
||||
|
||||
# Meson
|
||||
ninja -C build -v
|
||||
```
|
||||
|
||||
### Debug build
|
||||
|
@ -165,7 +166,11 @@ make V=1
|
|||
Compile with debug symbols and no optimization, this is useful for making backtraces:
|
||||
|
||||
```
|
||||
# Autotools
|
||||
make CFLAGS="-O0 -g3" clean rofi
|
||||
|
||||
# Meson
|
||||
meson configure build --debug
|
||||
```
|
||||
|
||||
### Get a backtrace
|
||||
|
@ -176,7 +181,11 @@ The best way to go is to enable core file. (ulimit -c unlimited in bash) then ma
|
|||
can then load the core in GDB.
|
||||
|
||||
```
|
||||
# Autotools
|
||||
gdb rofi core
|
||||
|
||||
# Meson (because it uses a separate build directory)
|
||||
gdb build/rofi core
|
||||
```
|
||||
|
||||
> Where the core file is located and what its exact name is different on each distributions. Please consult the
|
||||
|
|
Loading…
Reference in a new issue