builder

electronuserland/builder Docker Image

electronuserland查看中文加速指南

electron-builder是打包Electron应用的完整解决方案,用于构建跨平台桌面应用程序安装包。

63 次收藏下载次数: 0状态:社区镜像维护者:electronuserland仓库类型:镜像最近更新:15 天前
下载命令
点击查看

electron-builder

A complete solution to package and build a ready for distribution [***] https://proton-native.js.org/ app for macOS, Windows and Linux with “auto update” support out of the box.

See documentation on electron.build.

  • NPM packages management:
    • Native application dependencies compilation (including http://yarnpkg.com/ support).
    • Development dependencies are never included. You don't need to ignore them explicitly.
    • Two package.json structure is supported, but you are not forced to use it even if you have native production dependencies.
  • Code Signing on a CI server or development machine.
  • Auto Update ready application packaging.
  • Numerous target formats:
    • All platforms: 7z, zip, tar.xz, tar.7z, tar.lz, tar.gz, tar.bz2, dir (unpacked directory).
    • macOS: dmg, pkg, mas.
    • Linux: AppImage, snap, debian package (deb), rpm, freebsd, pacman, p5p, apk.
    • Windows: nsis (Installer), nsis-web (Web installer), portable (portable app without installation), AppX (Windows Store), MSI, Squirrel.Windows.
  • Publishing artifacts to GitHub Releases, Amazon S3, DigitalOcean Spaces and Bintray.
  • Advanced building:
    • Pack in a distributable format already packaged app.
    • Separate https://github.com/electron-userland/electron-builder/issues/1102#issuecomment-271845854.
    • Build and publish in parallel, using hard links on CI server to reduce IO and disk space usage.
    • https://github.com/electron/electron-compile support (compile for release-time on the fly on build).
  • Docker images to build Electron app for Linux or Windows on any platform.
  • Proton Native support.
  • Downloads all required tools files on demand automatically (e.g. to code sign windows application, to make AppX), no need to setup.
QuestionAnswer
“I want to configure electron-builder”See options
“I have a question”https://github.com/electron-userland/electron-builder/issues or join the chat
“I found a bug”https://github.com/electron-userland/electron-builder/issues/new
“I want to support development”Donate

Installation

http://yarnpkg.com/ is https://github.com/electron-userland/electron-builder/issues/1147#issuecomment-276284477 recommended instead of npm.

yarn add electron-builder --dev

Quick Setup Guide

https://github.com/electron-userland/electron-webpack-quick-start is a recommended way to create a new Electron application. See Boilerplates.

  1. Specify the standard fields in the application package.json — name, description, version and https://docs.npmjs.com/files/package.json#people-fields-author-contributors.

  2. Specify the build configuration in the package.json as follows:

    json
    "build": {
      "appId": "your.id",
      "mac": {
        "category": "your.app.category.type"
      }
    }
    

    See all options. Option files to indicate which files should be packed in the final application, including the entry file, maybe required.

  3. Add icons.

  4. Add the https://docs.npmjs.com/cli/run-script key to the development package.json:

    json
    "scripts": {
      "pack": "electron-builder --dir",
      "dist": "electron-builder"
    }
    

    Then you can run yarn dist (to package in a distributable format (e.g. dmg, windows installer, deb package)) or yarn pack (only generates the package directory without really packaging it. This is useful for testing purposes).

    To ensure your native dependencies are always matched electron version, simply add script "postinstall": "electron-builder install-app-deps" to your package.json.

  5. If you have native addons of your own that are part of the application (not as a dependency), set nodeGypRebuild to true.

Please note that everything is packaged into an asar archive by default.

For an app that will be shipped to production, you should sign your application. See Where to buy code signing certificates.

Donate

We do this open source work in our free time. If you'd like us to invest more time on it, please donate. *** can be used to increase some issue priority.

***

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 builder 镜像标签

docker pull docker.xuanyuan.run/electronuserland/builder:<标签>

DockerHub 原生拉取命令

docker pull electronuserland/builder:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持99.95% SLA 保障付费会员免广告