Compare commits
2 Commits
f04d3bf636
...
55af6bd54e
Author | SHA1 | Date | |
---|---|---|---|
|
55af6bd54e | ||
|
8c6416ec87 |
@ -2,6 +2,7 @@
|
|||||||
// 控制应用生命周期和创建原生浏览器窗口的模组
|
// 控制应用生命周期和创建原生浏览器窗口的模组
|
||||||
const {app, BrowserWindow, Menu} = require('electron')
|
const {app, BrowserWindow, Menu} = require('electron')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
const fs = require('fs');
|
||||||
const {spawn} = require('child_process');
|
const {spawn} = require('child_process');
|
||||||
const net = require('net');
|
const net = require('net');
|
||||||
const log = require('electron-log');
|
const log = require('electron-log');
|
||||||
@ -65,7 +66,9 @@ async function startBackend() {
|
|||||||
}
|
}
|
||||||
let userHome = process.env.HOME || process.env.USERPROFILE;
|
let userHome = process.env.HOME || process.env.USERPROFILE;
|
||||||
let dataPath = path.join(userHome, "openRenamer");
|
let dataPath = path.join(userHome, "openRenamer");
|
||||||
const childProcess = spawn('node', ['openRenamerBackend/dist/index.js'], {
|
log.info("start check folder exist", __dirname, __filename)
|
||||||
|
let exist = fs.existsSync("openRenamerBackend");
|
||||||
|
const childProcess = spawn('node', [(exist ? '' : '../') + 'openRenamerBackend/dist/index.js'], {
|
||||||
env: {
|
env: {
|
||||||
"PORT": port,
|
"PORT": port,
|
||||||
"DATA_PATH": dataPath
|
"DATA_PATH": dataPath
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"productName": "openRenamer",
|
"productName": "openRenamer",
|
||||||
"appId": "electron.app",
|
"appId": "openRenamer.app",
|
||||||
"directories": {
|
"directories": {
|
||||||
"output": "build"
|
"output": "build"
|
||||||
},
|
},
|
||||||
@ -35,9 +35,9 @@
|
|||||||
"oneClick": false,
|
"oneClick": false,
|
||||||
"allowElevation": true,
|
"allowElevation": true,
|
||||||
"allowToChangeInstallationDirectory": true,
|
"allowToChangeInstallationDirectory": true,
|
||||||
"installerIcon": "./openRenamerBackend/static/favicon.ico",
|
"installerIcon": "../openRenamerBackend/static/favicon.ico",
|
||||||
"uninstallerIcon": "./openRenamerBackend/static/favicon.ico",
|
"uninstallerIcon": "../openRenamerBackend/static/favicon.ico",
|
||||||
"installerHeaderIcon": "./openRenamerBackend/static/favicon.ico",
|
"installerHeaderIcon": "../openRenamerBackend/static/favicon.ico",
|
||||||
"createDesktopShortcut": true,
|
"createDesktopShortcut": true,
|
||||||
"createStartMenuShortcut": true,
|
"createStartMenuShortcut": true,
|
||||||
"shortcutName": "openRenamer"
|
"shortcutName": "openRenamer"
|
||||||
|
1705
electron/yarn.lock
Normal file
1705
electron/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
@ -9,8 +9,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@element-plus/icons-vue": "2.0.10",
|
"@element-plus/icons-vue": "2.0.10",
|
||||||
"axios": "0.21.1",
|
"axios": "1.6.0",
|
||||||
"core-js": "3.6.5",
|
"core-js": "3.35.0",
|
||||||
"dayjs": "1.10.7",
|
"dayjs": "1.10.7",
|
||||||
"element-plus": "2.2.25",
|
"element-plus": "2.2.25",
|
||||||
"vue": "3.2.45",
|
"vue": "3.2.45",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user