Skip to content

Commit

Permalink
#93 Mac Notarization, #107 wrong exec name in Linux, #105 vsdx file a…
Browse files Browse the repository at this point in the history
…ssociation, #96 svg icon
  • Loading branch information
m-mohamedin committed Jun 10, 2019
1 parent 0cf4aa3 commit 3fd31a3
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 10 deletions.
8 changes: 8 additions & 0 deletions build/entitlements.mac.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
</dict>
</plist>
22 changes: 22 additions & 0 deletions build/icon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions build/notarize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
require('dotenv').config();
const { notarize } = require('electron-notarize');

exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context;
const appName = context.packager.appInfo.productFilename;

if (electronPlatformName !== 'darwin') {
return;
}

return await notarize({
appBundleId: 'com.jgraph.drawio.desktop',
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLEID,
appleIdPassword: process.env.APPLEIDPASS,
});
};
32 changes: 23 additions & 9 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,20 @@
"artifactName": "${productName}-${version}-portable.${ext}"
},
"mac": {
"hardenedRuntime": true,
"gatekeeperAssess": false,
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mac.plist",
"category": "public.app-category.graphics-design",
"target": [
"zip",
"dmg"
]
},
"dmg": {},
"afterSign": "build/notarize.js",
"dmg": {
},
"linux": {
"executableName": "draw-io",
"category": "Graphics",
"maintainer": "JGraph <support@draw.io>",
"target": [
Expand All @@ -48,11 +53,20 @@
"snap"
]
},
"fileAssociations": {
"ext": "drawio",
"name": "draw.io Diagram",
"description": "draw.io Diagram",
"mimeType": "application/vnd.jgraph.mxfile",
"role": "Editor"
}
"fileAssociations": [
{
"ext": "drawio",
"name": "draw.io Diagram",
"description": "draw.io Diagram",
"mimeType": "application/vnd.jgraph.mxfile",
"role": "Editor"
},
{
"ext": "vsdx",
"name": "VSDX Document",
"description": "VSDX Document",
"mimeType": "application/vnd.visio",
"role": "Editor"
}
]
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@
"crc": "^3.8.0"
},
"devDependencies": {
"dotenv": "^8.0.0",
"electron": "^5.0.1",
"electron-builder": "^20.41.0",
"electron-builder": "^20.43.0",
"electron-notarize": "^0.1.1",
"sumchecker": "^2.0.2"
}
}

0 comments on commit 3fd31a3

Please sign in to comment.