build: ubuntu build

pull/88/head
xiaojunnuo 2021-08-15 06:09:45 -07:00
parent 6586b67249
commit 7348704672
4 changed files with 14 additions and 4 deletions

View File

@ -215,7 +215,7 @@ module.exports = {
},
speedTest: {
enabled: true,
interval: 160000,
interval: 60000,
hostnameList: ['github.com'],
dnsProviders: ['usa', 'quad9', 'rubyfish']
}

View File

@ -9,7 +9,8 @@ const executor = {
return true
},
async linux (exec, { port }) {
throw Error('暂未实现此功能')
await exec('kill `lsof -i:' + port + " |grep 'dev-sidecar\\|electron' |awk '{print $2}'`")
return true
},
async mac (exec, { port }) {
await exec('kill `lsof -i:' + port + " |grep 'DevSide\\|Elect' |awk '{print $2}'`")

View File

@ -34,6 +34,7 @@ function setTray (app) {
// 系统托盘图标目录
label: '退出',
click: () => {
console.log('force quit')
forceClose = true
quit(app)
}
@ -83,7 +84,7 @@ function isLinux () {
function hideWin () {
if (win) {
if (isLinux()) {
win.minimize()
quit(app)
} else {
win.hide()
}
@ -193,6 +194,7 @@ if (!isFirstInstance) {
// Quit when all windows are closed.
app.on('window-all-closed', () => {
console.log('window-all-closed')
// On macOS it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') {

View File

@ -58,11 +58,18 @@ module.exports = {
allowToChangeInstallationDirectory: true
},
mac: {
icon: 'build/mac/icon.icns'
icon: './build/mac/icon.icns'
},
win: {
requestedExecutionLevel: 'requireAdministrator'
},
icon: './build/icons/512x512.png',
linux: {
icon: './build/icons/',
target: [
'AppImage'
]
},
publish: {
provider: 'generic',
url: 'http://dev-sidecar.docmirror.cn/update/'