Bug 96407 - Mac OS X version doesnt appear in About dialog
Summary: Mac OS X version doesnt appear in About dialog
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
5.1.0.0.beta1
Hardware: All macOS (All)
: medium enhancement
Assignee: Oliver Graff
URL:
Whiteboard: target:5.2.0 target:5.1.1
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2015-12-11 10:39 UTC by Yousuf Philips (jay) (retired)
Modified: 2016-10-10 12:06 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2015-12-11 10:39:29 UTC
The about dialog now outputs the OS version next to the 'Ver:' label in the About dialog, but this hasnt been implemented yet for Mac OS, as i noticed in Alex build info (bug 96359 comment 1).

It is possible to get the Mac OS X version from the commandline from the 'sw_vers -productVersion' or 'system_profiler SPSoftwareDataType' commands, which pulls it from one of the following files.

/System/Library/CoreServices/SystemVersion.plist
/System/Library/CoreServices/ServerVersion.plist

= References =

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/sw_vers.1.html

http://superuser.com/questions/75166/how-to-find-out-mac-os-x-version-from-terminal#75206
Comment 1 Michael Meeks 2015-12-11 11:05:39 UTC
Thanks for filing Jay; the code is easy to find here:

vcl/inc/salinst.hxx:

+    /// get information about underlying versions
+    virtual OUString        getOSVersion() { return OUString("-"); }

which is what is used for Mac; so we need to override this method for:

vcl/inc/osx/salinst.h

and implement it for the osx backend.

git grep -10 ::getOSVersion

to see the windows and linux implementations.

Thanks ! =)
Comment 2 Oliver Graff 2015-12-12 08:37:55 UTC
It appears this is unassigned. I'm going to look through the code to make sure this isn't already fixed, if it is still an issue, I will go ahead and give the fix a shot.
Comment 3 Yousuf Philips (jay) (retired) 2015-12-12 11:25:41 UTC
Hi Oliver,

I've submitted a patch yesterday which likely needs additional work to get it running.
https://gerrit.libreoffice.org/#/c/20634/
Comment 4 Robinson Tryon (qubit) 2015-12-14 06:33:26 UTC Comment hidden (obsolete)
Comment 5 steve 2016-01-05 11:04:26 UTC
tested w latest available master from 2015-12-31 and no OS X info to be found in the about dialog.

So assuming this not fixed, yet.

iplaw also just checked this in his latest master build from last night and also found no OS version. He found a placeholder "OS Version" but that was blank.

Oliver, can you look into this and see if you are able to get it fixed?

This is what the latest public available master build has in about:
Version: 5.2.0.0.alpha0+
Build ID: 4c23184a115b607f19a32134f8c91d6f9df61ade
CPU Threads: 4; OS Version: -; UI Render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2015-12-31_00:10:52
Locale: de-DE (de.UTF-8)
Comment 6 Oliver Graff 2016-01-05 16:16:47 UTC
Jay, I'll take a look at that patch, thanks.

Sorry for the slow progress I made the mistake of taking up the charge on this around the same time that I was moving twice in three weeks.
Comment 7 Chris Sherlock 2016-01-15 23:20:30 UTC
I don't yet have my OS X system setup with lode, but if you want to see how the utility gets the version then the sourcecode is available here:

http://www.opensource.apple.com/source/DarwinTools/DarwinTools-1/sw_vers.c
Comment 8 Commit Notification 2016-01-22 07:23:25 UTC
Douglas Mencken committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ee27dae3b5df1e3fc63ecb2ee2c2d123fd4c8cff

tdf#96407 Provide OS X version info for About box

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Chris Sherlock 2016-01-22 07:26:32 UTC
Douglas Mencken has helped out here with a patch that implements this functionality. Yousuf, thanks for your efforts it was a good attempt :-)

I've tested out Douglas's commit, and it works very well so I've pushed it to master.
Comment 10 Yousuf Philips (jay) (retired) 2016-01-24 10:41:31 UTC
(In reply to Chris Sherlock from comment #9)
> Yousuf, thanks for your efforts it was a good attempt :-)

Yep was the best i can do with no C++ knowledge. :D

> I've tested out Douglas's commit, and it works very well so I've pushed it
> to master.

Looking at the patch, it would be useful to check the relevance of /System/Library/CoreServices/ServerVersion.plist, as sw_vers does utilize it, possibly for Mac servers.
Comment 11 steve 2016-01-24 14:58:11 UTC
Version: 5.2.0.0.alpha0+
Build ID: 49b5eed56c470975927bb7b0328337ab8a76a910
CPU Threads: 8; OS Version: Mac OS X 10.11.3; UI Render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2016-01-24_06:50:29
Locale: de-DE (de.UTF-8)

Verified. Great stuff, looking forward to better bug reports (:
Comment 12 Yousuf Philips (jay) (retired) 2016-01-26 12:07:26 UTC
With steve confirming it works, it would be good to backport this into 5.1.
Comment 13 How can I remove my account? 2016-01-26 12:49:22 UTC
Backport to 5.1 submitted to gerrit.
Comment 14 Commit Notification 2016-01-27 02:10:25 UTC
Douglas Mencken committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=32ac2b153abc078a65634aff12660a5e67864d66&h=libreoffice-5-1

tdf#96407 Provide OS X version info for About box

It will be available in 5.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Robinson Tryon (qubit) 2016-02-18 16:37:19 UTC Comment hidden (obsolete)