문제

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 spawning 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']);
도움이 되었습니까?

해결책

Remove the double quotes around the ROM path. Given the description you've given about the troubleshooting you've done, the issue looks to be with the format you're passing the argument in.

There shouldn't be any issues with opening a fullscreen application and there are various examples that utilise exec to open fullscreen chrome windows.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top