Git Product home page Git Product logo

Comments (5)

Qikm avatar Qikm commented on July 20, 2024

I think I know what's causing the problem.

from nuitka.

Qikm avatar Qikm commented on July 20, 2024

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.

kayhayen avatar kayhayen commented on July 20, 2024

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.

Qikm avatar Qikm commented on July 20, 2024

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.

kayhayen avatar kayhayen commented on July 20, 2024

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)

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.