On Tuesday, March 19, 2019 at 5:41:04 PM UTC-4, Busirane wrote:
> What I'd like to do now is either:
>
> 1. Build a -bi kit with dynamic Tk instead of static, or
> 2. Build a -dyn kit with additional packages.
I figured out how to #2, and also figured out how to build a Windows wish86 or kbsvq8.6-dyn that actually works without throwing the error "FindResource() failed for buttons bitmap resource, resources in tk_base.rc must be linked into Tk dll or static executable."
To get a -dyn kit with "batteries included", modify sources/kbskit0.4/Makefile.in and add $(MYKITBI) to the last line of the $(KBSVQ_DYN) target; this was line 289 for KBS 0.4.9. If you still want a normal -dyn kit you can also create a whole new target such as $(KBSVQ_DBI), but that requires a little more modification. A -dyn kit built from the modified target will contain all the -bi=".." packages.
Regarding the non-functioning wish86 and kbsvq8.6-dyn, I now know how to get working builds, but I'm not sure what the underlying problem is. The problem is somehow related to the order in which things are built, or possibly to the use of the -r flag. Starting from a clean slate, which for me means nothing but kbs.tcl and sources unpacked from kbs.tgz, I tried building two different ways:
1. Build things incrementally, without using the -r flag. I haven't absolutely verified this yet, but I think the same thing could be done with one command invocation like
tclsh kbs.tcl -vq -bi=".." install tcl8.6 tk8.6 .. vfs1.4 vqtcl4.1 kbskit8.6
where .. represents my "batteries included" packages for the -dyn kit.
2. Build everything at once with one command invocation like
tclsh kbs.tcl -r -vq -bi=".." install kbskit8.6
This is the approach typically found in KBS "getting started" or "how to build" tutorials, but it seems to produce a bad Tk, at least on Windows 10.
The difficulty is that the buildWindowsNT/tk8.6/Makefile generated by these two approaches has one (and only one) difference: The AC_FLAGS for #2 includes -DSTATIC_BUILD=1, where #1 doesn't. That flag causes the resulting wish86 to throw the above error when you do a simple "button .b". You can edit the Makefile to remove the offending flag, and rebuild, and the resulting wish86 works. I don't know enough about configure, or how kbs.tcl works, to know what the underlying problem is. But, I found a workaround (don't use the -r flag) so I'm a happy camper.