electron-builder icon indicating copy to clipboard operation
electron-builder copied to clipboard

Package node that depends on dll files

Open Tenpi opened this issue 4 months ago • 3 comments

  • Electron-Builder Version: 24.9.1
  • Node Version: 20.11.0
  • Electron Version: 28.2.1
  • Electron Type (current, beta, nightly): current
  • Target: windows nsis x64

Hello I am trying to build a native node module that depends on several .dll files (node-canvas).

Screenshot 2024-02-16 at 1 08 30 AM

I don't know how to build it with asar enabled. It works if you disable asar, but when it's enabled it looks like the node file gets copied to C:/users/name/AppData/Local/Temp without any of the dll files and thus it doesn't work.

How can I copy the dll files to the local/temp folder on installation?

Tenpi avatar Feb 16 '24 06:02 Tenpi

Can you try manually specifying **/*.dll in your files configuration?

mmaietta avatar Feb 16 '24 22:02 mmaietta

Can you try manually specifying **/*.dll in your files configuration?

Nope it didn't work, I already included all the files in dist with dist/**/* so don't think that's the issue.

Tenpi avatar Feb 17 '24 02:02 Tenpi

Can you share a minimum reproducible repo/gist of the issue? I can then replicate from there and debug

mmaietta avatar Feb 18 '24 17:02 mmaietta

Try building this project: https://github.com/Tenpi/electron-builder-dll

Tenpi avatar Feb 27 '24 22:02 Tenpi