-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split imgui backends into separate packages #2
Split imgui backends into separate packages #2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A first pass of review:
- I didn't try to use/build these packages yet, will do so soon.
- I have no understanding on the objective-c issues so didn't comment on these parts.
- Beware of the end-of-files (with red markers), you probably want to fix that to avoid issues with some tools.
I cloned and built successfully the example package locally on Windows 11 + msvc (2022 preview), I tried all the current examples (knowing that some are missing) and they all work as expected. Good job! I'll also try on linux tomorrow. |
I also tried to create a new project and depend on this repo's packages, but it fails at initialization:
This is reproducible by just This will probably be fixed once you remove Using Then it leads to linknig errors (when using the code copy pasted from Here is the app in case you want to test (it's quick to reproduce but it's handy to keep it around in a repo): https://github.com/Klaim/build2-test-usage-imgui |
@boris-kolpackov Concering the lib prefix of the examples package: True, I was wondering what would be the correct variant. Since the examples package actually contains examples for the |
@boris-kolpackov Thanks for fixing the I think I will leave the mingw support for a follow-up PR, as I can't get it to work straight away and mingw is also not really my priority, right now. @Klaim I added config files as you suggested (without the common config file for now). However the options are not applied during build time. For example when I use
When I use |
Weird, I dont remember ever seeing this. I'll take a look ASAP. |
I managed to reproduce the warning, you used:
In that example you did not specify the kind of build configuration, which should be
Works for me without the warning. BTW I would have preferred the compiler name set in the config files too, so that the user only have to specify the option file (and the CI only need to use the right file). Also, for msvc debug you need the
However if you have a reason to keep the compiler name given by the CI, then nevermind. In that project using SFML I setup the CI to use these files so I think it should work. Other than that I just tried with msvc debug and release and it initializes without warnings and builds some examples as expected. Same for init with g++ on linux/ubuntu (I couldnt build because of missing X11 dependencies or something like that) |
The better way to load extra configuration files is with the
|
The |
@Klaim I added the compiler specification to the options files.
Nevertheless, I think this PR might (finally) be nearing its end. One last question: |
I think for the repository itself using upstream name is a good idea, especially if it contains (or may contain in the future) non-library packages.
This mechanism expects a real configuration file (like
|
@Rookfighter BTW, what is the status of CI (as submitted with |
@boris-kolpackov Thanks, I switched to using Here' a |
Hi @Rookfighter awesome job with the PR. Tested on:
|
Yes, that's pretty accurate. A glue
No, |
Thanks! So there are 792 builds of which 554 are failures. Looking at the first few it's clear the cause of most of the failures is an attempt to build on platforms that do not apply (like building |
Would it makes sense to add compilation conditions at the package level?
The idea is to disable building the library itself. So even if |
To me this looks like trying to fix the issue in the wrong place. The correct place is to not |
In some of my multi-package projects I ended up with a
(assuming git-bash on windows) I'm not saying to do this here, just stating my experience. I wonder if it could made easier by some future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rookfighter I suggest addition of builds
clause for packages that don't build on all platforms.
|
||
depends: * build2 >= 0.15.0- | ||
depends: * bpkg >= 0.15.0- | ||
depends: libimgui == $ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depends: libimgui == $ | |
depends: libimgui == $ | |
builds: &( +windows -gcc ) |
|
||
depends: * build2 >= 0.15.0- | ||
depends: * bpkg >= 0.15.0- | ||
depends: libimgui == $ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depends: libimgui == $ | |
depends: libimgui == $ | |
builds: &( +macos -gcc ) |
|
||
depends: * build2 >= 0.15.0- | ||
depends: * bpkg >= 0.15.0- | ||
depends: libimgui == $ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depends: libimgui == $ | |
depends: libimgui == $ | |
builds: &( +windows -gcc ) |
|
||
depends: * build2 >= 0.15.0- | ||
depends: * bpkg >= 0.15.0- | ||
depends: libimgui == $ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depends: libimgui == $ | |
depends: libimgui == $ | |
builds: &( +windows -gcc ) |
|
||
depends: * build2 >= 0.15.0- | ||
depends: * bpkg >= 0.15.0- | ||
depends: libimgui == $ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depends: libimgui == $ | |
depends: libimgui == $ | |
builds: &( +windows -gcc ) |
|
||
depends: * build2 >= 0.15.0- | ||
depends: * bpkg >= 0.15.0- | ||
depends: libimgui == $ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depends: libimgui == $ | |
depends: libimgui == $ | |
builds: &( +windows -gcc ) |
|
||
depends: * build2 >= 0.15.0- | ||
depends: * bpkg >= 0.15.0- | ||
depends: libimgui == $ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depends: libimgui == $ | |
depends: libimgui == $ | |
builds: &( +macos -gcc ) |
Hi everybody,
I finally managed to finish a first draft for splitting the backends of imgui. Basically I created one build2 package per backend. Each package is postfixed by its backend-type (either
render
orplatform
) and the implementation which it is based on, e.g.metal
oropengl
.A few general notes:
cxx.target.class
imconfig.h
file toimgui-core
and edit it to make dynamic libraries work on windowsimconfig.h
just contains outcommented code and is supposed to be edited by imgui-usersFeedback and suggestions are welcome
Disclaimer: As of this writing the latest CI build on GitHub is still in progress. If it is broken I will fix it ASAP, but I opened the PR already to give you a chance to comment on what I have done so far.