tim-dlang / dqt

D bindings for the Qt Toolkit
GNU Lesser General Public License v3.0
25 stars 4 forks source link

Make the binding generator public #2

Open LorenDB opened 2 years ago

LorenDB commented 2 years ago

On the announce thread on the D forums, you (@tim-dlang) mentioned that you are using a binding generator that you are keeping closed-source/private. Would it be possible to make this generator public so that others can work on generating some bindings? I personally am hoping to see bindings for the QML side of things, but at this point, every user of this library has to depend on the maintainer to keep the project alive.

tim-dlang commented 2 years ago

I want to eventually release the binding generator, but I want to make some improvements and clean it up first.

LorenDB commented 10 months ago

@tim-dlang hey, any updates? I don't want to see this project die like all the other D Qt bindings have done. If you could make the binding generator public, I'd be happy to do the grunt work of generating and testing wrappers for some parts of Qt.

tim-dlang commented 10 months ago

The binding generator uses a parser generator for parsing C++. I have recently released the parser generator as DParserGen. The example grammar for C++ is mostly the same as used by the binding generator.

The binding generator itself is still not public, but I am working on it directly more again now. There are still many things I want to improve, but I hope to release an initial version soon. The initial release would still need a disclaimer for many limitations.

LorenDB commented 10 months ago

Great to hear! If you think about it, please ping me here when you release it :)

tim-dlang commented 8 months ago

I have uploaded a first version of the converter: https://github.com/tim-dlang/cppconv It is still a work in progress with only minimal documentation and I have only tested it under Linux.

The repository contains the program build.d, which will download the headers for Qt and dependencies and build and run the converter:

git clone https://github.com/tim-dlang/cppconv.git
cd cppconv
dmd -run build.d qt5

The converter is built with dub. The headers for Qt and the dependencies are extracted into the directories projects/*/orig. All headers used for the bindings are included in projects/qt5/allincludes.cpp. The converted source files are then placed in projects/qt5/conv. Not all generated files are needed for the bindings and manual changes are still necessary. The same can be done for Qt 6 with directory projects/qt6.