简体   繁体   English

如果使用 eel python 的用户没有安装 chrome 怎么办

[英]What if user with eel python doesn't have chrome installed

I want to create an offline app with web UI.我想用 web UI 创建一个离线应用程序。 I came to know about eel which is much simple than the Electron where I had to bring this node.js into the play.我开始了解鳗鱼,它比 Electron 简单得多,我不得不把这个 node.js 带入游戏。

But once I create a exe file with PyInstaller the issue for me is that, some users who install the app won't have chrome and eel will open it in edge.但是一旦我使用 PyInstaller 创建了一个 exe 文件,对我来说问题是,一些安装该应用程序的用户将没有 chrome,并且 eel 会在边缘打开它。 But my UI looks worse in edge.但是我的用户界面看起来更糟糕。

So my question is how can I embed chromium in my exe.所以我的问题是如何在我的 exe 中嵌入铬。 so that if the user doesn't have chrome installed it opens up in chrome itself like how electron does the job by having its own chromium included.因此,如果用户没有安装 chrome,它会在 chrome 中打开,就像 electron 通过包含自己的铬来完成这项工作一样。

Any method is acceptable as I dont care for the size of the exe.任何方法都是可以接受的,因为我不关心 exe 的大小。 Also is there someway that I can make the eel window non resizable, ie always have a fixed width and height only without the option of user to drag and resize or maximise the window?还有什么方法可以使鳗鱼 window 不可调整大小,即始终只有固定的宽度和高度,而无需用户选择拖动和调整大小或最大化 window?

This is slightly harder given that the.exe the program is and not a install wizard.鉴于该程序是 .exe 而不是安装向导,这稍微难一些。 The easiest and cleanest way is a chrome check in you application Example .最简单和最干净的方法是在您的应用程序示例中进行 chrome 检查。 You will let the user know to install it.您将让用户知道安装它。

I had the same issue and after googling for a while i got this: https://github.com/ChrisKnott/Eel/issues/287 Basically you get a portable web browser and put its executable on your app folder then create a mode for it.我有同样的问题,谷歌搜索了一段时间后我得到了这个: https://github.com/ChrisKnott/Eel/issues/287基本上你得到一个便携式 web 浏览器并将其可执行文件放在你的应用程序文件夹中,然后创建一个模式它。 then you use this new mode ie:然后你使用这个新模式,即:

eel.start('index.html', mode='my_portable_chromium', 
                        host='localhost', 
                        port=27000, 
                        block=True )  

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python Eel 无法安装 - Python Eel cant be installed 为什么uwsgi找不到用--user安装的python包? - Why doesn't uwsgi find python packages installed with --user? Python-Selenium Chrome Webdriver没有像WidevineCDM这样的组件 - Python - Selenium Chrome webdriver doesn't have components like WidevineCDM Python和Node Js(如果客户端没有python怎么办) - Python and Node Js (what to do if the client doesn't have python) 打包可以在未安装Python的计算机上运行的Python脚本? - Packaging a Python script that can be run on a computer that doesn't have Python installed? 我可以在未安装python的Windows 7计算机上以Sublime Text 2运行Python吗? - Can I run Python in Sublime Text 2 on a Windows 7 machine that doesn't have python installed? 将可用的python程序分发给未安装Distribute的python? - distribute a usable python program to a python which doesn't have Distribute installed? keras 已安装但没有后续功能 - keras installed but doesn't have subsequent functions 在 python 中,有没有办法向没有安装 python 的人展示 CLI 应用程序 - in python is there a way to show CLI app to someone who doesn’t have python installed 如何在用户系统的任何可用浏览器中启动python Eel? - How to start python Eel in any available browser of user system?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM