Skip to content

Conversation

fgallegosalido
Copy link
Contributor

Description

Basically updating to the new version og ImGui-SFML:

  • Bump imgui-sfml version to 2.2.
  • Using last version of Dear ImGui (v1.81).
  • Added the option imgui_demo, so the user can decide to build the demo for Dear ImGui.

Related Issue

Motivation and Context

The new version of ImGui-SFML comes with a few changes that are necessary to keep up-to-date with Dear ImGui and also fixes some bugs.

How Has This Been Tested?

OS: Ubuntu 16.04 LTS
Conan version: 1.33.1
Python version: 3.8.3
CMake version: 3.19.5
Hooks: conan-center

@Croydon
Copy link
Member

Croydon commented Mar 4, 2021

Several configurations failed. Can you have a look?

@fgallegosalido
Copy link
Contributor Author

fgallegosalido commented Mar 4, 2021

Mmm weird. Only the debug builds for version 2.2 are failing. I'm gonna pin @eliasdaler just in case

@eliasdaler
Copy link

eliasdaler commented Mar 4, 2021

It fails here for Debug Shared (Debug Static is ok) builds:

2021-03-04T15:57:32.1507249Z [100%] Linking CXX shared library ../lib/libImGui-SFML_d.so
2021-03-04T15:57:32.1870741Z /usr/bin/ld: cannot find -lsfml-graphics
2021-03-04T15:57:32.1872538Z /usr/bin/ld: cannot find -lsfml-system
2021-03-04T15:57:32.1873859Z /usr/bin/ld: cannot find -lsfml-window

Pretty strange.

Maybe adding DEBUG_POSTFIX broke something. It was only applied for shared libs for some reason.

Can you temporarily point Conan to this commit? SFML/imgui-sfml@f35da32

  1. Try it as-is and see if CI passes. It can potentially break more stuff (now only debug shared libs are broken), but it'll be good to investigate WHY it happens, because I don't see why adding a debug postfix leads to SFML libs not being found.
  2. If it still fails, try to set IMGUI_SFML_DEBUG_POSTFIX to an empty string

@fgallegosalido
Copy link
Contributor Author

fgallegosalido commented Mar 7, 2021

Okay, I'm adding a version that points to the specific commit and remove the 2.2 version. Let's see what happens

@eliasdaler
Copy link

The CI still ran with 2.2, looks like

@fgallegosalido
Copy link
Contributor Author

And if I change the sources under the 2.2 version (using the ones in the commit instead of the 2.2 ones), the recipe fails to be created. I'm not sure how to test your specific commit. Maybe with a patch file?

@eliasdaler
Copy link

Yeah, patch file should work

@Croydon
Copy link
Member

Croydon commented Mar 9, 2021

And if I change the sources under the 2.2 version (using the ones in the commit instead of the 2.2 ones), the recipe fails to be created

Have you changed the URL in conandata.yml and changed the source() method in conanfile.py to successfully extract from the new top-level directory within the download?

@fgallegosalido
Copy link
Contributor Author

Have you changed the URL in conandata.yml and changed the source() method in conanfile.py to successfully extract from the new top-level directory within the download?

I actually tried changing the URL to the specific commit in the conandata.yml, but with no luck. I then looked into the source() function, but I couldn't figure it out neither after trying changing the call to tools.get().

It seems that, the way it's done, it doesn't like when the version number doesn't appear in the URL. Maybe there's something I'm not considering, or at least there should be a workaround for it.

@Croydon
Copy link
Member

Croydon commented Mar 17, 2021

This should allow to test the commit in CI

a04d9ca

@fgallegosalido
Copy link
Contributor Author

It seems the CI is still broken with that specific commit @eliasdaler

@eliasdaler
Copy link

I'm not sure it's a problem of ImGui-SFML's CMake... Can you reproduce it locally? It's pretty strange that CMake is not able to find SFML's libs - maybe SFML Conan recipe is not functioning correctly?

@fgallegosalido
Copy link
Contributor Author

I'm lately running a little bit out of time, so if you feel like closing this PR to further investigate what's going on, please do it so.

@ChristianIvicevic
Copy link

Are there any plans for looking into this? I am eager to update to newer versions of imgui and the SFML binding, especially for some bugfixes.

@fgallegosalido
Copy link
Contributor Author

Are there any plans for looking into this? I am eager to update to newer versions of imgui and the SFML binding, especially for some bugfixes.

I guess, but now it has to target 2.3. Also, as I said, I don't have much time to look into this, and the CI keeps failing for some reason in Debug builds for the latest version. As soon as that is fixed, this should be easy to merge.

@ericLemanissier
Copy link
Contributor

retrigger CI

@ericLemanissier ericLemanissier mentioned this pull request Jul 20, 2021
Copy link
Contributor

@ericLemanissier ericLemanissier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully we should be good to go once this is removed !

@fgallegosalido
Copy link
Contributor Author

2.3 came out some time ago, so maybe we should add it too

@ericLemanissier
Copy link
Contributor

Don't hesitate to do so. Also, don't forget to add the patch in config.yml (the same patch as 2.2 should work, because there was no change on this part of the CMakeLists, nor in line numbers)

@ericLemanissier
Copy link
Contributor

2.3 builds fail because of ocornut/imgui#4171. It seems the only way to solve this is to set cmake option IMGUI_SFML_IMGUI_DEMO=True, or wait until the next release

@fgallegosalido
Copy link
Contributor Author

2.3 builds fail because of ocornut/imgui#4171. It seems the only way to solve this is to set cmake option IMGUI_SFML_IMGUI_DEMO=True, or wait until the next release

At this point, it seems easier to just wait until the next release, as Dear ImGui tends to release every 2 months or so (unless it is a big release, like 1.80 was)

@CroydonBot CroydonBot merged commit 69235f2 into bincrafters:main Jul 31, 2021
@fgallegosalido
Copy link
Contributor Author

I was on vacation and completely missed your delete suggestions. I think this is the best move until we can add ImGui-SFML 2.3. Thanks for the work!

@fgallegosalido fgallegosalido deleted the imgui-sfml/version-bump branch August 1, 2021 20:34
@ericLemanissier
Copy link
Contributor

No problem, don't worry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants