Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win32.js app.asar vs app.asar.unpacked #7

Open
aredfox opened this issue Jan 23, 2017 · 4 comments
Open

win32.js app.asar vs app.asar.unpacked #7

aredfox opened this issue Jan 23, 2017 · 4 comments

Comments

@aredfox
Copy link

aredfox commented Jan 23, 2017

When packaging for windows target with electron 1.4.14 and electron-builder 11.2.5 the module couldn't be found, more specifically it couldn't find nircmd.exe.

I think path.join should normally look in app.asar.unpacked, but apparantly on Windows it doesn't?

Solution/Workaround:
I had to change the line in win32.js from
var nircmd = childProcess.spawn(path.join(__dirname, "bin", "nircmd.exe"), ["savescreenshot", options.output]);
to
var nircmd = childProcess.spawn(path.join(__dirname.replace('app.asar', 'app.asar.unpacked'), "bin", "nircmd.exe"), ["savescreenshot", options.output]);

Also:

@adarshu
Copy link

adarshu commented Jun 27, 2017

+1

@whalesoft-repo
Copy link

Hi, any chance it will be fixed?

@jhotujec
Copy link

jhotujec commented Apr 6, 2018

+1

@jhotujec
Copy link

jhotujec commented Apr 6, 2018

If anyone needs a quick working solution: https://github.com/jhotujec/node-desktop-screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants