summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2010-04-02 21:32:51 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2010-04-02 21:32:51 +0000
commit1cc1f4ee77e2778a0cdde199689980fc3b8167fc (patch)
tree21a7769119cde4c9659ca43f3a5a099826a78cae /rbutil
parent9fedc8187f746960ea4608f7bb9e5e9b2667fd39 (diff)
downloadrockbox-1cc1f4ee77e2778a0cdde199689980fc3b8167fc.tar.gz
rockbox-1cc1f4ee77e2778a0cdde199689980fc3b8167fc.tar.bz2
rockbox-1cc1f4ee77e2778a0cdde199689980fc3b8167fc.zip
System Info: display OS X version number and architecture too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25442 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/base/system.cpp29
-rw-r--r--rbutil/rbutilqt/rbutilqt.pro4
2 files changed, 32 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/base/system.cpp b/rbutil/rbutilqt/base/system.cpp
index 7797157493..80e787515c 100644
--- a/rbutil/rbutilqt/base/system.cpp
+++ b/rbutil/rbutilqt/base/system.cpp
@@ -63,6 +63,7 @@
#include <CoreFoundation/CoreFoundation.h>
#include <SystemConfiguration/SystemConfiguration.h>
+#include <CoreServices/CoreServices.h>
#endif
#include "utils.h"
@@ -180,6 +181,34 @@ QString System::osVersionString(void)
result = QString("CPU: %1<br/>System: %2<br/>Release: %3<br/>Version: %4")
.arg(u.machine).arg(u.sysname).arg(u.release).arg(u.version);
+#if defined(Q_OS_MACX)
+ SInt32 major;
+ SInt32 minor;
+ SInt32 bugfix;
+ OSErr error;
+ error = Gestalt(gestaltSystemVersionMajor, &major);
+ error = Gestalt(gestaltSystemVersionMinor, &minor);
+ error = Gestalt(gestaltSystemVersionBugFix, &bugfix);
+
+ result += QString("<br/>OS X %1.%2.%3 ").arg(major).arg(minor).arg(bugfix);
+ // 1: 86k, 2: ppc, 10: i386
+ SInt32 arch;
+ error = Gestalt(gestaltSysArchitecture, &arch);
+ switch(arch) {
+ case 1:
+ result.append("(86k)");
+ break;
+ case 2:
+ result.append("(ppc)");
+ break;
+ case 10:
+ result.append("(x86)");
+ break;
+ default:
+ result.append("(unknown)");
+ break;
+ }
+#endif
#endif
result += QString("<br/>Qt version %1").arg(qVersion());
return result;
diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro
index d3fb9c4b84..bb191f59c9 100644
--- a/rbutil/rbutilqt/rbutilqt.pro
+++ b/rbutil/rbutilqt/rbutilqt.pro
@@ -139,7 +139,9 @@ macx {
QMAKE_LFLAGS_PPC=-mmacosx-version-min=10.4 -arch ppc
QMAKE_LFLAGS_X86=-mmacosx-version-min=10.4 -arch i386
CONFIG+=x86 ppc
- LIBS += -L/usr/local/lib -framework IOKit -framework CoreFoundation -framework Carbon -framework SystemConfiguration -lz
+ LIBS += -L/usr/local/lib -lz \
+ -framework IOKit -framework CoreFoundation -framework Carbon \
+ -framework SystemConfiguration -framework CoreServices
INCLUDEPATH += /usr/local/include
# rule for creating a dmg file