105 lines
2.8 KiB
YAML
105 lines
2.8 KiB
YAML
appId: cc.tokendun.codexmarket
|
||
productName: TD工具箱
|
||
copyright: Copyright © 2026 Tokendun
|
||
|
||
directories:
|
||
output: dist
|
||
buildResources: build
|
||
|
||
# 无 Apple 证书时,electron-builder 会跳过签名、留下残缺封印;
|
||
# 此钩子在打 DMG 前对 mac app 做完整 ad-hoc 重签名,修复封印。
|
||
afterPack: scripts/afterPack.js
|
||
|
||
# 只打包运行必需的文件(源码 + 运行时依赖)
|
||
files:
|
||
- electron/**/*
|
||
- renderer/**/*
|
||
- build/icon.png
|
||
- build/icon.ico
|
||
- build/icon.icns
|
||
- package.json
|
||
- "!**/*.map"
|
||
|
||
# isomorphic-git 是纯 JS,无需解包 asar;保持默认 asar 打包即可
|
||
asar: true
|
||
# sql.js 的 wasm 需从 asar 解出,保证运行时可读取
|
||
asarUnpack:
|
||
- "node_modules/sql.js/**"
|
||
|
||
mac:
|
||
# 内置 sing-box 引擎(全局代理用)——按架构只打对应的一份
|
||
extraResources:
|
||
- from: "resources/singbox/darwin-${arch}"
|
||
to: "singbox/darwin-${arch}"
|
||
category: public.app-category.developer-tools
|
||
icon: build/icon.icns
|
||
# —— 未购买 Apple Developer 账号 ——
|
||
# 不设 identity:electron-builder 在无证书环境自动做 ad-hoc 签名,
|
||
# 会对 app 及内置 sing-box 完整重新封印(seal),保证用户去掉隔离标记后能稳定运行。
|
||
# 切勿设 identity: null——那会完全跳过签名、破坏 bundle 封印。
|
||
notarize: false
|
||
target:
|
||
- target: dmg
|
||
arch:
|
||
- x64
|
||
- arm64
|
||
# zip 供 Mac 自动更新使用(dmg 无法自动更新)
|
||
- target: zip
|
||
arch:
|
||
- x64
|
||
- arm64
|
||
# 纯英文文件名,保证自动更新下载可靠
|
||
artifactName: "CodexMarket-${version}-${arch}.${ext}"
|
||
|
||
dmg:
|
||
title: "${productName}-${arch}"
|
||
# 加大窗口,容纳「修复已损坏」脚本
|
||
window:
|
||
width: 540
|
||
height: 420
|
||
contents:
|
||
# app 图标(左)
|
||
- x: 140
|
||
y: 170
|
||
type: file
|
||
# 「应用程序」快捷方式(右)
|
||
- x: 400
|
||
y: 170
|
||
type: link
|
||
path: /Applications
|
||
# 一键修复「已损坏」脚本(下方居中)——双击运行去除隔离标记
|
||
- x: 270
|
||
y: 320
|
||
type: file
|
||
path: build/fix-quarantine.command
|
||
|
||
win:
|
||
# 内置 sing-box 引擎(全局代理用)
|
||
extraResources:
|
||
- from: "resources/singbox/windows-${arch}"
|
||
to: "singbox/windows-${arch}"
|
||
icon: build/icon.ico
|
||
target:
|
||
- target: nsis
|
||
arch:
|
||
- x64
|
||
artifactName: "CodexMarket-${version}-Setup.${ext}"
|
||
|
||
nsis:
|
||
oneClick: false
|
||
perMachine: false
|
||
allowToChangeInstallationDirectory: true
|
||
createDesktopShortcut: true
|
||
createStartMenuShortcut: true
|
||
|
||
linux:
|
||
icon: build/icon.png
|
||
category: Development
|
||
target:
|
||
- AppImage
|
||
|
||
# 在线更新:发布到 GitHub Releases(公开仓库,客户端免密钥拉取更新)
|
||
publish:
|
||
provider: generic
|
||
url: https://up.tokendun.cc/backup-bot/backup/releases/download/latest
|