Skip to content

feat: updating win-codesign resources#9430

Merged
mmaietta merged 4 commits into
masterfrom
feat/win-codesign-osslsigncode
Feb 9, 2026
Merged

feat: updating win-codesign resources#9430
mmaietta merged 4 commits into
masterfrom
feat/win-codesign-osslsigncode

Conversation

@mmaietta
Copy link
Copy Markdown
Collaborator

@mmaietta mmaietta commented Dec 7, 2025

Summary

This PR updates the Windows code signing tooling in electron-builder to use the latest version of win-codesign from electron-builder-binaries. It introduces a backward-compatible configuration system that allows users to access both legacy and newer code signing utilities during the transition period.

Resolves issue #8149 which reported failures creating dylib symbolic links on Windows during the code signing process. The issue lies in the "combo" winCodeSign toolset that has symlinks even though it's also supposed to be extracted on Windows.

Key Updates:

  1. Updated win-codesign tooling to the latest version from electron-builder-binaries https://github.com/electron-userland/electron-builder-binaries/releases?q=codesign&expanded=true
  2. New config property for handling different versions of win-codesign
  3. Default configuration set to version 0.0.0 with option to opt-in to newer toolsets
  4. Added additional CI tests for coverage of both legacy and updated signtools
  5. AppxTests can now finally run again. They require the updated signtool.exe in the updated WindowsKits

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Dec 7, 2025

🦋 Changeset detected

Latest commit: c265376

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
electron-builder Major
app-builder-lib Major
dmg-builder Major
electron-builder-squirrel-windows Major
electron-forge-maker-appimage Major
electron-forge-maker-nsis-web Major
electron-forge-maker-nsis Major
electron-forge-maker-snap Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates the Windows code signing toolset (win-codesign) to resolve an issue where dylib symbolic links were failing to be created on Windows during the build process. The PR introduces a configurable winCodeSign option that allows users to choose between the legacy toolset ("0.0.0") and the new Windows Kits Bundle ("1.0.0").

Changes:

  • Added winCodeSign configuration option to WindowsConfiguration with support for "0.0.0" (legacy) and "1.0.0" (new toolset)
  • Refactored tool path resolution logic into centralized functions in targets/tools.ts
  • Parameterized Windows packaging tests to run against both toolset versions
  • Updated import paths from src/ to out/ in test files
  • Removed platform-specific test conditionals (test.ifNotCiMac) to run tests on all platforms

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/app-builder-lib/src/options/winOptions.ts Adds winCodeSign configuration option
packages/app-builder-lib/scheme.json Updates JSON schema for winCodeSign option
packages/app-builder-lib/src/targets/tools.ts Centralizes tool path resolution with version-specific logic
packages/app-builder-lib/src/codeSign/windowsSignToolManager.ts Refactors signing logic, removes getSignVendorPath, improves code organization
packages/app-builder-lib/src/winPackager.ts Updates rcedit path resolution to use new utility functions
packages/app-builder-lib/src/targets/AppxTarget.ts Updates Windows Kits Bundle path resolution
packages/electron-builder/src/cli/create-self-signed-cert.ts Updates to use new getWindowsKitsBundle function
test/src/windows/winPackagerTest.ts Parameterizes tests to run with both winCodeSign versions
test/src/windows/winCodeSignTest.ts Updates error message expectation for new osslsigncode version
test/src/windows/assistedInstallerTest.ts Removes platform conditionals and unused imports
test/src/packageManagerTest.ts Fixes import path from src/ to out/
test/src/BuildTest.ts Fixes import path from src/ to out/
test/snapshots/windows/winPackagerTest.js.snap Updates snapshots for parameterized tests
.github/workflows/test.yaml Adds dmgTest and duplicate assistedInstallerTest to Mac test matrix
.changeset/wide-wolves-help.md Documents the feature as a minor version change

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/test.yaml Outdated
Comment thread packages/app-builder-lib/src/codeSign/windowsSignToolManager.ts Outdated
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Jan 26, 2026

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/app-builder-lib/scheme.json
Comment thread test/src/updater/differentialUpdateTest.ts Outdated
Comment thread test/src/updater/differentialUpdateTest.ts Outdated
Comment thread vite.config.ts Outdated
Comment thread packages/app-builder-lib/src/toolsets/windows.ts
@mmaietta mmaietta marked this pull request as ready for review February 3, 2026 03:18
Copy link
Copy Markdown
Contributor

@beyondkmp beyondkmp left a comment

Choose a reason for hiding this comment

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

Made 3 suggestions: the toolsets type for schema, the hardcoded version download for win-codesign, and the AppX tool selection should be based on the target arch.

Comment thread packages/app-builder-lib/scheme.json
Comment thread packages/app-builder-lib/src/targets/tools.ts Outdated
Comment thread packages/app-builder-lib/src/targets/AppxTarget.ts Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 41 out of 42 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

packages/app-builder-lib/src/toolsets/linux.ts:4

  • Typo in comment: "rather then" should be "rather than".

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/vitest-scripts/smart-config.ts Outdated
Comment thread packages/electron-builder/src/cli/create-self-signed-cert.ts
@mmaietta mmaietta force-pushed the feat/win-codesign-osslsigncode branch from 70b0d88 to b294c9d Compare February 8, 2026 20:10
This pull request updates the Windows code signing toolset (win-codesign) to resolve an issue where dylib symbolic links were failing to be created on Windows during the build process. The PR introduces a configurable `winCodeSign` option that allows users to choose between the legacy toolset ("0.0.0") and the new Windows Kits Bundle ("1.0.0").

**Changes:**
- Added `winCodeSign` configuration option to `WindowsConfiguration` with support for "0.0.0" (legacy) and "1.0.0" (new toolset)
- Refactored tool path resolution logic into centralized functions in `targets/tools.ts`
- Parameterized Windows packaging tests to run against both toolset versions
…lsigncode

# Conflicts:
#	.github/workflows/test.yaml
@mmaietta mmaietta force-pushed the feat/win-codesign-osslsigncode branch from 9a4ba81 to 4ac8011 Compare February 9, 2026 03:27
…-codesign-osslsigncode

# Conflicts:
#	test/vitest-scripts/vitest-smart-reporter.ts
@mmaietta mmaietta merged commit 1b39a8e into master Feb 9, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed to create dylib symbolic link on Windows

3 participants