增加打包配置
parent
e4b6479da5
commit
1aa8edb82e
|
@ -7,6 +7,9 @@
|
||||||
.Trashes
|
.Trashes
|
||||||
|
|
||||||
|
|
||||||
|
build
|
||||||
|
build/**
|
||||||
|
|
||||||
node_modules
|
node_modules
|
||||||
node_modules/**
|
node_modules/**
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
52
package.json
52
package.json
|
@ -1,18 +1,60 @@
|
||||||
{
|
{
|
||||||
"name": "sonist",
|
"name": "Sonist",
|
||||||
"version": "0.1.0",
|
"version": "0.9.0",
|
||||||
"description": "Music Player",
|
"description": "Music Player",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron ."
|
"start": "electron .",
|
||||||
|
"pack": "electron-builder"
|
||||||
},
|
},
|
||||||
"author": "yutent",
|
"author": "yutent",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"crypto.js": "^1.1.6",
|
"crypto.js": "^1.2.0",
|
||||||
"iofs": "^1.1.0"
|
"iofs": "^1.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"electron": "^4.0.0"
|
"electron": "^4.0.0",
|
||||||
|
"electron-builder": "^20.38.5"
|
||||||
|
},
|
||||||
|
"build": {
|
||||||
|
"appId": "cc.doui.sonist",
|
||||||
|
"productName": "Sonist",
|
||||||
|
"copyright": "Copyright © year ${author}",
|
||||||
|
"directories": {
|
||||||
|
"output": "build"
|
||||||
|
},
|
||||||
|
"files": ["src/**/*", "node_modules/iofs/*", "node_modules/crypto.js/*"],
|
||||||
|
"mac": {
|
||||||
|
"category": "public.app-category.music",
|
||||||
|
"target": "dmg",
|
||||||
|
"icon": "icons/app.icns"
|
||||||
|
},
|
||||||
|
"linux": {
|
||||||
|
"category": "AudioVideo;Audio;Player;Music",
|
||||||
|
"target": [
|
||||||
|
{
|
||||||
|
"target": "deb",
|
||||||
|
"arch": "x64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"target": "AppImage",
|
||||||
|
"arch": "x64"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "icons/app.png"
|
||||||
|
},
|
||||||
|
"deb": {
|
||||||
|
"depends": [
|
||||||
|
"gconf2",
|
||||||
|
"gconf-service",
|
||||||
|
"libnotify4",
|
||||||
|
"libappindicator1",
|
||||||
|
"libxtst6",
|
||||||
|
"libnss3",
|
||||||
|
"ffprobe",
|
||||||
|
"ffmpeg"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ function createWindow() {
|
||||||
height: 640,
|
height: 640,
|
||||||
frame: false,
|
frame: false,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
icon: './src/images/app.png',
|
icon: path.resolve(ROOT, './images/app.png'),
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
webSecurity: false,
|
webSecurity: false,
|
||||||
experimentalFeatures: true
|
experimentalFeatures: true
|
||||||
|
@ -88,7 +88,7 @@ app.on('ready', () => {
|
||||||
cb({ data: buf, mimeType: MIME_TYPES[ext] })
|
cb({ data: buf, mimeType: MIME_TYPES[ext] })
|
||||||
})
|
})
|
||||||
|
|
||||||
tray = new Tray('./src/images/trays/trayTemplate.png')
|
tray = new Tray(path.resolve(ROOT, './images/trays/trayTemplate.png'))
|
||||||
|
|
||||||
tray.on('click', _ => {
|
tray.on('click', _ => {
|
||||||
win.show()
|
win.show()
|
||||||
|
|
Reference in New Issue