Skip to content

Using hookFunction via electron-winstaller #548

@beyondkmp

Description

@beyondkmp

Description

Set the hookFunction to pass our own sign function for customized signing.

Expected

Signing successful

Result
Signing failed

  ⨯ Failed with exit code: 4294967295
Output:
System.AggregateException: One or more errors occurred. ---> System.Exception: Failed to sign, command invoked was: 'D:\a\element-desktop\element-desktop\node_modules\electron-winstaller\vendor\signtool.exe sign windows-sign C:\Users\runneradmin\AppData\Local\SquirrelTemp\tempa\lib\net45\Element Nightly_ExecutionStub.exe'
   at Squirrel.Update.Program.<signPEFile>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
...

Does the Windows installer support hookFunction? If not, is it possible to add support for it?

Why is hookFunction needed

In Electron Builder, many signing algorithms are implemented (for example, Azure Pipelines, or signing as part of a pipeline for other files to be signed). If hookFunction is supported, these signing functions can be directly passed through. However, if it's not supported, users would need to re-implement these functions themselves and pass them via hookModulePath. This places higher demands on the users and results in redundant implementation.

Refer
electron-userland/electron-builder#8854

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions