Skip to content

Conversation

@beyondkmp
Copy link

When _ExecutionStub.exe already exists in the files, avoid overwriting it. This is primarily because during the build process, _ExecutionStub.exe is automatically generated with my custom complex signatures process(Information is written to _ExecutionStub.exe through WriteZipToSetup, which only adds custom complex signatures), but Squirrel Windows overwrites it, causing the loss of signatures.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be entirely whitespace changes, is that intentional?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I changed \r to \r\n because it was causing errors on my machine.

The system cannot find the batch label specified - StartDeveloperCommandPrompt.

However, since it works fine on GitHub Actions, I reverted the change.

beyondkmp added a commit to electron-userland/electron-builder that referenced this pull request Jul 31, 2025
fix #8952

**Root Cause**

when createExecutableStubForExe is executed, WriteZipToSetup writes
information to the file, essentially creating a new file, which
invalidates the original signature.

![Image](https://github.com/user-attachments/assets/9f5b0f4b-8f50-4373-8dad-45b00a730ee1)


https://github.com/Squirrel/Squirrel.Windows/blob/51f5e2cb01add79280a53d51e8d0cfa20f8c9f9f/src/Update/Program.cs#L633-L647


![Image](https://github.com/user-attachments/assets/f0ea1e22-9727-4599-a836-1fa1f3c77dcc)

**How to fix**
Apply a patch to the Squirrel Windows source
code(Squirrel/Squirrel.Windows#1903). For the
existing stub exe files, don't generate them anymore. Then, a new stub
exe can be generated in Electron Builder and signed.

---------

Co-authored-by: Mike Maietta <[email protected]>
daihere1993 pushed a commit to daihere1993/electron-builder that referenced this pull request Jul 31, 2025
fix electron-userland#8952

**Root Cause**

when createExecutableStubForExe is executed, WriteZipToSetup writes
information to the file, essentially creating a new file, which
invalidates the original signature.

![Image](https://github.com/user-attachments/assets/9f5b0f4b-8f50-4373-8dad-45b00a730ee1)


https://github.com/Squirrel/Squirrel.Windows/blob/51f5e2cb01add79280a53d51e8d0cfa20f8c9f9f/src/Update/Program.cs#L633-L647


![Image](https://github.com/user-attachments/assets/f0ea1e22-9727-4599-a836-1fa1f3c77dcc)

**How to fix**
Apply a patch to the Squirrel Windows source
code(Squirrel/Squirrel.Windows#1903). For the
existing stub exe files, don't generate them anymore. Then, a new stub
exe can be generated in Electron Builder and signed.

---------

Co-authored-by: Mike Maietta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants