Skip to content

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

Description

@aredfox

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:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions