I am using TclApp to wrap my program and all of its files in a stand-alone executable - and it's working fine for 99% of the files. However, it doesn't seem to be wrapping or recognizing my .ico file...
I am writing a program in Tcl/Tk and I am trying to set the main window icon in the top left like this:
wm iconbitmap .main myIcon.ico
wm iconbitmap .main -default myIcon.ico
After wrapping the program, it will only ruin correctly with the icon if the .exe file is in the same directory as the .ico file - not anywhere else. This is contrary to the whole purpose of wrapping a Tcl program with TclApp in the first place. What should occur is TclApp wrapping the .ico file in with the .tcl file in its Virtual File System, so that no matter where my .exe file is located, it should be able to locate the icon.
I have tried specifying the path more explicitly with:
set icon_home [file dirname [info script]];
wm iconbitmap .main [file join $icon_home myIcon.ico]
wm iconbitmap .main -default [file join $icon_home myIcon.ico]
No luck there...
The error I get then is:
Error Code: TK LOOKUP BITMAP myIcon.ico
bitmap "myIcon.ico" not defined
while executing...
So the two issues I have with this: I read on many blogs and posts on the internet that Tcl/Tk may have some kind of a bug with bitmaps, or something tends to go wrong - no one elaborated. The other problem is that TclApp should be wrapping the icon in with the tcl script so that running my program from anywhere should work just as if it were in the same directory as the .ico file, but it isn't...
So where am I going wrong? Is there something wrong with the Tcl code, is there really a bug with bitmap in Tcl/Tk, or is TclApp not working properly??