electron-egg electron-egg
首页
  • v4.x
  • v3.x
  • v2.x
插件
  • v4.x
  • v3.x
demo
支持
知识点
案例
交流
  • GitHub (opens new window)
  • Gitee (opens new window)
首页
  • v4.x
  • v3.x
  • v2.x
插件
  • v4.x
  • v3.x
demo
支持
知识点
案例
交流
  • GitHub (opens new window)
  • Gitee (opens new window)
❤️成为赞助商
  • 快速入门

    • 介绍
    • EE框架是什么?
    • 安装
    • 第三方使用
    • 快速开始
    • 配置

      • 基础
      • 开发
      • 加密
      • 打包
      • 命令
    • 基础功能

    • 生成软件

    • 升级

    • 跨语言支持

    • 更新记录
    • 常见问题
    目录

    打包

    # builder.json

    打包功能使用electron-builder (opens new window)包,更多配置参考官方文档 (opens new window)。

    注意

    electron-egg: v3.4.0 之前版本,打包配置在package.json中。

    {
      // 可执行程序名称(英文)
      // 不要为中文,避免一些未知异常,打包后可修改安装包名称为中文
      "productName": "ee",
      // 软件id
      "appId": "com.electron.ee",
      // 版权标识(换成您自己的)
      "copyright": "© 2023 哆啦好梦 Technology Co., Ltd.",
      // 安装包输出目录
      "directories": {
        "output": "out"
      },
      // asar加密
      "asar": true,
      // 需要打包的文件
      "files": [
        "**/*",
        "!frontend/",
        "!run/",
        "!logs/",
        "!data/"
      ],
      // 额外资源(将from文件夹打进安装包,软件安装后放到to文件夹)
      "extraResources": {
        "from": "build/extraResources/",
        "to": "extraResources"
      },
      // nsis脚本
      "nsis": {
        // 一键安装
        "oneClick": false,
        "allowElevation": true,
        // 允许改变安装目录
        "allowToChangeInstallationDirectory": true,
        // 安装图标
        "installerIcon": "build/icons/icon.ico",
        // 卸载图标
        "uninstallerIcon": "build/icons/icon.ico",
        // 安装时header图标图标
        "installerHeaderIcon": "build/icons/icon.ico",
        // 创建桌面快捷方式
        "createDesktopShortcut": true,
        // 创建开始菜单快捷方式
        "createStartMenuShortcut": true,
        // 桌面快捷方式名称
        "shortcutName": "EE框架"
      },
      // MacOS
      "mac": {
        "icon": "build/icons/icon.icns",
        "artifactName": "${productName}-${os}-${version}-${arch}.${ext}",
        "darkModeSupport": true,
        "hardenedRuntime": false
      },
      // windows
      "win": {
        "icon": "build/icons/icon.ico",
        "artifactName": "${productName}-${os}-${version}-${arch}.${ext}",
        "target": [
          {
            "target": "nsis"
          }
        ]
      },
      // linux
      "linux": {
        "icon": "build/icons/icon.icns",
        "artifactName": "${productName}-${os}-${version}-${arch}.${ext}",
        "target": [
          "deb"
        ],
        "category": "Utility"
      }
    }
    
    上次更新: 2025/06/06, 07:21:49
    加密
    命令

    ← 加密 命令→

    Theme by Vdoing | Copyright © 2023-2025 哆啦好梦 | 京ICP备15041380号-2
    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式
    ×