Can not found the backend any header files
Opened this issue · 15 comments
Hello, I'm new to this project.
When I tried to install the library using vcpkg (both in classic mode and manifest mode), I found that backend related header files were not installed.
I'm wondering if this is a bug, or if it matches the originally expected behavior.
When using imgui, this allows the selection of the corresponding backend via vcpkg features, would rmlui also be able to implement such a convenient feature?
The convenient way of integration like in imgui library will be implemented in future versions of RmlUI. From now it is supposed that user uses files and re-write backend for their own needs as they wish.
It's good to see that the community has plans to work on this feature.
I've done something similar on my own project using vcpkg features to control the backend implementation, which is very user friendly and looking forward to this feature.
Can I ask if this will be part of a major release or will it be released as a patch or fix?
Yeah, right now we don't expose the backends on vcpkg. Could be a nice thing to be able to opt in to, certainly. We don't have any specific plans to implement this, although I mean, vcpkg is all open for anyone to contribute to ;)
I wonder what some good approaches are with this, how does this work with dear imgui? Does it just integrate each selected backend into the main library, or does it export separate libraries for each backend?
Based on my understanding and experience, ImGui packages different backends into the main library through compilation options and installs the header files.
If you want to do this, I personally recommend integrating Vcpkg manifest mode into the project. First, this greatly simplifies the deployment process for developers, and secondly, it helps us organize other dependencies. Of course, this is an optional approach and just my suggestion.
With the manifest mode, dependencies are imported as needed, and for some packages, we may need to provide a custom port (such as rlottie). You can use the existing build options to add VCPKG_MANIFEST_FEATURES, which won’t disrupt the original build process.
e.g.
https://github.com/libsese/sese/blob/ec0fed6480322510ef1ea140ef9e28afb1511a85/CMakeLists.txt#L9
https://github.com/libsese/sese/blob/ec0fed6480322510ef1ea140ef9e28afb1511a85/CMakeLists.txt#L26
I tried packaging rlottie and integrating vcpkg and so far it seems to work out of the box!
This doesn't make any destructive changes, it just adds the vcpkg configuration file.
@SHIINASAMA I mean, with this step, integrating the backend as featues
is totally possible!
Based on my understanding and experience, ImGui packages different backends into the main library through compilation options and installs the header files.
I see, we could do something like this. I wonder if bundling the backends could be done entirely on the vcpkg repository side. But if there is something specific needed on the library side, I'm open to that as well.
Adding a vcpkg manifest would only help in testing and developing the library, I believe. Building it with vcpkg right now is 5 commands listed on the readme, so I don't think it contributes that much. And the downside is that we have to replicate the manifest that now exists in the vcpkg repo.
I would really encourage you to add the rlottie port to the vcpkg repository though! That would be super helpful, one could then add support for RmlUi's lottie plugin too. See e.g. the addition of the SVG plugin which was nicely contributed recently: microsoft/vcpkg#40748
Adding a vcpkg manifest would only help in testing and developing the library, I believe. Building it with vcpkg right now is 5 commands listed on the readme, so I don't think it contributes that much. And the downside is that we have to replicate the manifest that now exists in the vcpkg repo.
Yes, this is only optional, but I had to do it in order to demonstrate the use of packages that were not merged into the vcpkg built-in library.
I would really encourage you to add the rlottie port to the vcpkg repository though! That would be super helpful, one could then add support for RmlUi's lottie plugin too. See e.g. the addition of the SVG plugin which was nicely contributed recently: microsoft/vcpkg#40748
This takes some time, including packaging, licensing, and submitting for review. the rlottie project itself is a bit unique in that it hasn't been released in a long time, with the last version being V2.0, but the ports I've packaged are actually based on the latest commits.
Waiting to be merged...
Oh, that's great! Thanks a lot, appreciate the effort you put in here.
rlottie has been merged microsoft/vcpkg#41890
Awesome, great work!
I just tested installing it through vcpkg, and use it with RmlUi, and it just worked without any extra effort. That's really nice.
I've updated the documentation to reflect this change, and also updated the readme. I guess the next logical step for us is to add the plugin as a feature to RmlUi in the vcpkg repository. And it would also be nice with all the backends.
Looking over the imgui port, I see that they provide an option for each of their backends. And then as I understand it, the user would have to tie them together to actually get a window. The equivalent for us would be to provide an option for each of the renderers and platforms, but not the backends tying them together. I think that makes the most sense for us, as the backends themselves are mainly intended as examples, or starting points.
Yes, this is exactly the effect I hope to achieve: users shouldn't have to deal with complex configurations. After installing with vcpkg, they shouldn't need to worry about environment-related issues.
I learned about this library on Telegram, and I'm pleasantly surprised that I can contribute as well. I look forward to seeing further improvements in this library ❤️.
Thank you, that means a lot! :)