Allow building against latest Binary Ninja API version
This adds -DBINEXPORT_BINARYNINJA_LATEST=ON to build against the latest available API.
Additionally, this PR updates the stable/dev pinned versions and stubs.
This fixes #120 and #108
Now uses add_custom_command so we only need to run the stub generator once. Added a PS1 script that does the equivalent of the current bash one. I don't have a Windows install available, but running using pwsh this generates exactly the same output.
Thanks for the PR. I spent way too long trying to modify the project to work with the latest Binja API. Can confirm this PR works with the dev channel (at the time of writing 4.2.6146-dev (d7e28a65)) on macOS arm64.
any chance we can get some movement on this please?
also fwiw, i was able to get this to work with BinaryNinja on dev but not on stable because the build is pinned to the commit hash and you end up getting the same abi out of date error. i don't know how sustainable using a hash is since bn releases pretty fast. perhaps using a target branch that always points to the most current stable release, and/or a way to specify the branch/tag to use. it may also be safer to run the regenerate-stubs on every build since the apis changed from 4.1 to 4.2.
I updated the pinned commits for stable and dev
i don't know how sustainable using a hash is since bn releases pretty fast
iiuc, this is a design choice so that whatever is pinned is known-good (and you can easily downgrade your BN if needed). Maybe BINEXPORT_BINARYNINJA_LATEST could be refactored to accept any commit/branch/tag?
Sorry for the ping @cblichmann - can I ask for a follow up review now the previous comments have been addressed?
Unsure if this is still needed with https://github.com/Vector35/binaryninja-api/issues/6852#issuecomment-3075245706
Yes, Binary Ninja now ships with BinExport, making this much easier.