Skip to content

Commit

Permalink
Electron Forge support (#632)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Dec 30, 2023
1 parent 6d08e2a commit 5a55c09
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
.DS_Store?
dist/*
out/*
node_modules/*
third_party/*
package-lock.json
Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
"electron": "28.1.1",
"electron-builder": "24.9.1",
"@electron/notarize": "2.2.0",
"@electron-forge/cli": "7.2.0",
"@electron-forge/core": "7.2.0",
"@electron-forge/maker-snap": "7.2.0",
"@electron-forge/maker-dmg": "7.2.0",
"@electron-forge/maker-zip": "7.2.0",
"eslint": "8.56.0"
},
"eslintConfig": {
Expand Down Expand Up @@ -103,6 +108,9 @@
"report-dir": "dist/nyc/coverage",
"temp-dir": "dist/nyc/.nyc_output"
},
"config": {
"forge": "publish/forge.config.js"
},
"build": {
"appId": "com.lutzroeder.netron",
"productName": "Netron",
Expand Down
65 changes: 65 additions & 0 deletions publish/forge.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@

/*
const APPLE_API_KEY_ID = process.env.APPLE_API_KEY_ID;
const APPLE_API_KEY_ISSUER_ID = process.env.APPLE_API_KEY_ISSUER_ID;
*/

export default {
outDir: 'dist',
packagerConfig: {
icon: "publish/icon",
dir: [
'source'
],
ignore: [
"publish",
"third_party",
"test",
"tools"
],
/*
osxNotarize: {
tool: 'notarytool',
appleApiKey: `~/.private_keys/AuthKey_${APPLE_API_KEY_ID}.p8`,
appleApiKeyId: APPLE_API_KEY_ID,
appleApiIssuer: APPLE_API_KEY_ISSUER_ID
},
*/
asar: true
},
/*
makeTargets: {
win32: ['nsis'],
darwin: ['dmg', 'zip'],
linux: ['snap'],
},
*/
makers: [
{
name: '@electron-forge/maker-zip',
config: {
platforms: [ 'darwin' ],
// name: "${name}-${version}-mac.zip"
}
},
{
name: '@electron-forge/maker-dmg',
config: {
background: './publish/background.png',
/* eslint-disable no-template-curly-in-string */
name: "Netron-${version}"
/* eslint-enable no-template-curly-in-string */
}
}
],
publishers: [
{
"name": "@electron-forge/publisher-github",
"config": {}
},
{
"name": "@electron-forge/publisher-snapcraft",
"config": {}
}
]
};

0 comments on commit 5a55c09

Please sign in to comment.