electron / windows-installer

Build Windows Installers for Electron apps
MIT License
1.55k stars 259 forks source link

How to sign additional binaries #480

Closed norbertkovacs95 closed 10 months ago

norbertkovacs95 commented 10 months ago

I have an electron project which integrates a node library that uses native modules. When I install the signed app, and require the .node file, and access error is thrown since that file is not signed.

Is there any way to sign these binaries as well?

Thanks in advance for the help.

norbertkovacs95 commented 10 months ago

I managed to solve this issue by first packaging the app (electron-forge package), then signing the binaries manually using signtool.exe shipped by windows-installer, and finally running electron-forge make --skip-package.

MarshallOfSound commented 10 months ago

I managed to solve this issue by first packaging the app (electron-forge package), then by using the signtool.exe shipped by windows-installer signing the binaries manually, and finally running electron-forge make --skip-package.

You could do this smoothly in a single step if you ran signtool.exe inside a postPackage step: https://www.electronforge.io/config/hooks#postpackage