index.js
1.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
'use strict'
import { app } from 'electron'
import initWindow from './services/windowManager'
import DisableButton from './config/DisableButton'
function onAppReady () {
initWindow()
DisableButton.Disablef12()
}
app.isReady() ? onAppReady() : app.on('ready', onAppReady)
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('browser-window-created', () => {
console.log('window-created')
})
// app.on('activate', () => {
// if (mainWindow === null) {
// createWindow()
// }
// })
/**
* Auto Updater
*
* Uncomment the following code below and install `electron-updater` to
* support auto updating. Code Signing with a valid certificate is required.
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-electron-builder.html#auto-updating
*/
/*
import { autoUpdater } from 'electron-updater'
autoUpdater.on('update-downloaded', () => {
autoUpdater.quitAndInstall()
})
app.on('ready', () => {
if (process.env.NODE_ENV === 'production') autoUpdater.checkForUpdates()
})
*/