Notarization and Signing in Electron.NET Core Mac Builds #1018
Replies: 3 comments
-
|
I think this is a useful discussion to have. I know that @softworkz wanted to make pretty much everything feel .NET / C# (e.g., use csproj properties instead of some JSON merging), but there certainly are limits to this approach. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Some additional notesLet's disambiguate package.json use cases for future readers - because there are at least three different ones: Installation of packages for build customizationThis is what this question was about. I think the suggestions I gave should work for this. In order to create Linux packages with electron-builder, it's also required to install certain prerequisites - which even requires privileged execution (e.g. Packages required on the Electron SideIf somebody needs npm packages on the Electron side (like for using in a NPM Web Client Packages (ASP.NET)For this, a package.json in the root folder can be used. IMPORTANT: Don't put any electron or build-related stuff into this package.json. It won't have any effect. |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So in pre-existing releases, a custom package.json was allowed which provided the freedom to add additional NPM libraries at the time of electron-build step for custom scripts. Based on documentation: https://github.com/ElectronNET/Electron.NET/blob/main/docs/Using/Configuration.md#relation-to-packagejson , this customization is now gone. I would log an Issue against but maybe I am missing something in the newer version of electron-builder and electron dot net.
Note I had set up my notarization process following guidance from https://www.electron.build/code-signing-mac , specifically https://kilianvalkhof.com/2019/electron/notarizing-your-electron-application/ . I added the package https://www.npmjs.com/package/@electron/notarize otherwise my package file matched one to one in the Electron NET library ones.
(FYI, I have also reached out to electron-builder in the past and that was resolved: electron-userland/electron-builder#7424 , although at that time I was distributing a .DMG and since changed to .PKG due to requirements)
This library was then called in the electron.manifest.json as an "afterAllArtifactBuild" step since electron signs the .APP file but then I needed to sign and notarize the .PKG file at the end. Note - I guess one alternative is I could do this outside of electron-builder but...
/TLDR: How do you build and notarize Mac .PKG with the modern Electron.NET Core? Has electron-builder simplified this in recent years?
Beta Was this translation helpful? Give feedback.
All reactions