Commit graph

6 commits

Author SHA1 Message Date
Daniel Eklöf
efd023ad32
generate-version: add a define for “extra” version information
This will be set to “rrr-gNNNNNNN” when building from git, and the
empty string otherwise.
2021-06-13 17:19:35 +02:00
Daniel Eklöf
60984e7a24
csi: secondary DA: do not pretend we're xterm
Previously, our secondary DA response indicated a) VT420, b) an XTerm
version number.

Now, we indicate VT220 (which corresponds to the primary DA response),
and we report foot's version number as MMmmpp. I.e major, minor and
patch versions, using two digits.

E.g. 1.4.2 is encoded as 010402
2020-07-24 17:47:47 +02:00
Daniel Eklöf
f5ceb958cd
generate-version: check for .git directory in *src* dir
Instead of trying to run `git --rev-parse --is-inside-work-tree`,
check if there's a .git directory under the source directory.

This should fix an issue where we incorrectly decided we where in a
foot git clone when we're just a subdirectory under another
repository.
2020-03-06 21:18:31 +01:00
Daniel Eklöf
5b6c941b0a
generate-version: redirect *both* stdout and stderr to /dev/null 2019-11-27 21:19:59 +01:00
Daniel Eklöf
34f699657a
generate-version: handle builds that aren't git clones 2019-11-24 13:59:33 +01:00
Daniel Eklöf
286db002f8
meson: fix version generation from git
run_command() was only run at configure time, meaning the generated
version (that was passed on to the sources via -DFUZZEL_VERSION)
became stale.

Fix by implementing a shell script that generates a header file, and
wrap this in a custom target that is run every time (but the generated
file is only updated when the version changes)
2019-10-19 22:09:52 +02:00