electron / windows-installer

Build Windows Installers for Electron apps
MIT License
1.58k stars 261 forks source link

How to filter to be signed files? #358

Open TerryChan opened 4 years ago

TerryChan commented 4 years ago

I'm using windows-installer to pacakge my applciation and sign the executables. But there are thousands of executables in the application, and most of them are not needed to be sign, but widnows-installer will sign all of them by launching signtool.exe one by one, it takes too much time (more than 10 minutes) for packaging. In fact, there are less than 10 files need to be signed, are there any methods to filter the to be signed files? Exactly, I don't want to launch signtool.exe so many times.

chbonser commented 2 years ago

I believe I have another, more concrete reason to be more selective in file signing.

I am using the node-serialport library. It since version 10.0.2 it includes prebuilt binaries for a number of different architectures and attempting to sign some of those architectures causes a Failed to sign error by windows-installer.

Can we either filter these files out or is there an alternative suggestion?

obra commented 1 year ago

@chbonser Did you ever find a solution to this issue?

chbonser commented 1 year ago

@obra I used an older version of the node-serialport library as a temporary solution. I intended to revisit but never made the time.

carloslenz commented 1 year ago

~I would like to sign only the main .exe file, not everything like the error in #404. Is there a way do do it?~

Following this tip I found out the issue I had (In Squirrel.Windows) was that the path to the certificate was invalid.

flyinghail commented 11 months ago

I've encountered a similar problem, where the prebuild .node file signing that comes with some packages keeps giving me an error.

https://github.com/electron-userland/electron-builder/pull/7685

electron-builder provides two parameters to solve similar problems: signDlls and signExts.