It seems the length of the hash generated by
`git rev-parse --short HEAD` is nondeterministic. GitHub Actions
generates 7-character hashes, while my computer currently generates
8-character hashes. To be consistent, I'm forcing the hashes to be 7
characters long.
This way Meson will automatically keep the Git hash updated as you make
new Git commits, rather than forcing you to reconfigure the build again
every time you make a new commit to keep the commit hash updated.
(cherry picked from commit b9bb3535ae)
This removes the need to have xxd installed and provides a portable way
to specify the name of the output array (xxd has an `-n` option for
this, but it isn't present in older versions of xxd), which helps reduce
the possibility of symbol conflicts in libretro builds and also prevents
portability issues since the name of xxd's output array depends on the
relative path to the input file, which can break if Meson changes the
structure of the build directory or if the user sets the build directory
to a different location.
Also, this custom executable declares the array as const so that it goes
into the read-only data section of the binary instead of the data
section.
I don't really plan on putting out another "release tag" anytime soon,
so the hash for the current git commit is being added to the version string
to help tell the difference between one build and the other.