Im trying to write a program with tkinter that shows a custom cursor in some context.
In code I did main['cursor'] = "@cursor.cur"
and this works as expect when running the script or when running the executable packed with pyinstaller. But when --onefile
is checked in pyinstaller, running the executable outputs _tkinter.TclError: bad cursor spec "@cursor.cur"
, so most likely pyinstaller didn't put the .cur file where tkinter expects it.
So my question is how to include custom tkinter cursor when bundling with pyinstaller --onefile, and also what is the purpose of '@' in main['cursor'] = "@cursor.cur"
?
Edit: I've already added ('cursor.cur', '.')
in the spec file, how do I use the .cur from _MEIPASS?