Closed vrza closed 2 years ago
@taviso what do you think about this approach?
The location for the default config file can admittedly be nicer, e.g. $PREFIX/share/lotus/123.v10/etc/l123set.cf
Thinking about this further, another approach could be:
123
binary, and default config under the same directory tree, e.g. /opt/lotus/123.v10
/usr/local/share/man/
or /usr/share/man/
Then either:
123
in a standard dir in PATH, e.g. /usr/local/bin/
or /usr/bin/
as a symlink to the 123
binary123
binary resolves the symlink, if invoked through it, to find default config and runtime filesor:
123
in a standard dir in PATH, e.g. /usr/local/bin/
or /usr/bin/
as a symlink to a wrapper shell script that resolves the symlink to find the location of the 123
binary and exec
s the binary123
binary finds default config and runtime files relative to where it was exec
'd fromDiscussion related to https://github.com/taviso/123elf/pull/20
Sorry for the slow response - I was focused on the keymap issue. This looks good to me, I rolled back the extract script temporarily because of bug reports, as soon as that returns I think this is good to merge.
No rush. I can create a new branch with the fixed extract file and with the unified filesystem approach described above:
${PREFIX}/bin/123
${PREFIX}/share/lotus/123.v10/
${PREFIX}/etc/l123set.cf
@taviso Created a new PR based on current main
branch for your convenience:
https://github.com/taviso/123elf/pull/70
Some files have been moved around (most notably binary is now built as bin/123
) so please test on whatever setup you can. I tested on Linux, works for me in both git directory as well as installed system-wide in /usr/local
.
Thank you, closing as #70 has now been merged instead.
Check directories relative to the directory the executable is run from.
If runtime files dir is not found under
${exedir}/root/lotus
, try searching in${exedir}/../share/lotus
.This should help support system-wide installation and packaging.
Related to issue #66