-
-
Notifications
You must be signed in to change notification settings - Fork 442
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
Organized version information #3781
Conversation
- moved Qt version information to the top (main motivation) - organized and split compile-time and runtime information since it was getting a bit cluttered in there - removed old unused comments - added new `GIT_MODIFIED` variable - used to determine whether the vcs tree was compiled or not at the time of building the app
I can imagine that in some cases it might be very helpful to determine whether one is running a DEBUG build (e.g. in the process of troubleshooting/determining crash causes).
add a qmake variant as well since it involves basically no hassle
a2a8532
to
e383c89
Compare
while on about page topic, maybe we could move contributors list to chatterino api (since it needs to be curated and we cant use github directly)? so there wont be need to bundle 50 avatars and txt file. |
Firstly, I'm focusing on version-related changes here (not just in About page - it's not about reworking that page but reworking logic around version information). So even if I'd agree, that'd be something for another PR. Besides, I don't think it's a lot of sacrifice to keep that data locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! At some point we should just make two functions, one that generates "build information" and one that generates "runtime information" so diffs looks nicer in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this! Before my changes, the structure was something like: I've tried to find a reasonable solution to this and getting rid of second So I'm thinking I'll just keep the |
also make it impossible to override its value
4b648e1
to
398f81e
Compare
I decided it'll be cleaner to determine the boolean at qmake/cmake step already, which should also take care of qmake compilation issues. While doing this I've decided it should be impossible to override the value of GIT_MODIFIED since then it'd be pointless to have this "variable" in the first place. And there's no need for any fallback through env variables since if git command fails, |
We don't care about this variable's value, but rather the +='d DEFINE - although idk how to show whether it was set or not in this message() function, so I don't care about it - qmake is deprecated already anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice PR, just small things
Also removed GIT_HASH since GIT_COMMIT already gives us its value
They can be accessed with the `buildString()` and `runningString()` methods The String building now uses string appending rather than QString args where it makes sense to make the code more readable. This might be a small performance loss, but since the code only runs once readability > performance.
…e-version-information
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with the code as it looks now, feel free to take a polishing step on it if you'd like, or come with feedback!
Pull request checklist:
CHANGELOG.md
was updated, if applicableDescription
Organized version information shown in About page:
bool isModified()
member toVersion
class - used to determine whether the vcs tree was compiled or not at the time of building the app. Idea adopted from Golang's source code:Added information about running in DEBUG mode to fullVersion:
At first, I wanted to only add this to AboutPage.cpp but I figured it might be good to be consistent in other places (result of
--version
and/or title window); however if this change is "too invasive" I will revert it and add this information to AboutPage.cpp only.Previews:
built in debug mode with modified tree + no nightly:
built in non-debug (release) mode with clean tree + nightly: