本文介绍了如何将git与电子应用捆绑在一起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在为客户开发一个电子应用程序,他们需要一种简单的方式来更新应用程序,因为我正在处理它。我发现最简单的方法就是包含从git仓库中提取的支持,这在我的测试和客户端机器上运行良好。
最近,他们试图在没有安装git的新Mac上安装应用程序。这位不懂技术的客户在安装git方面遇到了很多麻烦,我花了一段时间来让他们通过下载安装程序,点击它,运行它等等。为了避免将来出现这种情况,我想在我的电子应用程序中捆绑git并使用本地副本。这可能/可行/理想吗?有没有其他的方法可以解决这个问题?解析方案
我推荐你构建安装程序而不是你的git解决方案。电子支持(windows / mac)和为您创建安装程序(启用autoUpdates)。这应该是不那么痛苦和更稳定。
然后,如果你仍然需要捆绑与你的应用程序第三方的东西,请参阅以及其他解答。
如果你提供了更多的细节,我可以给你一个定制的答案(操作系统,私人应用程序只为你的客户?,...)。
I am developing an electron application for a client and they need an easy way to update the app as I work on it. I have found that the easiest way is to just include support for pulling from a git repo and this works fine in my tests and on the clients' machine.
Recently, they tried to install the app on a new mac that does not have git installed. The client, who is not tech savvy, is having a lot of trouble installing git and it took me a while to walk them through downloading the installer, clicking on it, running it etc. To avoid this in the future, I'd like to just bundle git in my electron application and use a local copy. Is this possible/doable/desirable? Are there any other good ways to approach this problem?
解决方案
I'd recommend you to build installers instead of your git solution. electron has support for automatic updates (windows/mac) and electron-builder creates installers for you (with autoUpdates enabled). This should be way less painful and more stable.
Then, if you still need to bundle 3rd party stuff w/ your app see How to bundle a third party binary with Electron? and other answers on SO.
If you provided some more details I could give you a tailored answer (OS, private app just for your client?, ...).
这篇关于如何将git与电子应用捆绑在一起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!