diff --git a/package.json b/package.json index 3e609d8..5cccb61 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,11 @@ "buildResources": "icons", "output": "build" }, - "files": ["src/**/*", "node_modules/iofs/*", "node_modules/crypto.js/*"], + "files": [ + "src/**/*", + "node_modules/iofs/*", + "node_modules/crypto.js/*" + ], "mac": { "category": "public.app-category.music", "target": "dmg", diff --git a/src/main.js b/src/main.js index aa2edbe..ce63966 100644 --- a/src/main.js +++ b/src/main.js @@ -6,13 +6,7 @@ 'use strict' -const { - app, - BrowserWindow, - session, - protocol, - globalShortcut -} = require('electron') +const { app, session, protocol, globalShortcut } = require('electron') const path = require('path') const fs = require('iofs') const { exec } = require('child_process') diff --git a/src/tools/tray.js b/src/tools/tray.js index 77c8f7a..d04c944 100644 --- a/src/tools/tray.js +++ b/src/tools/tray.js @@ -11,9 +11,7 @@ const path = require('path') const ROOT = __dirname module.exports = function(win) { - app.__TRAY__ = new Tray( - path.resolve(__dirname, '../images/trays/trayTemplate.png') - ) + app.__TRAY__ = new Tray(path.join(ROOT, '../images/trays/trayTemplate.png')) let menuList = Menu.buildFromTemplate([ { label: '显示主窗口',