-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Close add build info to About window, #3977 #4066
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
Conversation
This commit will: - Add a new class InfoDictionary that exposes some Info.plist entries as properties - Change AppDelegate, GuideWindowController, InitialWindowController, and JavascriptAPICore to use InfoDictionary instead of methods in the Utility class - Remove iinaCopyright and iinaVersion methods from Utility class - Add FFmpeg version to About window - Add build date and build branch as hidden entries in About window that are exposed via an option-click
iina/InfoDictionary.swift
Outdated
/// | ||
/// This class exposes some of the entries contained in `Bundle.main.infoDictionary` as properties to provide for easier access | ||
/// to information contained in the dictionary from other classes. | ||
class InfoDictionary { |
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.
class InfoDictionary { | |
struct InfoDictionary { |
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.
Darn. Forgot about structs yet again. Fixed.
iina/InfoDictionary.swift
Outdated
var copyright: String { Bundle.main.infoDictionary!["NSHumanReadableCopyright"] as! String } | ||
|
||
var version: (String, String) { | ||
let infoDic = Bundle.main.infoDictionary! | ||
return (infoDic["CFBundleShortVersionString"] as! String, infoDic["CFBundleVersion"] as! String) | ||
} |
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.
Why are these two computed and the others aren't?
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.
Originally were stored properties. Then I began thinking reviewers might question why we are storing these values that are rarely referenced. So I converted these to match up with the Utility
methods they replaced. I've pushed a commit that changes them all to be computed. If you would prefer they are all initialized once in an init method just let me know and I'll change it to be all stored properties.
Addressed review comments. This commit will: - Add a new class InfoDictionary that exposes some Info.plist entries as properties - Change AppDelegate, GuideWindowController, InitialWindowController, and JavascriptAPICore to use InfoDictionary instead of methods in the Utility class - Remove iinaCopyright and iinaVersion methods from Utility class - Add FFmpeg version to About window - Add build date and build branch as hidden entries in About window that are exposed via an option-click
iina/AboutWindowController.swift
Outdated
/// which the build was made. As this information is only interesting to developers that take builds to other machines for long term | ||
/// testing this information is hidden and only reveled if the user option-clicks between the mpv and FFmpeg versions and the | ||
/// `License` button. | ||
override func mouseUp(with event: NSEvent) { |
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 don't think it is appropriate to hide this 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.
Fixed. The build date and branch are no longer hidden. The code is "friendly" and will just not log or display the build information if it is missing from Info.plist
.
I copied macOS's convention of hiding information in About This Mac
as I thought I would hear lots of objections to including this information during review such as:
- Normal users do not know what a source control branch is
- The additional information makes the window look cluttered
- Both the build date and branch are well known for the release version
- The build date and branch are not labeled
- Reminding users of the release date may increase the calls for a new release
- The branch for the release duplicates the version number that is already listed
- Other applications do not display such information in their
About
windows
Of those the one that bothers me is the inclusion of the branch name. That is an implementation detail that most users will not understand.
If you have any second thoughts about showing the branch name do not hesitate to ask for more changes. I'm happy to tweak this some more if needed. If there is additional information you think should be included I can look into that as well, or we could plan to add that in the future as I do need to get back to fixing bugs.
Most applications do not display this kind of information, but I dug around some more and found a few examples of applications that include information for developers.
LibreOffice has a link to the git commit along with other information of interest to developers on its About
window:
Wireshark lists a lot of information for developers on its About
window:
KeePassXC has a Debug Info
tab on its About
window. I was unable to take a screen shot of that window. I used the Copy to clipboard
button to capture what it shows:
KeePassXC - Version 2.7.1
Revision: 5916a8f
Qt 5.15.2
Debugging mode is disabled.
Operating system: macOS 13.0
CPU architecture: arm64
Kernel: darwin 22.1.0
Enabled extensions:
- Auto-Type
- Browser Integration
- SSH Agent
- KeeShare
- YubiKey
- Quick Unlock
Cryptographic libraries:
- Botan 2.19.1
I definitely prefer the cleaner more stylish look of IINA's About
window over these windows.
I do plan on eventually enhancing startup to log more information about the Mac IINA is running on.
This commit will: - Add a new class InfoDictionary that exposes some Info.plist entries as properties - Change AppDelegate, GuideWindowController, InitialWindowController, and JavascriptAPICore to use InfoDictionary instead of methods in the Utility class - Remove iinaCopyright and iinaVersion methods from Utility class - Add FFmpeg version to About window - Add build date and build branch to About window Updated to not require an option-click to expose the build info as per review comments.
This commit will:
Add a new class InfoDictionary that exposes some Info.plist entries as properties
Change AppDelegate, GuideWindowController, InitialWindowController, and JavascriptAPICore to use InfoDictionary instead of methods in the Utility class
Remove iinaCopyright and iinaVersion methods from Utility class
Add FFmpeg version to About window
Add build date and build branch as hidden entries in About window that are exposed via an option-click
I have read CONTRIBUTING.md
This implements/fixes issue Add hidden info about the build to the About window #3977.
Description: