[英]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?
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.