appId: com.freesun.app productName: FlexometerSetup directories: buildResources: build output: dist files: - '!**/.vscode/*' - '!src/*' - '!electron.vite.config.{js,ts,mjs,cjs}' - '!{.eslintcache,eslint.config.mjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}' - '!{.env,.env.*,.npmrc,pnpm-lock.yaml}' # 更全面的文件排除优化 - '!**/*.{md,txt,map,ts,tsx}' - '!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme,LICENSE,LICENCE}' - '!**/node_modules/*/{test,__tests__,tests,spec,specs,example,examples,demo,demos}' - '!**/node_modules/*/{docs,doc,documentation}' - '!**/node_modules/*/{coverage,nyc_output}' - '!**/node_modules/*.d.ts' - '!**/node_modules/.bin' - '!**/node_modules/*/{tsconfig.json,tslint.json,eslint*}' - '!**/node_modules/*/test/**' - '!**/node_modules/*/tests/**' - '!**/node_modules/*/spec/**' - '!**/node_modules/*/examples/**' - '!**/node_modules/*/example/**' - '!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes,.gitmodules}' - '!**/{thumbs.db,.flowconfig,.idea,.vs,.nyc_output,.coverage}' - '!**/{appveyor.yml,.travis.yml,circle.yml,azure-pipelines.yml,.github}' - '!**/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json,yarn-error.log}' - '!**/{*.orig,*.rej,*.bak,*.tmp,*.swp,*~}' - '!**/webpack.config.js' - '!**/rollup.config.js' - '!**/jest.config.js' - '!**/babel.config.js' # 启用最大压缩 compression: maximum # 启用 asar 打包 asar: true # 只在 Windows 平台构建时包含 extraResources extraResources: - from: resources/adbSDK to: adbSDK filter: - '**/*' win: executableName: FlexometerSetup target: - target: nsis arch: - x64 # 只构建64位版本 nsis: oneClick: false allowToChangeInstallationDirectory: true artifactName: ${name}-${version}-setup.${ext} shortcutName: ${productName} uninstallDisplayName: ${productName} createDesktopShortcut: always # 使用 zip 压缩而不是默认的 7z(更快的安装) useZip: true # 移除了无效的 removeDefaultUninstallProgramMenu 属性 # 使用有效的属性 removeDefaultUninstallWelcomePage: true npmRebuild: false publish: provider: generic url: https://gitee.com/bocinpity/flexometer-setup/releases/download/latest electronDownload: mirror: https://npmmirror.com/mirrors/electron/