mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-20 03:03:40 +08:00
feat: electron12
This commit is contained in:
parent
3588c929bf
commit
bf6e95e370
@ -89,6 +89,7 @@
|
|||||||
"vuex-electron": "^1.0.0"
|
"vuex-electron": "^1.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"babel-runtime": "^6.26.0",
|
||||||
"ajv": "^6.5.0",
|
"ajv": "^6.5.0",
|
||||||
"babel-core": "^6.26.3",
|
"babel-core": "^6.26.3",
|
||||||
"babel-loader": "^7.1.4",
|
"babel-loader": "^7.1.4",
|
||||||
@ -104,7 +105,7 @@
|
|||||||
"css-loader": "^0.28.11",
|
"css-loader": "^0.28.11",
|
||||||
"del": "^3.0.0",
|
"del": "^3.0.0",
|
||||||
"devtron": "^1.4.0",
|
"devtron": "^1.4.0",
|
||||||
"electron": "^11.0.2",
|
"electron": "^12.0.15",
|
||||||
"electron-builder": "22.10.5",
|
"electron-builder": "22.10.5",
|
||||||
"electron-debug": "^1.5.0",
|
"electron-debug": "^1.5.0",
|
||||||
"electron-devtools-installer": "^2.2.4",
|
"electron-devtools-installer": "^2.2.4",
|
||||||
@ -135,7 +136,7 @@
|
|||||||
"iohook": {
|
"iohook": {
|
||||||
"targets": [
|
"targets": [
|
||||||
"node-83",
|
"node-83",
|
||||||
"electron-85"
|
"electron-87"
|
||||||
],
|
],
|
||||||
"platforms": [
|
"platforms": [
|
||||||
"darwin"
|
"darwin"
|
||||||
|
11567
pnpm-lock.yaml
generated
Normal file
11567
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,9 @@
|
|||||||
import { app } from 'electron'
|
import { app } from 'electron'
|
||||||
import '../renderer/store'
|
import '../renderer/store'
|
||||||
import init from './common/common';
|
import init from './common/common'
|
||||||
import {autoUpdate} from './common/autoUpdate';
|
import { autoUpdate } from './common/autoUpdate'
|
||||||
import createTray from './tray';
|
import createTray from './tray'
|
||||||
const {main} = require("./browsers")();
|
const { main } = require("./browsers")()
|
||||||
/**
|
/**
|
||||||
* Set `__static` path to static files in production
|
* Set `__static` path to static files in production
|
||||||
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-static-assets.html
|
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-static-assets.html
|
||||||
@ -11,19 +11,16 @@ const {main} = require("./browsers")();
|
|||||||
if (process.env.NODE_ENV !== 'development') {
|
if (process.env.NODE_ENV !== 'development') {
|
||||||
global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')
|
global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')
|
||||||
}
|
}
|
||||||
// to fix https://github.com/electron/electron/issues/18397
|
|
||||||
app.allowRendererProcessReuse = false;
|
|
||||||
app.dock.hide();
|
|
||||||
|
|
||||||
function createWindow() {
|
function createWindow() {
|
||||||
main.init();
|
main.init()
|
||||||
init(main.getWindow());
|
init(main.getWindow())
|
||||||
}
|
}
|
||||||
|
|
||||||
app.on('ready', () => {
|
app.on('ready', () => {
|
||||||
createWindow()
|
createWindow()
|
||||||
createTray(main.getWindow());
|
createTray(main.getWindow())
|
||||||
autoUpdate();
|
autoUpdate()
|
||||||
})
|
})
|
||||||
|
|
||||||
app.on('window-all-closed', () => {
|
app.on('window-all-closed', () => {
|
||||||
@ -34,5 +31,5 @@ app.on('window-all-closed', () => {
|
|||||||
|
|
||||||
app.on('activate', () => {
|
app.on('activate', () => {
|
||||||
createWindow()
|
createWindow()
|
||||||
});
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user