Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #63 from LINCnil/notarization
Browse files Browse the repository at this point in the history
Update README file, Add Notarization Requirement for Mac Software
  • Loading branch information
LaboCNIL authored Feb 24, 2020
2 parents 8ca28c4 + 837417a commit bcac449
Show file tree
Hide file tree
Showing 6 changed files with 813 additions and 1,181 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ private/
*.log
.DS_Store
.idea
.env
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ For Windows users: `npm run win`

Note: If you're using Linux Bash for Windows, [see this guide](https://www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/) or use `node` from the command prompt.

If you need to build for windows from another system you can use docker:

```
docker run --rm -ti \
--env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \
--env ELECTRON_CACHE="/root/.cache/electron" \
--env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \
-v ${PWD}:/project \
-v ${PWD##*/}-node-modules:/project/node_modules \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine
```

## Resources for Learning Electron

- [electron.atom.io/docs](http://electron.atom.io/docs) - all of Electron's documentation
Expand Down
8 changes: 8 additions & 0 deletions 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>
18 changes: 18 additions & 0 deletions 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;
if (electronPlatformName !== 'darwin') {
return;
}

const appName = context.packager.appInfo.productFilename;

return await notarize({
appBundleId: 'com.atnos.pia',
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLEID,
appleIdPassword: process.env.APPLEPIAPASSWORD,
});
};
23 changes: 15 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"name": "PIA",
"version": "2.2.0",
"name": "pia",
"productName": "PIA",
"version": "2.3.0",
"description": "Version Portable Outil PIA",
"main": "main.js",
"scripts": {
"start": "electron .",
"mac": "electron-builder -m",
"win": "electron-builder -w",
"win": "electron-builder -w --x64 --ia32",
"linux": "electron-builder -l",
"win-cert": "electron-builder create-self-signed-cert -p atnos",
"publish-to-github": "electron-builder build -mwl -p onTagOrDraft"
"publish-to-github": "electron-builder -p onTagOrDraft"
},
"author": "ATNOS",
"repository": "https://github.com/LINCnil/pia-app",
Expand All @@ -19,6 +20,7 @@
],
"build": {
"appId": "com.atnos.pia",
"afterSign": "notarize.js",
"directories": {
"buildResources": ".",
"output": "releases"
Expand All @@ -27,6 +29,10 @@
"publish": [
"github"
],
"hardenedRuntime": true,
"gatekeeperAssess": false,
"entitlements": "entitlements.mac.plist",
"entitlementsInherit": "entitlements.mac.plist",
"category": "public.app.category.productivity"
},
"win": {
Expand All @@ -50,12 +56,13 @@
}
},
"devDependencies": {
"electron": "5.0.4",
"electron-builder": "^21.2.0"
"electron": "^8.0.0",
"electron-builder": "^22.3.2"
},
"dependencies": {
"electron-log": "^3.0.6",
"electron-updater": "^4.0.14",
"electron-log": "^4.0.6",
"electron-notarize": "^0.2.1",
"electron-updater": "^4.2.0",
"electron-window-state": "^5.0.3"
}
}
Loading

0 comments on commit bcac449

Please sign in to comment.