Closed fastpop72 closed 1 year ago
Pegasus runs exactly one command, but that command can be the Windows cmd
too – I think it supports evaluating commands as a parameter, but not sure if it needs some extra parameters for that. A wrapper script for m2e itself could be another alternative.
I tried now this line in Command Prompt and works OK:
But in Pegasus launch: doesn't work, despite it contains only one command (start) and the rest is passed as argument.
CMD.EXE doesn't seem accept arguments....
If you've tried this in the command prompt, I assume it interpreted the &&
by itself, separated the line to two commands, and didn't pass the rest as an argument. Perhaps quoting the whole argument part would work?
Nothing.. quoting doesn't work!
I was forced to create a .bat file with the two commands.
Anyway would be great to implement an extended version of "launch:" in metadata, for example using commands like this:
launch1: xxxxxx launch2: xxxxxxxx launch3: xxxxx etc...
where the commands are executed subsequentially. Could be useful for adding some sort of specific visualization and/or animation before or after executing the game.
It seems cmd
does accept arguments, for example with /K
and /C
:
cmd /K "echo hello && echo world"
which prints
hello
world
separately. This might help you as well.
GOTCHA!!
The launch command now works, here's the key:
launch: cmd /C "START /B m2exit.exe && START /B /WAIT EMULATOR.EXE {file.basename}"
At the start it executes the "m2exit.exe" then the emulator. When i exit it returns to Pegasus.
Thanks.
Great! I'll add a note about this to the documentation.
I have to add the model2emulator to Pegasus.
The launch command i need to use contains two subsequential EXEs like this:
launch: m2exit.exe && emulator.exe {file.basename}
This command works flawlessly on CMD under Windows but seems Pegasus launch string doesn't support &&.
I don't want to use a .bat file.
Could you add the && support? Thanks.