I'm trying to launch mupen64plus from Node.js like so:
var exec = require('child_process').execFile;
var child = exec('mupen64plus.exe --fullscreen "../roms/some-homebrew.z64"', function(err, stdout, stderr) {
console.log(err, stdout, stderr);
});
Which give the output of:
{ [Error: spawn ENOENT] code: 'ENOENT', errno: 'ENOENT', syscall: 'spawn' } '' ''
I know it is running the application, because when I remove the "../roms/some-homebrew.z64"
section, I get the regular mupen64plus output saying it cannot find a ROM to load.
I assume the error has to do with spawn
ing a new window, or application, to actually run this.
Am I doing the right thing to spawn this application? If so, how can I get further information on what's happening?
Update: This code works!
var exec = require('child_process').spawn;
var child = exec(__dirname + '/relative-path/to/mupen64plus.exe', ['--fullscreen', __dirname + '/relative-path/to/home-brew.z64']);