Aloshi / EmulationStation

A flexible emulator front-end supporting keyboardless navigation and custom system themes.
MIT License
2.07k stars 905 forks source link

Can't do multiple commands in es_systems.cfg #713

Open dirtytuna opened 6 years ago

dirtytuna commented 6 years ago

I came across this issue recently by trying to develop a work-around to not being able to do menu music within the windows version of Emulation Station. To a degree I have it working, I was able to get music to start and stop along side emulation station opening and closing by putting this into a batch file.

set HOME=%~dp0 start .\VLC\vlc.exe .\music\menu1.mp3 emulationstation.exe Taskkill /IM vlc.exe /F

However the issue I am having is I cannot get the music to start or stop whenever I launch or quit a game, even though the commands work for running and closing the vlc player in the previously shown batch file commands.

So this is what I put into the command area inside of the es_systems.cfg.

Taskkill /IM vlc.exe /F %HOME%\retroarch\retroarch.exe --config "%HOME%\retroarch\config\Nintendo - Nintendo Entertainment System.cfg" -L "%HOME%\retroarch\cores\nestopia_libretro.dll" "%ROM_RAW%" start .\VLC\vlc.exe .\music\menu1.mp3

Running a NES game will now only close the vlc player, but will not launch the game, instead it goes straight back to emulation station and vlc is not opened back up. If I remove the taskkill command the game launches just fine, but again does not open vlc up again when quitting the game.

So what I ended up establishing is basically emulation station will only execute the first command, and ignores the rest. Are there any plans to add this functionality? I even tried to get around this by having emulation station execute a batch file with all the commands inside, and while it does execute all 3 commands, the %ROM_RAW% variable is not passed along so there is no rom to load and Retroarch crashes. I have no clue how to go about fixing this.

So as far as I can tell my only two possible solutions here would be for emulation station to hopefully add support for multiple commands inside the systems config in the future, or for there to be some way to pass along the %ROM_RAW% variable to the batch file so Retroarch would know what game to load.

BenCpp commented 5 years ago

For people who wants to do the same: Its not a bug. in the tag, you have to seperate each command with a | and it will work. Order applicaitons may be important. Tried running joytokey before running project64 and project64 froze. After switching them together, everything works fine.

sublinn commented 2 years ago

BenCPP - or anyone else that knows how to do this, What is a working example of this? For instance if you wanted "calc.exe" and "notepad.exe" to open? I've tried separating both of these commands with the | and it doesn't work for me. I must not be understanding the full syntax. Please help.