First step of dynamically updating the version from cmake#2610
First step of dynamically updating the version from cmake#2610AndrewQuijano wants to merge 1 commit intocapstone-engine:nextfrom
Conversation
|
Showing how the current versioning works, but I will need help about the |
There was a problem hiding this comment.
I am all for centralizing the version info!
But I think we can't get rid of some hard-coded version numbers.
Not all commits have a tag assigned. If you build on next without having a tag, it fails to set the macros, right?
The version number macros need to be set. Because people use them to distinguish between pre-v5, v5, v6 etc. So they can build their project with different Capstone versions.
c2fcace to
11d709d
Compare
|
@Rot127 I commented out the cmake to configure pkgconfig.mk, this will only dynamically the version information for the capstone.h file. Figure I can keep the template in the meantime for your use when you work on getting the bindings working. |
|
Thanks! I will review this one after Lunar New year. (So hopefully after the |
11d709d to
9e1843b
Compare
9e1843b to
b9e6d61
Compare
|
@Rot127 feel free to start checking, look forward to seeing the binding updates get finished eventually! |
Rot127
left a comment
There was a problem hiding this comment.
Test release is here: https://github.com/Rot127/capstone/releases/tag/v300.0.0
But the packages don't contain the version.h file. So projects won't be able to build.
I would advice for further testing that you set up a Fedora and Debian VM, make a snapshot before installing the built package and then download the generated ones and try to run cstool -v. Also build a little test main.c which includes and uses capstone so you can check it builds.
Similar for the Python bindings. You can build them (check the Github workflows) and import the module and check the version number.

Your checklist for this pull request
Detailed description
Update Capstone such that Python binding versioning can be obtained from the CMake file, this would save time to just pass the version into CMake rather than manually update the version via commit.
Essentially, can we automate this step done for each release?
5526125
...
Test plan
1- Confirm that creating the Debian Package works as intended
2- Confirm that version.h and pkgconfig.mk file are correctly filled out. Not sure what exactly to check with the Python bindings though
...
Closing issues
closes #2609
...