Skip to content

Commit 3e5f2fd

Browse files
committed
Attempt to remove signature
1 parent 1198347 commit 3e5f2fd

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

packages/core/assets/electron/main.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,12 +277,6 @@ Security.runVerification(isProduction).then(async isValid => {
277277
})
278278

279279
if (isMainWindow) {
280-
ipcMain.once(`commoners:ready:${__id}`, () => {
281-
Window.setMainWindow(win)
282-
Window.setFirstInitialized()
283-
Window.flushReadyQueue(win)
284-
})
285-
286280
win.once('close', () => {
287281
Window.setMainWindow(null)
288282
})

packages/core/utils/sea.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,21 @@ async function injectSEABlob(
160160
// Set executable permissions
161161
chmodSync(executablePath, 0o755)
162162
} else if (platform === 'win32') {
163-
// Windows: Direct injection
163+
// Windows: Remove signature before injection (if present)
164+
try {
165+
// Try to remove signature using signtool (from Windows SDK)
166+
execSync(`signtool remove /s "${executablePath}"`, { stdio: 'pipe' })
167+
} catch {
168+
// Ignore if signtool is not available or signature removal fails
169+
// postject can still work but may show warnings
170+
}
171+
172+
// Inject with postject
164173
const injectCmd = `npx postject "${executablePath}" NODE_SEA_BLOB "${blobPath}" --sentinel-fuse ${sentinelFuse}`
165174
execSync(injectCmd, { stdio: 'pipe' })
175+
176+
// Note: Executable will be unsigned after injection
177+
// Re-sign later as part of the Electron app signing process
166178
} else {
167179
throw new PlatformError(
168180
'SEA not supported on platform',

0 commit comments

Comments
 (0)