Added build scripts
This commit is contained in:
parent
13b14c35f9
commit
c35de888fd
3
.gitignore
vendored
3
.gitignore
vendored
@ -63,3 +63,6 @@ typings/
|
|||||||
# IDE
|
# IDE
|
||||||
.vscode
|
.vscode
|
||||||
.idea
|
.idea
|
||||||
|
|
||||||
|
# distribution
|
||||||
|
dist/*
|
||||||
|
BIN
build/64x64.png
Normal file
BIN
build/64x64.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
BIN
build/icon.icns
Normal file
BIN
build/icon.icns
Normal file
Binary file not shown.
BIN
build/icon.ico
Normal file
BIN
build/icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 238 KiB |
1497
build/icon.svg
Executable file
1497
build/icon.svg
Executable file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 52 KiB |
2
index.js
2
index.js
@ -2,6 +2,7 @@ const { app, BrowserWindow, globalShortcut, ipcMain, shell, dialog, Menu} = requ
|
|||||||
const contextMenu = require('electron-context-menu')
|
const contextMenu = require('electron-context-menu')
|
||||||
const WindowStateManager = require('electron-window-state-manager')
|
const WindowStateManager = require('electron-window-state-manager')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
const os = require('os')
|
||||||
|
|
||||||
const PORT = process.env.PORT || '6595'
|
const PORT = process.env.PORT || '6595'
|
||||||
|
|
||||||
@ -24,6 +25,7 @@ function createWindow () {
|
|||||||
y: windowState.y,
|
y: windowState.y,
|
||||||
useContentSize: true,
|
useContentSize: true,
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
|
icon: path.join(__dirname, os.platform() === 'win32' ? 'build/icon.ico' : 'build/64x64.png'),
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
preload: path.join(__dirname, 'preload.js')
|
preload: path.join(__dirname, 'preload.js')
|
||||||
}
|
}
|
||||||
|
45
package.json
45
package.json
@ -7,15 +7,52 @@
|
|||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron . --dev",
|
"start": "electron . --dev",
|
||||||
"pack": "electron-builder --dir",
|
"prebuild": "yarn --cwd ./server build && yarn --cwd ./webui build",
|
||||||
"dist": "electron-builder"
|
"dist": "electron-builder",
|
||||||
|
"dist:dir": "electron-builder --dir"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"electron": "^12.0.9",
|
"electron": "^12.0.9",
|
||||||
"electron-builder": "^22.10.5"
|
"electron-builder": "22.11.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"electron-context-menu": "^3.1.0",
|
"electron-context-menu": "^3.1.0",
|
||||||
"electron-window-state-manager": "^0.3.2"
|
"electron-window-state-manager": "^0.3.2",
|
||||||
|
|
||||||
|
"cookie-parser": "1.4.5",
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"deemix": "^0.0.11",
|
||||||
|
"deezer-js": "^0.0.10",
|
||||||
|
"dotenv": "8.2.0",
|
||||||
|
"express": "4.17.1",
|
||||||
|
"express-session": "^1.17.1",
|
||||||
|
"morgan": "1.10.0",
|
||||||
|
"ramda": "0.27.1",
|
||||||
|
"uuid": "8.3.2",
|
||||||
|
"ws": "7.4.5"
|
||||||
|
},
|
||||||
|
"build": {
|
||||||
|
"appId": "app.deemix.gui",
|
||||||
|
"productName": "deemix-gui",
|
||||||
|
"files": [
|
||||||
|
"index.js",
|
||||||
|
"preload.js",
|
||||||
|
"server/dist/**/*",
|
||||||
|
"webui/public/**/*",
|
||||||
|
"build/**/*",
|
||||||
|
"package.json"
|
||||||
|
],
|
||||||
|
"mac": {
|
||||||
|
"category": "public.app-category.music"
|
||||||
|
},
|
||||||
|
"win": {
|
||||||
|
"target": "portable"
|
||||||
|
},
|
||||||
|
"linux": {
|
||||||
|
"target": "appimage",
|
||||||
|
"artifactName": "deemix-gui_${os}.${ext}",
|
||||||
|
"category": "AudioVideo,Audio",
|
||||||
|
"icon": "build/icon.icns"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user