-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathelectron-builder.config.ts
More file actions
121 lines (119 loc) · 3.73 KB
/
Copy pathelectron-builder.config.ts
File metadata and controls
121 lines (119 loc) · 3.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import type { Configuration } from "electron-builder";
const config: Configuration = {
appId: "top.imsyy.splayer-next",
productName: "SPlayer-Next",
copyright: "Copyright © imsyy 2025",
directories: { buildResources: "public" },
// afterPack: "./scripts/after-pack.ts",
compression: "maximum",
files: [
"public/**",
"out/**",
"!**/.vscode/*",
"!src/**",
"!native/**",
"!scripts/**",
"!electron/**",
"!shared/**",
"!electron.vite.config.{js,ts,mjs,cjs}",
"!electron-builder.config.{js,ts,mjs,cjs}",
"!uno.config.{js,ts,mjs,cjs}",
"!{.eslintcache,eslint.config.mjs,auto-eslint.mjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}",
"!{components.d.ts,auto-imports.d.ts}",
"!{.env,.env.*,.npmrc,pnpm-lock.yaml}",
"!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}",
"!**/*.{d.ts,map,md}",
"!**/{CHANGELOG,LICENSE,license,README,readme}*",
],
// 保留的语言
electronLanguages: ["zh-CN", "en-US"],
asarUnpack: ["public/**"],
extraResources: [
{
from: "native/audio-engine",
to: "native",
filter: ["*.node"],
},
{
from: "native/media-ctrl",
to: "native",
filter: ["*.node"],
},
{
from: "native/taskbar-lyric",
to: "native",
filter: ["*.node"],
},
],
win: {
executableName: "SPlayer-Next",
icon: "public/icons/logo.ico",
artifactName: "${productName}-${version}-${arch}.${ext}",
forceCodeSigning: false,
target: ["nsis", "portable"],
protocols: [{ name: "Orpheus Protocol", schemes: ["orpheus"] }],
},
nsis: {
oneClick: false,
guid: "top.imsyy.splayer-next",
installerIcon: "public/icons/favicon.ico",
uninstallerIcon: "public/icons/favicon.ico",
artifactName: "${productName}-${version}-${arch}-setup.${ext}",
shortcutName: "SPlayer Next",
uninstallDisplayName: "SPlayer Next",
createDesktopShortcut: "always",
allowElevation: true,
allowToChangeInstallationDirectory: true,
license: "build/license.txt",
},
portable: {
artifactName: "${productName}-${version}-${arch}-portable.${ext}",
},
mac: {
executableName: "SPlayer-Next",
icon: "public/icons/icon.icns",
artifactName: "${productName}-${version}-${arch}.${ext}",
identity: null,
hardenedRuntime: false,
notarize: false,
darkModeSupport: true,
category: "public.app-category.music",
entitlementsInherit: "public/entitlements.mac.plist",
extendInfo: {
NSCameraUsageDescription: "Application requests access to the device's camera.",
NSMicrophoneUsageDescription: "Application requests access to the device's microphone.",
NSDocumentsFolderUsageDescription:
"Application requests access to the user's Documents folder.",
NSDownloadsFolderUsageDescription:
"Application requests access to the user's Downloads folder.",
CFBundleURLTypes: [{ CFBundleURLName: "Orpheus Protocol", CFBundleURLSchemes: ["orpheus"] }],
},
target: ["dmg", "zip"],
},
dmg: {
artifactName: "${productName}-${version}-${arch}.${ext}",
},
linux: {
executableName: "SPlayer-Next",
icon: "public/icons/favicon-512x512.png",
artifactName: "${name}-${version}-${arch}.${ext}",
maintainer: "imsyy.top",
category: "Audio;Music;AudioVideo;",
target: ["AppImage", "deb", "rpm", "tar.gz"],
syncDesktopName: true,
desktop: { entry: { MimeType: "x-scheme-handler/orpheus;" } },
},
appImage: {
artifactName: "${name}-${version}-${arch}.${ext}",
},
npmRebuild: false,
electronDownload: {
mirror: "https://npmmirror.com/mirrors/electron/",
},
publish: {
provider: "github",
owner: "SPlayer-Dev",
repo: "SPlayer-Next",
},
};
export default config;