2020-07-28 20:49:23 +02:00
|
|
|
# Installing
|
|
|
|
|
|
|
|
|
|
1. [Overview](#overview)
|
2020-07-28 20:51:54 +02:00
|
|
|
1. [Requirements](#requirements)
|
|
|
|
|
1. [Running](#running)
|
|
|
|
|
1. [Building](#building)
|
2020-07-28 20:49:23 +02:00
|
|
|
1. [Other](#other)
|
|
|
|
|
1. [Setup](#setup)
|
2020-12-05 11:06:50 +01:00
|
|
|
1. [Options](#options)
|
2020-07-28 20:49:23 +02:00
|
|
|
1. [Release build](#release-build)
|
2020-11-22 19:02:03 +01:00
|
|
|
1. [Size optimized](#size-optimized)
|
|
|
|
|
1. [Performance optimized, non-PGO](#performance-optimized-non-pgo)
|
|
|
|
|
1. [Performance optimized, PGO](#performance-optimized-pgo)
|
|
|
|
|
1. [Partial PGO](#partial-pgo)
|
|
|
|
|
1. [Full PGO](#full-pgo)
|
|
|
|
|
1. [Use the generated PGO data](#use-the-generated-pgo-data)
|
2020-07-28 20:49:23 +02:00
|
|
|
1. [Profile Guided Optimization](#profile-guided-optimization)
|
|
|
|
|
1. [Debug build](#debug-build)
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
1. [Terminfo](#terminfo)
|
2020-07-28 20:49:23 +02:00
|
|
|
1. [Running the new build](#running-the-new-build)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Overview
|
|
|
|
|
|
|
|
|
|
foot makes use of a couple of libraries I have developed:
|
|
|
|
|
[tllist](https://codeberg.org/dnkl/tllist) and
|
|
|
|
|
[fcft](https://codeberg.org/dnkl/fcft). As such, they will most likely
|
|
|
|
|
not have been installed already. You can either install them as system
|
2020-12-19 22:43:09 +00:00
|
|
|
libraries or build them as _subprojects_ in foot.
|
2020-07-28 20:49:23 +02:00
|
|
|
|
|
|
|
|
When building foot, they will first be searched for as system
|
|
|
|
|
libraries. If **found**, foot will link dynamically against them.
|
2020-12-19 22:43:09 +00:00
|
|
|
If **not** found, meson will attempt to download and build them as
|
|
|
|
|
subprojects.
|
2020-07-28 20:49:23 +02:00
|
|
|
|
|
|
|
|
|
2020-07-28 20:51:54 +02:00
|
|
|
## Requirements
|
|
|
|
|
|
|
|
|
|
### Running
|
|
|
|
|
|
2021-12-03 22:46:09 +01:00
|
|
|
* UTF-8 locale
|
2020-07-28 20:51:54 +02:00
|
|
|
* fontconfig
|
|
|
|
|
* freetype
|
|
|
|
|
* pixman
|
|
|
|
|
* wayland (_client_ and _cursor_ libraries)
|
|
|
|
|
* xkbcommon
|
2022-09-23 20:20:56 +02:00
|
|
|
* utf8proc (_optional_, needed for grapheme clustering)
|
2023-05-17 20:51:40 +02:00
|
|
|
* libutempter (_optional_, needed for utmp logging on Linux)
|
|
|
|
|
* ulog (_optional_, needed for utmp logging on FreeBSD)
|
2020-07-28 20:51:54 +02:00
|
|
|
* [fcft](https://codeberg.org/dnkl/fcft) [^1]
|
|
|
|
|
|
|
|
|
|
[^1]: can also be built as subprojects, in which case they are
|
|
|
|
|
statically linked.
|
|
|
|
|
|
2021-02-14 12:10:38 +01:00
|
|
|
If you are packaging foot, you may also want to consider adding the
|
|
|
|
|
following **optional** dependencies:
|
|
|
|
|
|
|
|
|
|
* libnotify: desktop notifications by default uses `notify-send`.
|
|
|
|
|
* xdg-utils: URLs are by default launched with `xdg-open`.
|
2021-03-13 19:04:33 +01:00
|
|
|
* bash-completion: If you want completion for positional arguments.
|
2021-02-14 12:10:38 +01:00
|
|
|
|
2020-07-28 20:51:54 +02:00
|
|
|
### Building
|
|
|
|
|
|
|
|
|
|
In addition to the dev variant of the packages above, you need:
|
|
|
|
|
|
|
|
|
|
* meson
|
|
|
|
|
* ninja
|
|
|
|
|
* wayland protocols
|
2020-09-24 17:33:44 +02:00
|
|
|
* ncurses (needed to generate terminfo)
|
2021-07-24 13:09:25 +02:00
|
|
|
* scdoc (for man page generation, not needed if documentation is disabled)
|
2021-03-26 20:43:03 +01:00
|
|
|
* llvm (for PGO builds with Clang)
|
2020-07-31 16:59:23 +02:00
|
|
|
* [tllist](https://codeberg.org/dnkl/tllist) [^1]
|
2022-02-26 16:08:57 +01:00
|
|
|
* systemd (optional, foot will install systemd unit files if detected)
|
2020-07-28 20:51:54 +02:00
|
|
|
|
|
|
|
|
A note on compilers; in general, foot runs **much** faster when
|
|
|
|
|
compiled with gcc instead of clang. A profile-guided gcc build can be
|
|
|
|
|
more than twice as fast as a clang build.
|
|
|
|
|
|
|
|
|
|
**Note** GCC 10.1 has a performance regression that severely affects
|
|
|
|
|
foot when doing PGO builds and building with `-O2`; it is about 30-40%
|
|
|
|
|
slower compared to GCC 9.3.
|
|
|
|
|
|
|
|
|
|
The work around is simple: make sure you build with `-O3`. This is the
|
|
|
|
|
default with `meson --buildtype=release`, but e.g. `makepkg` can
|
|
|
|
|
override it (`makepkg` uses `-O2` by default).
|
|
|
|
|
|
2020-07-28 20:49:23 +02:00
|
|
|
## Other
|
|
|
|
|
|
|
|
|
|
Foot uses _meson_. If you are unfamiliar with it, the official
|
|
|
|
|
[tutorial](https://mesonbuild.com/Tutorial.html) might be a good
|
|
|
|
|
starting point.
|
|
|
|
|
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
A note on terminfo; the terminfo database exposes terminal
|
|
|
|
|
capabilities to the applications running inside the terminal. As such,
|
|
|
|
|
it is important that the terminfo used reflects the actual
|
|
|
|
|
terminal. Using the `xterm-256color` terminfo will, in many cases,
|
2024-02-06 12:36:45 +01:00
|
|
|
work, but I still recommend using foot's own terminfo. There are two
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
reasons for this:
|
|
|
|
|
|
2024-02-06 12:36:45 +01:00
|
|
|
* foot's terminfo contains a couple of non-standard capabilities,
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
used by e.g. tmux.
|
|
|
|
|
* New capabilities added to the `xterm-256color` terminfo could
|
|
|
|
|
potentially break foot.
|
2024-02-06 12:36:45 +01:00
|
|
|
* There may be future additions or changes to foot's terminfo.
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
|
2024-02-06 12:36:45 +01:00
|
|
|
As of ncurses 2021-07-31, ncurses includes a version of foot's
|
2021-08-29 11:06:45 +02:00
|
|
|
terminfo. **The recommendation is to use those**, and only install the
|
2024-02-06 12:36:45 +01:00
|
|
|
terminfo definitions from this git repo if the system's ncurses
|
2021-08-29 11:06:45 +02:00
|
|
|
predates 2021-07-31.
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
|
2024-02-06 12:36:45 +01:00
|
|
|
But, note that the foot terminfo definitions in ncurses' lack the
|
2021-08-29 11:06:45 +02:00
|
|
|
non-standard capabilities. This mostly affects tmux; without them,
|
|
|
|
|
`terminal-overrides` must be configured to enable truecolor
|
2024-02-06 12:36:45 +01:00
|
|
|
support. For this reason, it _is_ possible to install "our" terminfo
|
2021-08-29 11:06:45 +02:00
|
|
|
definitions as well, either in a non-default location, or under a
|
|
|
|
|
different name.
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
|
2021-08-29 11:06:45 +02:00
|
|
|
Both have their set of issues. When installing to a non-default
|
|
|
|
|
location, foot will set the environment variable `TERMINFO` in the
|
|
|
|
|
child process. However, there are many situations where this simply
|
|
|
|
|
does not work. See https://codeberg.org/dnkl/foot/issues/695 for
|
|
|
|
|
details.
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
|
2021-08-29 11:06:45 +02:00
|
|
|
Installing them under a different name generally works well, but will
|
|
|
|
|
break applications that check if `$TERM == foot`.
|
|
|
|
|
|
2024-02-06 12:36:45 +01:00
|
|
|
Hence the recommendation to simply use ncurses' terminfo definitions
|
2021-08-29 11:06:45 +02:00
|
|
|
if available.
|
|
|
|
|
|
2024-02-06 12:36:45 +01:00
|
|
|
If packaging "our" terminfo definitions, I recommend doing that as a
|
2021-08-29 11:06:45 +02:00
|
|
|
separate package, to allow them to be installed on remote systems
|
|
|
|
|
without having to install foot itself.
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
|
2020-07-28 20:49:23 +02:00
|
|
|
|
|
|
|
|
### Setup
|
|
|
|
|
|
|
|
|
|
To build, first, create a build directory, and switch to it:
|
|
|
|
|
```sh
|
|
|
|
|
mkdir -p bld/release && cd bld/release
|
|
|
|
|
```
|
|
|
|
|
|
2020-12-05 11:06:50 +01:00
|
|
|
### Options
|
|
|
|
|
|
2020-12-08 19:19:09 +01:00
|
|
|
Available compile-time options:
|
2020-12-05 11:06:50 +01:00
|
|
|
|
2023-05-17 20:51:40 +02:00
|
|
|
| Option | Type | Default | Description | Extra dependencies |
|
|
|
|
|
|--------------------------------------|---------|-------------------------|---------------------------------------------------------------------------------|---------------------|
|
|
|
|
|
| `-Ddocs` | feature | `auto` | Builds and install documentation | scdoc |
|
|
|
|
|
| `-Dtests` | bool | `true` | Build tests (adds a `ninja test` build target) | None |
|
|
|
|
|
| `-Dime` | bool | `true` | Enables IME support | None |
|
|
|
|
|
| `-Dgrapheme-clustering` | feature | `auto` | Enables grapheme clustering | libutf8proc |
|
|
|
|
|
| `-Dterminfo` | feature | `enabled` | Build and install terminfo files | tic (ncurses) |
|
|
|
|
|
| `-Ddefault-terminfo` | string | `foot` | Default value of `TERM` | None |
|
2023-07-26 16:14:38 +02:00
|
|
|
| `-Dterminfo-base-name` | string | `-Ddefault-terminfo` | Base name of the generated terminfo files | None |
|
2023-05-17 20:51:40 +02:00
|
|
|
| `-Dcustom-terminfo-install-location` | string | `${datadir}/terminfo` | Value to set `TERMINFO` to | None |
|
|
|
|
|
| `-Dsystemd-units-dir` | string | `${systemduserunitdir}` | Where to install the systemd service files (absolute) | None |
|
|
|
|
|
| `-Dutmp-backend` | combo | `auto` | Which utmp backend to use (`none`, `libutempter`, `ulog` or `auto`) | libutempter or ulog |
|
|
|
|
|
| `-Dutmp-default-helper-path` | string | `auto` | Default path to utmp helper binary. `auto` selects path based on `utmp-backend` | None |
|
2021-06-23 16:55:26 +02:00
|
|
|
|
2022-04-21 10:04:11 +02:00
|
|
|
Documentation includes the man pages, readme, changelog and license
|
|
|
|
|
files.
|
2021-07-24 13:09:25 +02:00
|
|
|
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
`-Ddefault-terminfo`: I strongly recommend leaving the default
|
2021-08-29 11:06:45 +02:00
|
|
|
value. Use this option if you plan on installing the terminfo files
|
|
|
|
|
under a different name. Setting this changes the default value of
|
|
|
|
|
`$TERM`, and the names of the terminfo files (if
|
|
|
|
|
`-Dterminfo=enabled`).
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
|
2023-07-26 16:14:38 +02:00
|
|
|
If you want foot to use the terminfo files from ncurses, but still
|
|
|
|
|
package foot's own terminfo files under a different name, you can use
|
|
|
|
|
the `-Dterminfo-base-name` option. Many distributions use the name
|
2023-10-03 14:11:55 +02:00
|
|
|
`foot-extra`, and thus it might be a good idea to reuse that:
|
2023-07-26 16:14:38 +02:00
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
meson ... -Ddefault-terminfo=foot -Dterminfo-base-name=foot-extra
|
|
|
|
|
```
|
|
|
|
|
(or just leave out `-Ddefault-terminfo`, since it defaults to `foot` anyway).
|
|
|
|
|
|
2024-02-06 12:36:45 +01:00
|
|
|
Finally, `-Dcustom-terminfo-install-location` enables foot's terminfo
|
|
|
|
|
to co-exist with ncurses' version, without changing the terminfo
|
|
|
|
|
names. The idea is that you install foot's terminfo to a non-standard
|
2021-08-29 11:06:45 +02:00
|
|
|
location, for example `/usr/share/foot/terminfo`. Use
|
|
|
|
|
`-Dcustom-terminfo-install-location` to tell foot where the terminfo
|
|
|
|
|
is. Foot will set the environment variable `TERMINFO` to this value
|
|
|
|
|
(with `${prefix}` added). The value is **relative to ${prefix}**.
|
|
|
|
|
|
|
|
|
|
Note that there are several issues with this approach:
|
|
|
|
|
https://codeberg.org/dnkl/foot/issues/695.
|
|
|
|
|
|
|
|
|
|
If left unset, foot will **not** set or modify `TERMINFO`.
|
2021-06-23 16:55:26 +02:00
|
|
|
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
`-Dterminfo` can be used to disable building the terminfo definitions
|
|
|
|
|
in the meson build. It does **not** change the default value of
|
2021-08-29 11:06:45 +02:00
|
|
|
`TERM`, and it does **not** disable `TERMINFO`, if
|
|
|
|
|
`-Dcustom-terminfo-install-location` has been set. Use this if
|
|
|
|
|
packaging the terminfo definitions in a separate package (and the
|
2024-02-06 12:36:45 +01:00
|
|
|
build script isn't shared with the 'foot' package).
|
2021-06-23 16:55:26 +02:00
|
|
|
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
Example:
|
2021-06-23 16:55:26 +02:00
|
|
|
|
|
|
|
|
```sh
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
meson --prefix=/usr -Dcustom-terminfo-install-location=lib/foot/terminfo
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The above tells foot its terminfo definitions will be installed to
|
2021-08-18 20:18:35 +02:00
|
|
|
`/usr/lib/foot/terminfo`. This is the value foot will set the
|
|
|
|
|
`TERMINFO` environment variable to.
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
|
|
|
|
|
If `-Dterminfo` is enabled (the default), then the terminfo files will
|
|
|
|
|
be built as part of the regular build process, and installed to the
|
|
|
|
|
specified location.
|
|
|
|
|
|
|
|
|
|
Packagers may want to set `-Dterminfo=disabled`, and manually build
|
2021-08-30 19:35:56 +02:00
|
|
|
and [install the terminfo](#terminfo) files instead.
|
2020-12-05 11:06:50 +01:00
|
|
|
|
|
|
|
|
|
2020-07-28 20:49:23 +02:00
|
|
|
### Release build
|
|
|
|
|
|
2020-11-22 19:02:03 +01:00
|
|
|
Below are instructions for building foot either [size
|
|
|
|
|
optimized](#size-optimized), [performance
|
2020-11-22 19:07:50 +01:00
|
|
|
optimized](performance-optimized-non-pgo), or performance
|
|
|
|
|
optimized using [PGO](#performance-optimized-pgo).
|
2020-11-22 19:02:03 +01:00
|
|
|
|
2020-11-22 19:07:50 +01:00
|
|
|
PGO - _Profile Guided Optimization_ - is a way to optimize a program
|
2020-11-22 19:02:03 +01:00
|
|
|
better than `-O3` can, and is done by compiling foot twice: first to
|
|
|
|
|
generate an instrumented version which is used to run a payload that
|
|
|
|
|
exercises the performance critical parts of foot, and then a second
|
|
|
|
|
time to rebuild foot using the generated profiling data to guide
|
|
|
|
|
optimization.
|
2020-07-28 20:49:23 +02:00
|
|
|
|
2020-11-22 19:02:03 +01:00
|
|
|
In addition to being faster, PGO builds also tend to be smaller than
|
|
|
|
|
regular `-O3` builds.
|
2020-07-28 20:49:23 +02:00
|
|
|
|
2020-11-22 16:11:01 +01:00
|
|
|
|
2020-11-22 19:02:03 +01:00
|
|
|
#### Size optimized
|
2020-11-22 16:11:01 +01:00
|
|
|
|
2020-11-22 19:02:03 +01:00
|
|
|
To optimize for size (i.e. produce a small binary):
|
2020-07-28 20:49:23 +02:00
|
|
|
|
|
|
|
|
```sh
|
2020-12-21 13:01:38 +01:00
|
|
|
export CFLAGS="$CFLAGS -Os"
|
2020-11-22 19:02:03 +01:00
|
|
|
meson --buildtype=release --prefix=/usr -Db_lto=true ../..
|
2020-07-28 20:49:23 +02:00
|
|
|
ninja
|
2020-11-22 19:02:03 +01:00
|
|
|
ninja test
|
|
|
|
|
ninja install
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### Performance optimized, non-PGO
|
|
|
|
|
|
|
|
|
|
To do a regular, non-PGO build optimized for performance:
|
|
|
|
|
|
|
|
|
|
```sh
|
2020-12-21 13:01:38 +01:00
|
|
|
export CFLAGS="$CFLAGS -O3"
|
2020-11-22 19:02:03 +01:00
|
|
|
meson --buildtype=release --prefix=/usr -Db_lto=true ../..
|
2020-12-21 12:15:59 +01:00
|
|
|
ninja
|
2020-11-22 19:02:03 +01:00
|
|
|
ninja test
|
|
|
|
|
ninja install
|
2020-07-28 20:49:23 +02:00
|
|
|
```
|
|
|
|
|
|
2020-11-22 19:02:03 +01:00
|
|
|
Use `-O2` instead of `-O3` if you prefer a slightly smaller (and
|
|
|
|
|
slower!) binary.
|
2020-07-28 20:49:23 +02:00
|
|
|
|
|
|
|
|
|
2020-11-22 19:02:03 +01:00
|
|
|
#### Performance optimized, PGO
|
2020-07-28 20:49:23 +02:00
|
|
|
|
2021-09-12 16:57:07 +02:00
|
|
|
There are a lot more steps involved in a PGO build, and for this
|
|
|
|
|
reason there are a number of helper scripts available.
|
|
|
|
|
|
|
|
|
|
`pgo/pgo.sh` is a standalone script that pieces together the other
|
|
|
|
|
scripts in the `pgo` directory to do a complete PGO build. This script
|
|
|
|
|
is intended to be used when doing manual builds.
|
|
|
|
|
|
2024-02-06 12:36:45 +01:00
|
|
|
Note that all "full" PGO builds (which `auto` will prefer, if
|
2021-10-02 15:24:48 +02:00
|
|
|
possible) **require** `LC_CTYPE` to be set to an UTF-8 locale. This is
|
2021-10-02 14:43:02 +02:00
|
|
|
**not** done automatically.
|
|
|
|
|
|
2021-09-12 16:57:07 +02:00
|
|
|
Example:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
cd foot
|
|
|
|
|
./pgo/pgo.sh auto . /tmp/foot-pgo-build-output
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
(run `./pgo/pgo.sh` to get help on usage)
|
|
|
|
|
|
|
|
|
|
It supports a couple of different PGO builds; partial (covered in
|
|
|
|
|
detail below), full (also covered in detail below), and (full)
|
|
|
|
|
headless builds using Sway or cage.
|
|
|
|
|
|
|
|
|
|
Packagers may want to use it as inspiration, but may choose to support
|
|
|
|
|
only a specific build type; e.g. full/headless with Sway.
|
|
|
|
|
|
|
|
|
|
To do a manual PGO build, instead of using the script(s) mentioned
|
|
|
|
|
above, detailed instructions follows:
|
|
|
|
|
|
2020-11-22 19:02:03 +01:00
|
|
|
First, configure the build directory:
|
2020-07-28 20:49:23 +02:00
|
|
|
|
2020-11-22 19:02:03 +01:00
|
|
|
```sh
|
2021-03-26 20:43:21 +01:00
|
|
|
export CFLAGS="$CFLAGS -O3"
|
2020-11-22 19:02:03 +01:00
|
|
|
meson --buildtype=release --prefix=/usr -Db_lto=true ../..
|
|
|
|
|
```
|
2020-07-28 20:49:23 +02:00
|
|
|
|
2020-11-22 19:02:03 +01:00
|
|
|
It is **very** important `-O3` is being used here, as GCC-10.1.x and
|
|
|
|
|
later have a regression where PGO with `-O2` is **much** slower.
|
2020-07-28 20:49:23 +02:00
|
|
|
|
2021-03-26 20:43:21 +01:00
|
|
|
Clang users **must** add `-Wno-ignored-optimization-argument` to
|
|
|
|
|
`CFLAGS`.
|
2020-07-28 20:49:23 +02:00
|
|
|
|
2020-11-14 14:38:19 +01:00
|
|
|
Then, tell meson we want to _generate_ profiling data, and build:
|
2020-07-28 20:49:23 +02:00
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
meson configure -Db_pgo=generate
|
|
|
|
|
ninja
|
2021-03-28 17:24:35 +02:00
|
|
|
ninja test
|
2020-07-28 20:49:23 +02:00
|
|
|
```
|
|
|
|
|
|
2020-11-14 14:38:19 +01:00
|
|
|
Next, we need to actually generate the profiling data.
|
2020-11-14 14:31:16 +01:00
|
|
|
|
|
|
|
|
There are two ways to do this: a [partial PGO build using a PGO
|
|
|
|
|
helper](#partial-pgo) binary, or a [full PGO build](#full-pgo) by
|
2020-11-14 14:38:19 +01:00
|
|
|
running the real foot binary. The latter has slightly better results
|
|
|
|
|
(i.e. results in a faster binary), but must be run in a Wayland
|
|
|
|
|
session.
|
2020-11-14 14:31:16 +01:00
|
|
|
|
2020-11-22 19:07:50 +01:00
|
|
|
A full PGO build also tends to be smaller than a partial build.
|
|
|
|
|
|
2020-11-14 14:31:16 +01:00
|
|
|
|
|
|
|
|
##### Partial PGO
|
|
|
|
|
|
|
|
|
|
This method uses a PGO helper binary that links against the VT parser
|
|
|
|
|
only. It is similar to a mock test; it instantiates a dummy terminal
|
|
|
|
|
instance and then directly calls the VT parser with stimuli.
|
|
|
|
|
|
|
|
|
|
It explicitly does **not** include the Wayland backend and as such, it
|
|
|
|
|
does not require a running Wayland session. The downside is that not
|
|
|
|
|
all code paths in foot is exercised. In particular, the **rendering**
|
|
|
|
|
code is not. As a result, the final binary built using this method is
|
|
|
|
|
slightly slower than when doing a [full PGO](#full-pgo) build.
|
|
|
|
|
|
2020-11-16 19:40:41 +01:00
|
|
|
We will use the `pgo` binary along with input corpus generated by
|
|
|
|
|
`scripts/generate-alt-random-writes.py`:
|
2020-11-14 14:31:16 +01:00
|
|
|
|
|
|
|
|
```sh
|
2022-10-10 17:18:04 +02:00
|
|
|
./utils/xtgettcap
|
2021-03-26 20:43:21 +01:00
|
|
|
./footclient --version
|
|
|
|
|
./foot --version
|
2020-11-16 19:40:41 +01:00
|
|
|
tmp_file=$(mktemp)
|
|
|
|
|
../../scripts/generate-alt-random-writes \
|
|
|
|
|
--rows=67 \
|
|
|
|
|
--cols=135 \
|
|
|
|
|
--scroll \
|
|
|
|
|
--scroll-region \
|
|
|
|
|
--colors-regular \
|
|
|
|
|
--colors-bright \
|
|
|
|
|
--colors-256 \
|
|
|
|
|
--colors-rgb \
|
2020-11-16 20:04:12 +01:00
|
|
|
--attr-bold \
|
|
|
|
|
--attr-italic \
|
|
|
|
|
--attr-underline \
|
2020-11-23 19:32:19 +01:00
|
|
|
--sixel \
|
2020-11-16 19:40:41 +01:00
|
|
|
${tmp_file}
|
2020-11-22 12:13:32 +01:00
|
|
|
./pgo ${tmp_file} ${tmp_file} ${tmp_file}
|
2020-11-16 19:40:41 +01:00
|
|
|
rm ${tmp_file}
|
2020-11-14 14:31:16 +01:00
|
|
|
```
|
|
|
|
|
|
2021-03-26 20:43:21 +01:00
|
|
|
The first step, running `./foot --version` and `./footclient
|
2022-10-08 16:56:28 +02:00
|
|
|
--version` etc, might seem unnecessary, but is needed to ensure we
|
|
|
|
|
have _some_ profiling data for functions not covered by the PGO helper
|
|
|
|
|
binary, for **all** binaries. Without this, the final link phase will
|
|
|
|
|
fail.
|
2021-03-26 20:43:21 +01:00
|
|
|
|
|
|
|
|
The snippet above then creates an (empty) temporary file. Then, it
|
2020-11-16 19:40:41 +01:00
|
|
|
runs a script that generates random escape sequences (if you cat
|
2024-02-06 12:36:45 +01:00
|
|
|
`${tmp_file}` in a terminal, you'll see random colored characters all
|
2020-11-16 19:40:41 +01:00
|
|
|
over the screen). Finally, we feed the randomly generated escape
|
|
|
|
|
sequences to the PGO helper. This is what generates the profiling data
|
|
|
|
|
used in the next step.
|
|
|
|
|
|
2020-11-14 14:31:16 +01:00
|
|
|
You are now ready to [use the generated PGO
|
|
|
|
|
data](#use-the-generated-pgo-data).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
##### Full PGO
|
|
|
|
|
|
|
|
|
|
This method requires a running Wayland session.
|
|
|
|
|
|
|
|
|
|
We will use the script `scripts/generate-alt-random-writes.py`:
|
2020-07-28 20:49:23 +02:00
|
|
|
|
|
|
|
|
```sh
|
2022-10-10 17:18:04 +02:00
|
|
|
./utils/xtgettcap
|
2021-03-26 20:43:21 +01:00
|
|
|
./footclient --version
|
2020-07-28 20:49:23 +02:00
|
|
|
foot_tmp_file=$(mktemp)
|
2021-10-16 16:58:59 +02:00
|
|
|
./foot \
|
|
|
|
|
--config=/dev/null \
|
|
|
|
|
--override tweak.grapheme-shaping=no \
|
|
|
|
|
--term=xterm \
|
|
|
|
|
sh -c "<path-to-generate-alt-random-writes.py> --scroll --scroll-region --colors-regular --colors-bright --colors-256 --colors-rgb --attr-bold --attr-italic --attr-underline --sixel ${foot_tmp_file} && cat ${foot_tmp_file}"
|
2020-07-28 20:49:23 +02:00
|
|
|
rm ${foot_tmp_file}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
You should see a foot window open up, with random colored text. The
|
|
|
|
|
window should close after ~1-2s.
|
|
|
|
|
|
2022-10-10 17:18:04 +02:00
|
|
|
The first step, `./utils/xtgettcap && ./footclient --version`
|
2022-10-09 16:27:10 +02:00
|
|
|
might seem unnecessary, but is needed to ensure we have _some_
|
|
|
|
|
profiling data for **all** binaries we build. Without this, the final
|
|
|
|
|
link phase will fail.
|
2021-03-26 20:43:21 +01:00
|
|
|
|
2020-11-14 14:31:16 +01:00
|
|
|
|
|
|
|
|
##### Use the generated PGO data
|
|
|
|
|
|
|
|
|
|
Now that we have _generated_ PGO data, we need to rebuild foot. This
|
|
|
|
|
time telling meson (and ultimately gcc/clang) to _use_ the PGO data.
|
|
|
|
|
|
2020-07-28 20:49:23 +02:00
|
|
|
If using Clang, now do (this requires _llvm_ to have been installed):
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
llvm-profdata merge default_*profraw --output=default.profdata
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Next, tell meson to _use_ the profile data we just generated, and rebuild:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
meson configure -Db_pgo=use
|
|
|
|
|
ninja
|
2021-03-28 17:24:35 +02:00
|
|
|
ninja test
|
2020-07-28 20:49:23 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Continue reading in [Running the new build](#running-the-new-build)
|
|
|
|
|
|
2020-11-14 14:38:19 +01:00
|
|
|
|
2020-07-28 20:49:23 +02:00
|
|
|
### Debug build
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
meson --buildtype=debug ../..
|
|
|
|
|
ninja
|
2021-03-28 17:24:35 +02:00
|
|
|
ninja test
|
2020-07-28 20:49:23 +02:00
|
|
|
```
|
|
|
|
|
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
### Terminfo
|
|
|
|
|
|
|
|
|
|
By default, building foot also builds the terminfo files. If packaging
|
|
|
|
|
the terminfo files in a separate package, it might be easier to simply
|
|
|
|
|
disable the terminfo files in the regular build, and compile the
|
|
|
|
|
terminfo files manually instead.
|
|
|
|
|
|
|
|
|
|
To build the terminfo files, run:
|
|
|
|
|
|
|
|
|
|
```sh
|
2021-08-30 19:42:02 +02:00
|
|
|
sed 's/@default_terminfo@/foot/g' foot.info | \
|
|
|
|
|
tic -o <output-directory> -x -e foot,foot-direct -
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
```
|
|
|
|
|
|
2024-02-06 12:36:45 +01:00
|
|
|
Where _"output-directory"_ **must** match the value passed to
|
2021-12-03 22:44:35 +01:00
|
|
|
`-Dcustom-terminfo-install-location` in the foot build. If
|
|
|
|
|
`-Dcustom-terminfo-install-location` has not been set, `-o
|
2023-03-29 00:31:49 +03:00
|
|
|
<output-directory>` can simply be omitted.
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
|
|
|
|
|
Or, if packaging:
|
|
|
|
|
|
|
|
|
|
```sh
|
2021-12-03 22:44:35 +01:00
|
|
|
tic -o ${DESTDIR}/usr/share/terminfo ...
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
```
|
|
|
|
|
|
2020-11-14 14:38:19 +01:00
|
|
|
|
2020-07-28 20:49:23 +02:00
|
|
|
### Running the new build
|
|
|
|
|
|
|
|
|
|
You can now run it directly from the build directory:
|
|
|
|
|
```sh
|
|
|
|
|
./foot
|
|
|
|
|
```
|
|
|
|
|
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
Or, if you did not install the terminfo definitions:
|
2020-07-28 20:49:23 +02:00
|
|
|
|
|
|
|
|
```sh
|
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.
Since:
* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
have the latest ncurses.
we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.
Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.
The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.
Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?
I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.
To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.
The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.
In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.
To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:
-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.
-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.
This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.
This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).
-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.
Closes #671
2021-08-07 16:42:51 +02:00
|
|
|
./foot --term xterm-256color
|
2020-07-28 20:49:23 +02:00
|
|
|
```
|