Skip to content

Commit

Permalink
Merge pull request #266 from bcc-code/fix-electron-mac-notation
Browse files Browse the repository at this point in the history
Fix electron mac notarization
  • Loading branch information
kkuepper authored Jan 9, 2024
2 parents e847691 + 9825918 commit dd57ea2
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 59 deletions.
58 changes: 0 additions & 58 deletions electron-builder.yml

This file was deleted.

69 changes: 69 additions & 0 deletions electron_builder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// @ts-check
/**
* @type {import('electron-builder').Configuration}
*/
const config = {
appId: "org.brunstad.bmm",
productName: "BMM alpha",
files: [
{ from: ".output/public", to: "dist-electron", filter: ["**/*"] },
{ from: "dist-electron", to: "dist-electron", filter: ["**/*"] },
"package.json",
"!node_modules",
],
directories: {
output: "dist-app",
},
protocols: [{ name: "Custom BMM", schemes: ["bmm"] }],
mac: {
category: "public.app-category.music",
entitlements: "build/entitlements.mac.plist",
icon: "resources/app.icns",
hardenedRuntime: true,
darkModeSupport: true,
gatekeeperAssess: true,
target: [
{
target: "dmg",
arch: "x64",
},
{ target: "dmg", arch: "arm64" },
],
notarize: {
teamId: process.env.APPLE_TEAM_ID || "",
},
},
win: {
target: ["msi", "zip"],
},
linux: {
category: "Audio;Player",
desktop: {
Keywords:
"audio;bcc;bmm;brunstad;christian;church;edification;faith;media;music;sermon",
SingleMainWindow: true,
StartupWMClass: "bmm-web",
MimeType: "x-scheme-handler/bmm",
},
target: ["AppImage", "deb"],
},
deb: {
packageName: "bmm-web",
// For questions specific to the Debian package, users can e-mail me.
// We don't have an author e-mail in the package.json, otherwise that one would be used.
// For Debian packages such information is mandatory
maintainer: "[email protected]",
depends: ["libnotify4", "libxtst6", "libnss3"],
recommends: [
// Most XDG supporting desktop distros will use a trigger installed by this package to automatically register the URI scheme handling.
// However, the app RUNs without it, and distros are free to provide a different mechanism (or let the user handle it manually).
// Documentation states: (https://www.debian.org/doc/debian-policy/ch-relationships.html)
// > This declares a strong, but not absolute, dependency.
// > The Recommends field should list packages that would be found together with this one in all but unusual installations.
"desktop-file-utils",
],
packageCategory: "sound",
},
};

module.exports = config;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "nuxt generate",
"dev:electron": "cross-env ELECTRON=true nuxt dev --port 9001",
"build:electron": "cross-env ELECTRON=true nuxt generate",
"package:electron": "electron-builder",
"package:electron": "electron-builder --config=electron_builder.js",
"preview": "cross-env PORT=9001 nuxt preview",
"coverage": "vitest run --coverage",
"e2e": "cypress open",
Expand Down

0 comments on commit dd57ea2

Please sign in to comment.