Windows 上的安卓应用运行器:双击 APK 即装,应用以独立窗口与桌面图标运行,自持 QEMU 运行时
appId: com.apkstart.win
productName: ApkStart
copyright: Copyright © 2026 ApkStart
directories:
output: dist/release
buildResources: build
# 只带运行需要的文件,源码目录整块进包(无 asar:窗口代理要用真实的 .ps1 路径)
asar: false
files:
- src/**/*
- package.json
- LICENSE
- "!**/*.map"
- "!**/node_modules/**"
# 运行时解压 .xz 镜像用(NAPI 预编译,无 ABI 问题)
- "node_modules/@napi-rs/lzma/**"
- "node_modules/@napi-rs/lzma-win32-x64-msvc/**"
- "!node_modules/@napi-rs/lzma/*.md"
- "!node_modules/@napi-rs/lzma/*.ts"
- "!node_modules/@napi-rs/lzma/browser-entry.*"
# 只保留中英文界面语言(Electron locales 从 41MB 降到 ~3MB)
electronLanguages:
- zh-CN
- zh-TW
- en-US
# 完整运行时(emulator + platform-tools + 系统镜像),由 build/prepare-runtime.js 生成。
# 打进包里之后首次启动不再需要任何下载。
extraResources:
- from: build/runtime
to: runtime
filter:
- "**/*"
- "!.prepared"
win:
target:
- target: nsis
arch:
- x64
icon: src/ui/assets/appicon.ico
# 安装到当前用户目录,不写系统盘、不要求管理员权限
requestedExecutionLevel: asInvoker
nsis:
# 不再是「一键装到 C 盘默认目录」:改为标准向导,允许用户选择安装位置
# (装到非系统盘可减轻 C 盘压力;运行时数据目录另在设置里单独指定)。
oneClick: false
perMachine: false
allowToChangeInstallationDirectory: true
displayLanguageSelector: false
# always:即使桌面上已有同名 .lnk 也重建一次。
# 默认的 true 只在「不存在」时才创建,某些机器上(安全软件拦截、桌面被
# OneDrive 重定向、旧版残留了指向已删目录的坏快捷方式)会出现装完没图标,
# 或者图标还指着旧 exe。always 保证每次安装后都指向当前安装目录。
createDesktopShortcut: always
createStartMenuShortcut: true
artifactName: ApkStart-${version}-Setup.exe
# 卸载前先结束仍在运行的运行时进程,避免文件被锁导致无法删除
# (火绒等粉碎工具删不掉,多半是 qemu/adb 进程还驻留)。
include: build/installer.nsh
# 安装包本身已含完整运行时(emulator + 系统镜像 .gz),装完首次启动
# 自动把镜像展开到用户目录,之后不再联网下载任何东西。
# 压缩级别:normal(zlib)。镜像本身已是 xz/gz,NSIS 这层只压 Electron 的 dll,
# normal 与 maximum 体积差别很小,但 maximum(LZMA) 会让打安装包慢十几分钟。
# 注:CI 用 PowerShell 跑 npx 时,行内 -c.compression=xxx 会被拆参、被当成配置文件路径,
# 因此压缩级别统一在这里设置,不在 workflow 里用 -c 行内覆盖。
compression: normal