Skip to content
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

How to get a version number #141

Open
kojix2 opened this issue Sep 29, 2022 · 2 comments · May be fixed by #143
Open

How to get a version number #141

kojix2 opened this issue Sep 29, 2022 · 2 comments · May be fixed by #143

Comments

@kojix2
Copy link
Contributor

kojix2 commented Sep 29, 2022

Hi!
I recently received a request to know the version of libui / libui-ng that you are using.
I replied that I will not support this in Ruby.

kojix2/LibUI#63

However, being able to get a version number may be useful for binding authors and users.
In fact, when I create Ruby bindings for C libraries, my first goal is often to get the version.

I looked for a while, but the version number doesn't seem to be in the code. (Actually, it might be there.)
What do you think?

@kojix2 kojix2 mentioned this issue Sep 29, 2022
@cody271
Copy link
Contributor

cody271 commented Sep 30, 2022

In fact, when I create Ruby bindings for C libraries, my first goal is often to get the version.

I looked for a while, but the version number doesn't seem to be in the code. (Actually, it might be there.)
What do you think?

Correct, this is definitely an expected feature of libraries which is missing from ui.h API. Good catch!

@cody271 cody271 linked a pull request Sep 30, 2022 that will close this issue
@szanni
Copy link
Contributor

szanni commented Oct 1, 2022

My suggested requirements on this would be:

  • compile time
  • string & integer

Good references IMO would be both ffmpeg and sqlite.

Something akin to:

  • UI_VERSION "x.y.z"
  • UI_VERSION_MAJOR, UI_VERSION_MINOR, UI_VERSION_PATCH
  • UI_VERSION_NUMBER 00x00y00z via UI_VERSION_MAJOR * 1000 * 1000 + UI_VERSION_MINOR * 1000 + UI_VERSION_PATCH

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 a pull request may close this issue.

3 participants