1 Star 0 Fork 0

icode / electron-builder

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

electron-builder npm version downloads per month donate

A complete solution to package and build a ready for distribution Electron, Proton Native app for macOS, Windows and Linux with “auto update” support out of the box.

See documentation on electron.build.

  • NPM packages management:
  • 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 build steps.
    • Build and publish in parallel, using hard links on CI server to reduce IO and disk space usage.
    • 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.
Question Answer
“I want to configure electron-builder” See options
“I have a question” Open an issue or join the chat
“I found a bug” Open an issue
“I want to support development” Donate

Real project example — onshape-desktop-shell.

Installation

Yarn is strongly recommended instead of npm.

yarn add electron-builder --dev

Quick Setup Guide

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.jsonname, description, version and author.

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

    "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 scripts key to the development package.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. Donation can be used to increase some issue priority.

Sponsors

WorkFlowy Tidepool

The MIT License (MIT) Copyright (c) 2015 Loopline Systems Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/icodea/electron-builder.git
git@gitee.com:icodea/electron-builder.git
icodea
electron-builder
electron-builder
master

搜索帮助