OpenBSD has apparently refused to move into the 21st century and lacks a
way of determining path to the executable. So we use a kludge, looking
for kitty in PATH and using that. To make it work, simply put a symlink
to kitty somewhere in PATH. Fixes#2675
Avoids the overhead of checking for a symlink and re-execing.
Apparently all that was needed was setting the correct activation
policy, glfw is supposed to do this but does it only if the menubar hint
is on, which we turn off as we create our own menubar.
The `<sys/stat.h>` include in `launcher.c` is only used to check if the executable is a symlink on macOS. Therefore it is not needed on other platforms.
Now there is only one launcher. Which means it can be used to start
kitty with profiling and ASAN in the natural way. The recommended
way to run kitty from source is now:
./kitty/launcher/kitty
The launcher also automatically re-execs to resolve symlinks on macOS.