From 25ab391a30468420ae5f4f86083a98ef4e28f5aa Mon Sep 17 00:00:00 2001 From: Nayam Amarshe <25067102+NayamAmarshe@users.noreply.github.com> Date: Sat, 27 Aug 2022 14:57:58 +0530 Subject: [PATCH] Added mac config --- package.json | 37 ++++++++++++++++++++++++++++---- renderer/pages/index.jsx | 1 - resources/entitlements.mac.plist | 10 +++++++++ 3 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 resources/entitlements.mac.plist diff --git a/package.json b/package.json index 8438765..6c7f5c6 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,11 @@ "build": "next build renderer && next export renderer", "pack-app": "npm run build && electron-builder --dir", "dist": "npm run build && DEBUG=* electron-builder", + "dist:appimage": "npm run build && DEBUG=* electron-builder build -l AppImage", + "dist:flatpak": "npm run build && DEBUG=* electron-builder build -l flatpak", + "dist:dmg": "npm run build && DEBUG=* electron-builder build -m dmg flatpak", + "dist:msi": "npm run build && DEBUG=* electron-builder build -w nsis", + "dist:pkg": "npm run build && DEBUG=* electron-builder build -m pkg", "publish-app": "export GH_TOKEN=<> && npm run build && electron-builder -w --publish always", "publish-win": "set GH_TOKEN=<> && npm run build && electron-builder -w --publish always" }, @@ -60,9 +65,33 @@ } ], "mac": { - "icon": "main/build/icon.icns", - "category": "public.app-category.graphics-design", - "target": "dmg" + "type": "distribution", + "hardenedRuntime": true, + "entitlements": "resources/entitlements.mac.plist", + "entitlementsInherit": "resources/entitlements.mac.plist", + "gatekeeperAssess": false, + "target": [ + { + "target": "dmg", + "arch": [ + "x64" + ] + } + ] + }, + "dmg": { + "contents": [ + { + "x": 130, + "y": 220 + }, + { + "x": 410, + "y": 220, + "type": "link", + "path": "/Applications" + } + ] }, "linux": { "publish": [ @@ -82,7 +111,7 @@ "github" ], "target": [ - "msi" + "nsis" ], "asarUnpack": [ "**/node_modules/sharp/**" diff --git a/renderer/pages/index.jsx b/renderer/pages/index.jsx index 60e58de..7ea8b65 100644 --- a/renderer/pages/index.jsx +++ b/renderer/pages/index.jsx @@ -130,7 +130,6 @@ const Home = () => { const upscaylHandler = async () => { if (imagePath !== "") { - resetImagePaths(); setProgress("Hold on..."); await window.electron.send(commands.UPSCAYL, { scaleFactor, diff --git a/resources/entitlements.mac.plist b/resources/entitlements.mac.plist new file mode 100644 index 0000000..dad3e20 --- /dev/null +++ b/resources/entitlements.mac.plist @@ -0,0 +1,10 @@ + + + + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.allow-jit + + +