- Home /
Question by
waxx · May 20, 2016 at 11:40 AM ·
crossplatformprocess
Cross-platform way to start new process?
Hey guys, I'm currently working on a front-end game client as a separate application that will launch the main game once user chooses to actually play.
Here's how I handle it right now:
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.Arguments = packet.HandshakeId + " " + ip + " " + port;
process.StartInfo.FileName = Application.dataPath + "../glorious.exe";
process.Start();
Obviously it's Windows-only this way, how to go about this in terms of OSX and Linux?
Comment
Answer by tanoshimi · May 20, 2016 at 11:54 AM
What part of that is "obviously Windows only"?
The only thing you might have to change is the "../glorious.exe" - to find the appropriate path to the executable on OSX, refer to http://stackoverflow.com/questions/15452651/start-an-external-process-on-mac-with-c-sharp