Compare commits

..

No commits in common. "55af6bd54eb3e3e3440aa2798dccecafe0ea9961" and "f04d3bf636141966b93dbe814938eeca8a759431" have entirely different histories.

4 changed files with 7 additions and 1715 deletions

View File

@ -2,7 +2,6 @@
// 控制应用生命周期和创建原生浏览器窗口的模组 // 控制应用生命周期和创建原生浏览器窗口的模组
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');
@ -66,9 +65,7 @@ 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");
log.info("start check folder exist", __dirname, __filename) const childProcess = spawn('node', ['openRenamerBackend/dist/index.js'], {
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

View File

@ -16,7 +16,7 @@
}, },
"build": { "build": {
"productName": "openRenamer", "productName": "openRenamer",
"appId": "openRenamer.app", "appId": "electron.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"

File diff suppressed because it is too large Load Diff

View File

@ -9,8 +9,8 @@
}, },
"dependencies": { "dependencies": {
"@element-plus/icons-vue": "2.0.10", "@element-plus/icons-vue": "2.0.10",
"axios": "1.6.0", "axios": "0.21.1",
"core-js": "3.35.0", "core-js": "3.6.5",
"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",