@@ -224,7 +224,7 @@ Or, create a symbolic link:
224ln -Ts $PWD/runtime ~/.config/helix/runtime
224ln -Ts $PWD/runtime ~/.config/helix/runtime
227−If the above command fails to create a symbolic link because the file exists either move `~/.config/helix/runtime` to a new location or delete it, then run the symlink command above again.
227+If the above command fails to create a symbolic link because the file exists either move `~/.config/helix/runtime` to a new location or delete it, then run the symlink command above again.
229#### Windows
229#### Windows
@@ -257,12 +257,32 @@ following order:
2571. `runtime/` sibling directory to `$CARGO_MANIFEST_DIR` directory (this is intended for
2571. `runtime/` sibling directory to `$CARGO_MANIFEST_DIR` directory (this is intended for
258 developing and testing helix only).
258 developing and testing helix only).
2592. `runtime/` subdirectory of OS-dependent helix user config directory.
2592. `runtime/` subdirectory of OS-dependent helix user config directory.
260−3. `$HELIX_RUNTIME`.
260+3. `$HELIX_RUNTIME`
261+4. Distribution-specific fallback directory (set at compile time—not run time—
262+ with the `HELIX_DEFAULT_RUNTIME` environment variable)
261−4. `runtime/` subdirectory of path to Helix executable.
263+5. `runtime/` subdirectory of path to Helix executable.
263This order also sets the priority for selecting which file will be used if multiple runtime
265This order also sets the priority for selecting which file will be used if multiple runtime
264directories have files with the same name.
266directories have files with the same name.
268+#### Note to packagers
270+If you are making a package of Helix for end users, to provide a good out of
271+the box experience, you should set the `HELIX_DEFAULT_RUNTIME` environment
272+variable at build time (before invoking `cargo build`) to a directory which
273+will store the final runtime files after installation. For example, say you want
274+to package the runtime into `/usr/lib/helix/runtime`. The rough steps a build
275+script could follow are:
277+1. `export HELIX_DEFAULT_RUNTIME=/usr/lib/helix/runtime`
278+1. `cargo build --profile opt --locked --path helix-term`
279+1. `cp -r runtime $BUILD_DIR/usr/lib/helix/`
280+1. `cp target/opt/hx $BUILD_DIR/usr/bin/hx`
282+This way the resulting `hx` binary will always look for its runtime directory in
283+`/usr/lib/helix/runtime` if the user has no custom runtime in `~/.config/helix`
266### Validating the installation
286### Validating the installation
268To make sure everything is set up as expected you should run the Helix health
288To make sure everything is set up as expected you should run the Helix health