mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-26 01:07:22 +08:00
✨ feat: 完善mac打包规则 修复 icon显示问题
This commit is contained in:
@@ -14,3 +14,5 @@ package-lock.json
|
|||||||
dist.zip
|
dist.zip
|
||||||
|
|
||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
|
bun.lockb
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ function createWindow() {
|
|||||||
} else {
|
} else {
|
||||||
win.loadURL(`file://${__dirname}/dist/index.html`);
|
win.loadURL(`file://${__dirname}/dist/index.html`);
|
||||||
}
|
}
|
||||||
const image = nativeImage.createFromPath(path.join(__dirname, 'public/icon.png'));
|
const image = nativeImage.createFromPath(path.join(__dirname, 'public/icon_16x16.png')).resize({ width: 16, height: 16 });
|
||||||
const tray = new Tray(image);
|
const tray = new Tray(image);
|
||||||
|
|
||||||
// 创建一个上下文菜单
|
// 创建一个上下文菜单
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"appId": "com.alger.music",
|
||||||
|
"productName": "AlgerMusic",
|
||||||
|
"artifactName": "${productName}_${version}_${arch}.${ext}",
|
||||||
|
"directories": {
|
||||||
|
"output": "dist_electron/mac"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"dist/**/*",
|
||||||
|
"package.json",
|
||||||
|
"app.js",
|
||||||
|
"electron/**/*",
|
||||||
|
"**/*",
|
||||||
|
"public/**/*",
|
||||||
|
"node_modules/**/*"
|
||||||
|
],
|
||||||
|
"mac": {
|
||||||
|
"icon": "public/icon.icns",
|
||||||
|
"target": [
|
||||||
|
{
|
||||||
|
"target": "dmg",
|
||||||
|
"arch": ["x64", "arm64"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"category": "public.app-category.music",
|
||||||
|
"darkModeSupport": true
|
||||||
|
},
|
||||||
|
"dmg": {
|
||||||
|
"title": "${productName} ${version}",
|
||||||
|
"icon": "public/icon.icns",
|
||||||
|
"contents": [
|
||||||
|
{
|
||||||
|
"x": 410,
|
||||||
|
"y": 150,
|
||||||
|
"type": "link",
|
||||||
|
"path": "/Applications"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 130,
|
||||||
|
"y": 150,
|
||||||
|
"type": "file"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"window": {
|
||||||
|
"width": 540,
|
||||||
|
"height": 380
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+2
-1
@@ -12,7 +12,8 @@
|
|||||||
"lint": "eslint --ext .vue,.js,.jsx,.ts,.tsx ./ --max-warnings 0",
|
"lint": "eslint --ext .vue,.js,.jsx,.ts,.tsx ./ --max-warnings 0",
|
||||||
"b:win:x64": "electron-builder --config ./build/win64.json",
|
"b:win:x64": "electron-builder --config ./build/win64.json",
|
||||||
"b:win:x86": "electron-builder --config ./build/win32.json",
|
"b:win:x86": "electron-builder --config ./build/win32.json",
|
||||||
"b:win:arm": "electron-builder --config ./build/winarm64.json"
|
"b:win:arm": "electron-builder --config ./build/winarm64.json",
|
||||||
|
"b:mac": "electron-builder --config ./build/mac.json"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"electron-store": "^8.1.0"
|
"electron-store": "^8.1.0"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 626 B |
Reference in New Issue
Block a user