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

Detailed build version #2577

Closed
wants to merge 7 commits into from
Closed

Detailed build version #2577

wants to merge 7 commits into from

Conversation

Wackerbarth
Copy link
Contributor

M115 provides the detailed version number (which includes the git commit SHA).
However, this is too long to be displayed on LCD displays, etc.
Therefore, I have created both the long version and a shorter one.

define SHORT_BUILD_VERSION "1.1 dev"

define DETAILED_BUILD_VERSION "1.1 dev-151-g3746552"

Also, since the use of automatic versioning is, at the present time, an optional feature, the command line build flag is now changed from HAS_AUTOMATIC_VERSIONING to USE_AUTOMATIC_VERSIONING

@AnHardt
Copy link
Member

AnHardt commented Aug 2, 2015

Maybe is easier to handle if we have to strings.
#define BUILD_VERSION "1.1 dev"
#define BUILD_VERSION_DETAILES "151-g3746552"
that way is much easier to split it in two lines.

@Wackerbarth
Copy link
Contributor Author

I was thinking that you would either use the short form (like on an LCD) or the long form as in M115.
Where would you want to use the long form, but split it up?

The generation of the long form comes from git describe. But, within reason, I can reformat it as desired.

Currently, from git describe, I see "1.1-151-g3746552" and from git branch I obtain " dev"
For the short form, I just replace re /-.*/ with the branch.
For the long form, I replace only the first /-/

That will allow me to generate things like "1.1 RC2-g1234567" easily.

On Unix-based machines, I have plenty of ways to parse and reformat however we wish.
But on Windows, I fear that scripting is more restrictive since I don't trust those users to have a full set of tools. So, if possible, to minimize the porting/maintenance effort and keep the results alike on all machines, I'd like to keep the processing fairly simple.

Also, do we want ANY spaces in the version? (I don't know, or particularly care)
But we do need to decide on a precise format.

@AnHardt
Copy link
Member

AnHardt commented Aug 2, 2015

Until new i hafe seen it from the othe side. Concatenating strings in the pree processor is an easy task- splitting seems to be impossible.
But you are right, until now, i was not able to generate the version-strings under windows at all.

@Wackerbarth
Copy link
Contributor Author

I guess that it really depends on what "tools" we can assume/require on any platform.

For example, Tim, not wanting to use the Arduino IDE, is accustomed to having a Makefile.
As an alternative, he has suggested using PlatformIO. It is based on Scons and Python.
If we were to require the Windows users to install Python, then we have available a powerful language with which to do anything we might wish.

But, I return to my question. Do you really have a use case where you need the long version broken into pieces (rather than using the short version)? I worry about fragmenting the long version because that only encourages someone to muck with it and leave part of it out in just the place we want it most. (M115, etc.)

@AnHardt
Copy link
Member

AnHardt commented Aug 2, 2015

No i have not a real reason. I just realized that i made the bootscreen for 20*4 displays in the assumption the version-string would fit on the right side of the logo. Than i thought it could fit in two lines. But it could easily work like in the 16x4 version - as s sequence of the URL, the version and what ever we want, scrolling if to long.

@eboston
Copy link
Contributor

eboston commented Aug 2, 2015

What about displaying the short version on the splash screen. Then add an "About" menu item on all display types that gives the full information. Something like that? I know it would take up more code space to do something like that though.

@Wackerbarth
Copy link
Contributor Author

Personally, I don't think that you need to show the long version on the screen. The short version should be sufficient.

Where the long version comes into play is when we need to ask someone "EXACTLY what version are you using?" or stated as "What is the output of M115?" From that, we will know the version that they are using. Much better than hearing "the development branch from 2 days ago"

@Wackerbarth
Copy link
Contributor Author

Moved to MarlinDev #7

@Wackerbarth Wackerbarth closed this Aug 2, 2015
@Wackerbarth Wackerbarth deleted the DetailedBuildVersion branch August 3, 2015 05:15
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.

3 participants