среда, 21 сентября 2011 г.

Changing icons in Windows Tcl Starpacks

Created Starpack will have default Tcl icons and you can see them in different view modes of Windows explorer (table, large icons...). This approach is based on http://wiki.tcl.tk/10922 receipt, but is in Makefile target form. And uses tools: reshacker.exeupx.exe and windres.exe from MinGW installation (at $MINGWHOME/bin/windres.exe), also supposes that you are using tclkit.exe as runtime. In my case I have application rfprg and "virtual" FS (catalog) - rfprg.vfs. And I have all these tools in the same catalog (with tclkit.exe). I created there the rfprg.rc file:
APPICONS ICON "rfprg.vfs/tclkit.ico"
TK ICON "rfprg.vfs/tclkit.ico"
Then I added next target into my Makefile:
icons:
	cp tclkit.exe tclkit1.exe
	upx.exe -d tclkit1.exe
	reshacker.exe -delete tclkit1.exe , tclkit2.exe , icongroup,,
	windres.exe -i rfprg.rc -o rfprg.res -J rc -O res -r
	reshacker.exe -add tclkit2.exe , tclkit3.exe , rfprg.res , ,,
	upx.exe tclkit3.exe
	mv tclkit3.exe tclkit.exe
	rm rfprg.res tclkit2.exe tclkit1.exe
And them:
make icons
This will replace "system" icons of tclkit.exe with rfprg.vfs/tclkit.ico. So you can use this "patched" tclkit.exe runtime to create Starpack with your custom icon.

Комментариев нет:

Отправить комментарий

Thanks for your posting!