1 Star 0 Fork 2

gwt805 / electron-to-build

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

已有功能

  • 点击关闭 直接 缩小至托盘
  • 托盘菜单:退出,显示
  • 网络断开/连接 后 消息通知
  • 打开开发者工具: Ctrl + Shift + I
  • 刷新: F5

环境

"electron": "^23.1.2",
"electron-builder": "^23.6.0",
"qiao-is-online": "^1.0.6"
"electron-localshortcut": "^3.2.1",

注意事项

  • 每次打包的时候都需要删除前一次的 Cache

    • Windows
      • 删除 C:\Users\xx\AppData\Local\electron-builder\Cache\ 下的所有内容
      • 删除 C:\Users\gs\AppData\Local\electron\Cache\ 下的所有内容
    • Linux
      • 删除 ~/.cache/electron/*
      • 删除 ~/.cache/electron-builder/*
  • 每次 打包时,都需要清空 dist文件夹里的内容,或者直接删除 dist 文件夹

  • 各平台打包 icon

    • Winodws MacOS Linux
      .ico .icns .png
  • 特别注意的是 各个平台的 icon/icns/png 都必须是 256x256 像素

  • main.js

    • 修改 URL 参数; 即服务访问地址

    • 修改 Tip_Tit 参数; 即鼠表放在任务栏图标上的提示,需和 packag.json 中的 description 内容一致

  • package.json

    • name: 即 APP 的名字

    • build 中 的 productName 也是 APP 的 名字

    • description: 即 打包后鼠标放在任务栏图标上显示的文字

    • 打包时,需要将 dependencies 中的内容清空, 仅保留 qiao-is-onlineelectron-localshortcut

    • Linux 打包时,需要对 author 中gwt 后面添加 邮箱:Inc xxx@xx.com

    • windows 打包时,author 中 只保留 gwt 即可,另 author 和 build 中的appID 的 com.example.xx xx 同名

打包教程

MIT License Copyright (c) 2023 卫龙 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.

简介

Electron 打包 exe安装程序,zip,deb,AppImage 教程 展开 收起
TypeScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
TypeScript
1
https://gitee.com/gwt805/electron-to-build.git
git@gitee.com:gwt805/electron-to-build.git
gwt805
electron-to-build
electron-to-build
main

搜索帮助