compuphase / Black-Magic-Probe-Book

A guide plus associated utilities for the Black Magic Probe.
Apache License 2.0
147 stars 26 forks source link

Fix mingw build process #32

Closed SFE-Brudnerd closed 1 year ago

SFE-Brudnerd commented 1 year ago

There were a few things missing in the mingw makefile, as well as missing instructions for generating the .res files without having VS installed.

compuphase commented 1 year ago

Thank for the fix. One note, though:

In Makefile.mingw, line 102: the inclusion of findfont.o in the dependency list for bmserial is another error (by me) in this makefile. The bmserial program does not rely on that. And if you delete that, the note that you added in the readme.md (about needing to install fontconfig) can be dropped. And there is no need to change findfont.c (though it does not hurt either), as findfont.c is irrelevant for the MingW build. (Background info: findfont locates the TTF files for fonts, which the OpenGL-based backends of Nuklear use. However, the Windows builds use the GDI+ backend.)

Can you make this change? Then I will merge. Thanks again.

SFE-Brudnerd commented 1 year ago

Sure thing, I'll work on that this evening. Thanks!

SFE-Brudnerd commented 1 year ago

Hey @compuphase,

Seems you got that updated already. I made one last change to fix findfont, but I think this is ready to go. Thanks for the help!

compuphase commented 1 year ago

I tested with MingW too, and stumbled on most of the same bugs. Plus, one of these was in the makefile for VisualStudio too. I have committed the pull request. Thanks again.

SFE-Brudnerd commented 1 year ago

Happy to help, it's great that you've provided these tools and your helpful book open source. I've learned a lot so I'm happy to be able to contribute back!