Comments (5)
I think I know what's causing the problem.
from nuitka.
pywebview uses sys.executable
to get the file path of the current program and use the resource icon of that file, but after compiling in nuitka, what you get through sys.executable
is the path of the python interpreter, e.g. C:\Users\ADMINI~1\AppData\ Local\Temp\ONEFIL~1\python.exe
, I modified the pywebview window creation code and I have solved the problem!
- fix
icon_handle = windll.shell32.ExtractIconW(handle, sys.executable, 0)
icon_handle = windll.shell32.ExtractIconW(handle, sys.argv[0], 0)
Maybe it should be tested to see if it's working in a nuitka environment
Has compatibility been considered for this issue, please?
from nuitka.
We try and avoid fork bombs this way, however, however, given your patch, we can make sure to automatically apply it. I do not dare to wrap the windll
, but we can make the source change with our anti-bloat engine no problem.
Can you tell me what module name this is in, then it will be good to go.
from nuitka.
We try and avoid fork bombs this way, however, however, given your patch, we can make sure to automatically apply it. I do not dare to wrap the
windll
, but we can make the source change with our anti-bloat engine no problem.Can you tell me what module name this is in, then it will be good to go.
\site-packages\webview\platforms\winforms.py
On line 203
# Application icon
handle = kernel32.GetModuleHandleW(None)
# icon_handle = windll.shell32.ExtractIconW(handle, sys.executable, 0)
icon_handle = windll.shell32.ExtractIconW(handle, sys.argv[0], 0)
This seems to be just a misunderstanding between Nuitka and pywebview.
XD
from nuitka.
Your patch is in line with the underlying reason of https://nuitka.net/user-documentation/common-issue-solutions.html#onefile-finding-files
I will add it now and you please let me know if it works for you.
Thanks for your report, this is fixed on the factory branch, which is a development version under rapid development. You can try it out by going here: https://nuitka.net/doc/factory.html
Feedback on whether this is working is very welcome. Please do not share plans to do it; only confirm or deny that it is working.
from nuitka.
Related Issues (20)
- opcua generated sources is too large for C compilers HOT 5
- Consider using "default" entry points HOT 5
- Packaging Error with PyOpenGL in Editable Mode HOT 4
- Generate compile_commands.json (Bump scons version to 4.x) HOT 9
- Can I include LGPL code in Nuitka, e.g. PySide6? HOT 4
- Pyqt5 issue: FATAL: pyqt5: Plugin issue while working on 'Plugin initialization failed' HOT 3
- Nuitka might generate unsafe code HOT 26
- Performance question on nuitka code HOT 1
- Suggestion: macOS bundle compliance HOT 4
- Issues with compiling tsai HOT 1
- ModuleNotFoundError: No module named 'imp' in python 3.12 HOT 1
- Creating an exe that uses Flet with a custom icon only changes the binary icon, not the app itself HOT 33
- Nuitka doesn't catch illegal characters in dest paths of data files HOT 2
- Ubuntu 24.04 Python needs to be supported (was Building xonsh shell with python 3.12: scons backend failure) HOT 17
- PySide6: could not load the Qt platform plugin "xcb" in "" even though it was found HOT 17
- Debug compilation fails with `pillow` used by `matplotlib` (`-Werror=unused-but-set-variable`) HOT 4
- PySide6 fails to load shiboken.Shiboken6 with Python3.12 HOT 19
- How to compile absolutely all modules installed? HOT 1
- opencv + python3.12 fails on "ModuleNotFoundError: No module named 'imp'" HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuitka.