Hello to everyone,
I’m going completely crazy with this problem !
I’m trying to launch RetroArch with path parameters…which can obviously include spaces.
Launched by ‘Terminal’ this line runs correctly:
"/Applications/RetroArch.app/Contents/MacOS/RetroArch" -L mame2010_libretro.dylib "/Users/imac/Documents/Emulation/MAME/**Roms OK**/88games.zip"
Once in Unity, this code also works:
ProcessStartInfo startInfo = new ProcessStartInfo()
{
FileName = "/bin/bash",
UseShellExecute = false,
Arguments = "-c \"" + "/Applications/RetroArch.app/Contents/MacOS/RetroArch" + " -L mame2010_libretro.dylib " + "/Users/imac/Documents/Emulation/MAME/Roms/88games.zip" + "\""
};
Process myProcess = new Process
{
StartInfo = startInfo
};
myProcess.Start();
myProcess.WaitForExit();
…but that’s because there is not a single space in any of the paths or filenames! As soon as there is a space, nothing to do it doesn’t work! I can add quotes and escape them or double or triple quotes…nothing works!
Let’s take for instance the last path: "/Users/imac/Documents/Emulation/MAME/Roms/88games.zip"
and imagine there is a space in it like so: “/Users/imac/Documents/Emulation/MAME/Roms OK/88games.zip”. I surround it by escaped quotes: "\"/Users/imac/Documents/Emulation/MAME/Roms OK/88games.zip\""
…but it will never succeed!
What is please my error? It’s like obviously the quoted path is never ‘seen’ by bin/bash!
Thanks a lot for any help!