MitsuKage
MitsuKage

Reputation: 11

How to make the exe file created by Nuitka contain icons for tkinter?

Can you please tell me, if it is possible to make an exe file with nuitka that will contain tkinter window icons? I want the exe file to run on another computer so that the program does not show an error if there are no icons in the location of the exe file. Please, tell me how this can be?

Here my settings:

nuitka --follow-imports --standalone --jobs=4 --onefile --enable-plugin=tk-inter --mingw64 --windows-console-mode=disable --include-data-dir=C:/Icon/=data/Icon --windows-icon-from-ico=C:/Icon/large_icon.png Graph.py

And part of code:

large_icon=tk.PhotoImage(file='large_icon.png')
small_icon=tk.PhotoImage(file='small_icon.png')
self.root.iconphoto(False, small_icon, large_icon)

I also tried with --include-data-files=C:/Icon/large_icon.png=large_icon.png but the exe file still asked for the images to be located in the same place as it was.

Upvotes: 1

Views: 71

Answers (0)

Related Questions