Skip to content

Commit

Permalink
fix(win): Include swiftshader in signing directories for windows (#6682)
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos García Ortiz committed Mar 4, 2022
1 parent 93181a7 commit e6312cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/lucky-mice-smell.md
@@ -0,0 +1,5 @@
---
"app-builder-lib": patch
---

fix(signing): Include swiftshader in signing directories for windows
10 changes: 6 additions & 4 deletions packages/app-builder-lib/src/winPackager.ts
Expand Up @@ -392,9 +392,11 @@ export class WinPackager extends PlatformPackager<WindowsConfiguration> {
return
}

const outResourcesDir = path.join(packContext.appOutDir, "resources", "app.asar.unpacked")
// noinspection JSUnusedLocalSymbols
const fileToSign = await walk(outResourcesDir, (file, stat) => stat.isDirectory() || file.endsWith(".exe") || (this.isSignDlls() && file.endsWith(".dll")))
await BluebirdPromise.map(fileToSign, file => this.sign(file), { concurrency: 4 })
const signPromise = (filepath: string[]) => {
const outDir = path.join(packContext.appOutDir, ...filepath)
return walk(outDir, (file, stat) => stat.isDirectory() || file.endsWith(".exe") || (this.isSignDlls() && file.endsWith(".dll")))
}
const filesToSign = await Promise.all([signPromise(["resources", "app.asar.unpacked"]), signPromise(["swiftshader"])])
await BluebirdPromise.map(filesToSign.flat(1), file => this.sign(file), { concurrency: 4 })
}
}

0 comments on commit e6312cb

Please sign in to comment.