Skip to content

Commit

Permalink
opt package and make
Browse files Browse the repository at this point in the history
  • Loading branch information
tanzheng committed Dec 1, 2022
1 parent cd2c716 commit 37f1d62
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 26 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
node_modules/
out/
36 changes: 36 additions & 0 deletions forge.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
const path = require('path');

module.exports = {
"packagerConfig": {
"name": "MathLabTool",
"icon": path.join(__dirname, "/public/icon/mathlabtool"),
"asar": true,
"overwrite": true
},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "MathLabTool",
// "setupExe": "MathLabTool_setup.exe",
// "setupMsi": "MathLabTool_setup.msi",
// "noMsi": false
// "setupIcon": path.join(__dirname, "/public/icon/mathlabtool.ico")
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
}
]
}
2 changes: 2 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
if(require('electron-squirrel-startup')) return;

const { app, BrowserWindow, Menu, ipcMain } = require('electron')
const { exec } = require('child_process')
const path = require('path')
Expand Down
26 changes: 1 addition & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,6 @@
"electron-rebuild": "^3.2.9"
},
"config": {
"forge": {
"packagerConfig": {},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "mathlabtool"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
}
]
}
"forge": "./forge.config.js"
}
}

0 comments on commit 37f1d62

Please sign in to comment.