-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
尝试 Electron Builder #129
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
昨天尝试了下 Electron Forge,今天尝试下 Electron Builder。
第一次尝试选择 Forge 有两个原因:
然后这次尝试了下 Electron Builder,我发现我被它文档里复杂的 Configuration 给骗了,虽然它文档看起来复杂,但是使用起来是真的简单……
给现有的 Electron 项目集成 electron builder 只需要一句命令:
npx electron-builder
对的,只需要这一句命令就可以了——无需任何配置,这一条命令就能在我的 Apple M1 上打包好 arm64 的 dmg 命令,是真正意义上的零配置。
而且,它输出的日志也很有用,会提醒我 description / author 没有声明、没有找到 apple 账户所以无法给应用签名,甚至下载 electron 二进制文件的时候会使用我在 .npmrc 里定义的镜像地址。
真的太好用了 😂
要同时打包 arm64 和 x64 的 dmg 包,加如下配置文件即可:
electron-builder.yml
也不会遇到 electron forge 上奇奇怪怪的问题,一次就能成功。
一些注意事项:
electron-builder --dir
的时候)我想看一下哪些文件被打包进去了,这时候就需要避免使用 aserThe text was updated successfully, but these errors were encountered: