Giter Club home page Giter Club logo

Comments (7)

halfrost avatar halfrost commented on May 23, 2024

好吧。。唯独没有在 Win 上面试过,我把 Linux 和 Mac 跑通了以后,就没有试 Win 平台了。因为 electron 的那个配置也是从官网的 Demo 上抄的一份,我觉得不会有问题,至少 Linux 和 Mac 没有问题,Win 应该没有什么问题,没有想到还有 bug。我找一台 Win 的系统看看哈~

from vue-objccn.

jayzch avatar jayzch commented on May 23, 2024

@halfrost 我是在mac上操作的。
mac上编译mac应用 整个目录产生了3g的文件。
mac上编译win也会同样的效果
➜ ~ node -v
v8.2.0
➜ ~ npm -v
5.3.0

from vue-objccn.

halfrost avatar halfrost commented on May 23, 2024

哦哦。。。最终你Mac的应用打包也出现了上面的报错??mac上编译mac应用产生了3G的文件,最终那个app生成出来了么?

from vue-objccn.

jayzch avatar jayzch commented on May 23, 2024

会报错。但有东西出来了。但是往里面走。electron-packager里面,可以一直被点进去,死循环的节奏。里面又包里面自己,自己里面又包含了自己。

https://github.com/pfan123/electron-docs
最后我使用的打包命令如下:

electron-packager --platform= win32,darwin --arch=all --version=0.33.7 --out=dist/ --overwrite --ignore=node_modules/electron-* --ignore=node_modules/.bin --ignore=.git --ignore=dist --prune
: 项目的位置
: 应用名
--platform=: 打包的系统(darwin、win32、linux)
--arch=: 系统位数(ia32、x64)
--icon=: 指定应用的图标(Mac 为 .icns 文件,Windows 为 .ico 或 .png)
--out : 指定输出的目录
--version=: 指定编译的 electron-prebuilt 版本 简单例子
electron-packager . kaoqin --platform=win32 --arch=all --icon=./public/images/icon.ico --version=0.36.4 --out=../dist/ --overwrite=true --ignore=node_modules/electron-* --ignore=node_modules/.bin --ignore=.git --ignore=dist --prune=true
electron-packager
把命令写在package.json的scripts里,比如package命令,则打包时运行:

from vue-objccn.

halfrost avatar halfrost commented on May 23, 2024

哦,好,我一会到家看看哈~谢谢大神的指点!我看看具体哪里有问题。

from vue-objccn.

halfrost avatar halfrost commented on May 23, 2024

问题找到了哈,我本地环境是node v6.11.0,npm v5.0.4,我把三个平台都打包了一遍,都没有问题。然后我换到你的最新版,node v8.2.1,npm v5.3.0,确实出现了你说的循环的问题了。大佬提一个PR给我?毕竟这个问题算是你发现并解决的。

from vue-objccn.

halfrost avatar halfrost commented on May 23, 2024

OK了,谢谢大神发现问题并修复了哈。(我发现最新版的 npm 打包出来,Resources 文件夹里面支持的语言更多了,包体积增大了一点就在 Resources 文件夹里面了。)再次感谢!

from vue-objccn.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.