msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.25k stars 1.21k forks source link

Helix editor in lib folder #22026

Open maddes8cht opened 6 days ago

maddes8cht commented 6 days ago

Description / Steps to reproduce the issue

When installing Helix Editor via pacman, the 'hx' executable is being placed in '/ucrt64/lib/helix/hx.exe' instead of '/ucrt64/bin' (if instaling into the ucrt env)

There is a shell script named 'helix' ( without .sh) in the bin directory, but this only gets executed inside the msys2 ucrt shell.

Expected behavior

All (at least most) other commandline executables in 'bin' can be run from a 'cmd' shell or Powershell (if the environment path variable is correcty set to these paths). Anyway, the standard command to run helix on other systems (Linux, Macos) is hx, not helix, and hx does not even work inside the 'ucrt' environment.

Actual behavior

When having a correctly setup msys2 with 'path' pointing to the standard bin directories, helix cannot be invoked by hx in any shell. It can however be invoked from inside the ucrt bash with the 'helix' shell script. But the hx command should work too, and should work from 'cmd' and 'powershell'.

Verification

Windows Version

MSYS_NT-10.0-19045

lazka commented 2 days ago

I guess it could be worked around by patching this part to look up the runtime dir relative to the executable: https://github.com/helix-editor/helix/blob/b18a471ed189fb326a781181a28f3073f5c1fe1e/helix-loader/src/lib.rs#L68-L76 (../var/lib/helix/runtime instead of ./runtime)

ognevny commented 2 days ago

value for RT_DIR const can be changed