-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
Provide version information in DLL #1076
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1076 +/- ##
==========================================
- Coverage 82.66% 82.59% -0.07%
==========================================
Files 53 53
Lines 7717 7717
Branches 1213 1213
==========================================
- Hits 6379 6374 -5
- Misses 1227 1230 +3
- Partials 111 113 +2 |
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! There are certainly some users who appreciate this very much.
* moved code to utility function * that function uses the target argument to generate all required files (only manual parameter is the file description) * switched from manual string replacement to `configure_file()` which creates another intermediate file * to generate the final *.rc file we use file(GENERATE) together with `TARGET_FILE_NAME` generator expression to retrieve "OriginFilename" during the generate-time (between configure and build phase). * ensure that unit-tests don't pick up unnecessary resource-sources
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, LGTM. I made a few minor changes so that we can reuse your code for crashpad
.
Please don't merge; I will do this soon.
...because even if we generate static client libraries crashpad_handler.exe and crashpad_wer.dll should still be versioned.
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.
lgtm!
This PR broke usage of sentry-native as a submodule, e.g. in sentry-flutter:
|
Yeah, sorry. Fixed here: #1086 I will release it now. |
When building sentry-native as a DLL, there is currently no easy way to determine what version it is.
Windows allows you to specify version information in a resource file, the version can then be found in 'Properties' from Explorer. The version can also be queried programatically with
GetFileVersionInfo{A,W}
.Here's an example (in Swedish):