Youda008/DoomRunner

[Feature Request] Make command launch interactive on Linux to read .bashrc variables

SilverKeeper opened this issue · 8 comments

Sourceports like Eternity ask for environment variables for everything from its data folders to soundfonts. Data folders can be placed alongside its executable as a solution, but it absolutely needs the SDL_SOUNDFONTS variable to play MIDI tracks with FluidSynth.

By default, .bashrc only executes if you're in a interactive terminal session. This can be solved in a script by telling it to start a interactive session (#!/bin/bash -i).

Doom Runner seems to act like a non-interactive script when launching the command, so you end up getting no music playback. Apologies if this is entirely on Linux, but it's a minor annoyance for some sourceports.

Hmm. And is it really a common practice to put environment variables of Doom source ports into .bashrc? Because that sounds like a weird practice to me.

I can check if it's possible to set environment variables for the process you want to start, and then i could add a new tab where you could set environment variables for the selected preset.

Please tell me, does it make more sense to allow setting different environment variables and values for each Preset or for each Engine? Is it possible for example that someone will want to set then differently for different mods?

Eternity is the only sourceport I use that doesn't have an ingame option to set the soundfonts path, or point at it in its .cfg. I haven't found any other info except this post: https://www.doomworld.com/forum/topic/115541-tutorial-using-soundfonts-for-doom-midi-music/?tab=comments#comment-2155763

I don't think it's common to set variables into .bashrc for sourceports unless you really can't set paths wherever you want and want to avoid setting it each time you boot the sourceport. If anything aliases would serve a more useful purpose but... that's essentially what Doom Runner presets do, write long commands with clicks.
So basically this is on Eternity and who knows what other sourceports. It'd only make sense for each engine, if it's needed at all.

Ah, lucky https://doc.qt.io/qt-6/qprocess.html#setProcessEnvironment

What about this? Would this be enough?
obrazek

Yep, that looks just what I was thinking of!

Can you please try, if this does what you need?
DoomRunner.zip

Working perfectly

Good, i will release this officially soon.

Released.