morgant / xwf

X Window Filemanager
GNU General Public License v2.0
7 stars 0 forks source link

Paths to external commands are hard-coded #5

Closed morgant closed 3 years ago

morgant commented 3 years ago

Paths to external commands, including the terminal program, xcp, and xat, are hard-coded at compile time. This means that they can't be called correctly pre-install (e.g. during development testing) and so the PATH should be searched for them.

morgant commented 3 years ago

Back in January I had updated io_system_var() to use a new io_find_in_path() and I've switched almost all uses of io_system() & io_system_nice() to use io_system_var() instead. There are a couple of cases left that pass arguments that would otherwise need to be parsed before being passed to io_system_var().

Also, io_system_var() does not use nice(), but probably should (see Issue #9 regarding using setpriority() instead ofnice()`).

morgant commented 3 years ago

I fixed a few calls to io_system_var() in the xfi source, incl. a bit of code consolidation. xfi is still broken (see Issue #10), so I can't test, but it compiles without new errors.

morgant commented 3 years ago

I also did a bit of cleanup of io_system_var() calls in the xwf source, incl. some code consolidation.

I also discovered there may be an issue with trying to call io_system_var() with a full path to the executable (see Issue #14).

morgant commented 3 years ago

I fixed io_find_in_path() so it now correctly searches the command's path, the current working directory, and directories in PATH (see Issue #14).

It looks like I've addressed all the hard-coded paths to xwf, xcp, and xfi binaries at this point. So, this should be all set.