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

Include ld-decode build number in debug #240

Closed
Gamnn opened this issue Jun 15, 2019 · 8 comments
Closed

Include ld-decode build number in debug #240

Gamnn opened this issue Jun 15, 2019 · 8 comments
Labels
enhancement ld-decode An issue only affecting the ld-decode[r]
Milestone

Comments

@Gamnn
Copy link
Contributor

Gamnn commented Jun 15, 2019

It would be useful to keep track of which specific ld-decode commit was used to decode a .tbc, perhaps in a comment at the top of a .json?

@simoninns
Copy link
Collaborator

In the videoParameters would be the best place, as that is only included once per JSON file. Then the info would be available to the tool chain too.

@simoninns simoninns added enhancement ld-decode An issue only affecting the ld-decode[r] labels Jun 20, 2019
@simoninns simoninns added this to the ld-decode revision 6 milestone Jun 27, 2019
@simoninns simoninns changed the title Include ld-decode build number in .json Include ld-decode build number in debug Jul 14, 2019
@simoninns
Copy link
Collaborator

Related to #290 - the build number should be included in the ld-decode debug log file (changed issue title)

@simoninns simoninns modified the milestones: ld-decode revision 6, ld-decode revision 7 Nov 11, 2019
@simoninns simoninns removed this from the todo: ld-decode revision 7 milestone Jan 1, 2020
@simoninns
Copy link
Collaborator

simoninns commented Jan 28, 2020

I've added the following to the top-level makefile:

BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
COMMIT = $(shell git rev-parse --short HEAD)

These variables should be fine for importing into the Python stuff too @happycube and then added them to the JSON if desired.

The ld-decode-tools qmake .pro files have been altered to pull these in as defines (there is also a default in case compilation is local in Qt Creator (sets both to "unknown").

All tools will now report commit and branch using the --version switch. The TBC library has also been altered so the commit and branch is included with the first debug message to pass through the library.

@simoninns
Copy link
Collaborator

This is what it looks like from the tools:

versionstuff

@Gamnn
Copy link
Contributor Author

Gamnn commented Jan 28, 2020

Just a thought, but a compatibility version would be useful too, for the .TBC json. This could help with any changes to the format (e.g. for #242) that would break tool compatibility with old decodes.

@simoninns simoninns added this to the Revision 7 milestone Sep 17, 2020
@happycube
Copy link
Owner

Trying to figure out how to copy this into a 'make install''d copy. Any ideas?

happycube added a commit that referenced this issue Oct 18, 2020
happycube added a commit that referenced this issue Jan 17, 2022
happycube added a commit that referenced this issue Jan 17, 2022
@happycube
Copy link
Owner

Finally got around to having "make install" stash the git version info into a string. get_git_info() will use the file when the git commands do not work, so presumably it will work in an installed copy.

@happycube
Copy link
Owner

I think this is fixed now with that commit...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ld-decode An issue only affecting the ld-decode[r]
Projects
None yet
Development

No branches or pull requests

3 participants