Also write stderr to file in Mono wrapper scripts
This commit is contained in:
parent
b821012099
commit
6e73c6a5f1
|
@ -25,7 +25,8 @@ export BIZHAWK_INT_SYSLIB_PATH="$libpath"
|
||||||
if [ "$1" = "--mono-no-redirect" ]; then
|
if [ "$1" = "--mono-no-redirect" ]; then
|
||||||
shift
|
shift
|
||||||
printf "(received --mono-no-redirect, stdout was not captured)\n" >EmuHawkMono_laststdout.txt
|
printf "(received --mono-no-redirect, stdout was not captured)\n" >EmuHawkMono_laststdout.txt
|
||||||
|
printf "(received --mono-no-redirect, stderr was not captured)\n" >EmuHawkMono_laststderr.txt
|
||||||
mono ./EmuHawk.exe "$@"
|
mono ./EmuHawk.exe "$@"
|
||||||
else
|
else
|
||||||
mono ./EmuHawk.exe "$@" >EmuHawkMono_laststdout.txt
|
mono ./EmuHawk.exe "$@" >EmuHawkMono_laststdout.txt 2>EmuHawkMono_laststderr.txt
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -66,9 +66,10 @@ in rec {
|
||||||
if [ "$1" = "--mono-no-redirect" ]; then
|
if [ "$1" = "--mono-no-redirect" ]; then
|
||||||
shift
|
shift
|
||||||
printf "(received --mono-no-redirect, stdout was not captured)\n" >EmuHawkMono_laststdout.txt
|
printf "(received --mono-no-redirect, stdout was not captured)\n" >EmuHawkMono_laststdout.txt
|
||||||
|
printf "(received --mono-no-redirect, stderr was not captured)\n" >EmuHawkMono_laststderr.txt
|
||||||
exec ${mono}/bin/mono $BIZHAWK_HOME/EmuHawk.exe --config=config.json "$@"
|
exec ${mono}/bin/mono $BIZHAWK_HOME/EmuHawk.exe --config=config.json "$@"
|
||||||
else
|
else
|
||||||
exec ${mono}/bin/mono $BIZHAWK_HOME/EmuHawk.exe --config=config.json "$@" >EmuHawkMono_laststdout.txt
|
exec ${mono}/bin/mono $BIZHAWK_HOME/EmuHawk.exe --config=config.json "$@" >EmuHawkMono_laststdout.txt 2>EmuHawkMono_laststderr.txt
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
wrapperScriptNonNixOS = writeShellScriptBin "emuhawk-wrapper-non-nixos" ''
|
wrapperScriptNonNixOS = writeShellScriptBin "emuhawk-wrapper-non-nixos" ''
|
||||||
|
|
|
@ -210,7 +210,7 @@ $proc.Start()
|
||||||
|
|
||||||
On Linux, you can pass arguments to `EmuHawkMono.sh` as expected and they will be forwarded to `mono`. (You can also `export` env. vars.) All the arguments work as on Windows, with some caveats:
|
On Linux, you can pass arguments to `EmuHawkMono.sh` as expected and they will be forwarded to `mono`. (You can also `export` env. vars.) All the arguments work as on Windows, with some caveats:
|
||||||
* file paths must be absolute (or relative to the install dir, `EmuHawkMono.sh` changes the CWD to there);
|
* file paths must be absolute (or relative to the install dir, `EmuHawkMono.sh` changes the CWD to there);
|
||||||
* `--mono-no-redirect`: if you pass this flag *as the first argument*, it will be eaten by the script itself, and stdout will *not* be redirected to a file. (It's redirected by default.)
|
* `--mono-no-redirect`: if you pass this flag *as the first argument*, it will be eaten by the script itself, and stdout/stderr will *not* be redirected to a file. (It's redirected by default.)
|
||||||
|
|
||||||
The same example as above would be `./EmuHawkMono.sh --lua=/path/to/script.lua /path/to/rom.n64`.
|
The same example as above would be `./EmuHawkMono.sh --lua=/path/to/script.lua /path/to/rom.n64`.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue