forked from len0rd/rockbox
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
This commit is contained in:
parent
9fedc8187f
commit
1cc1f4ee77
2 changed files with 32 additions and 1 deletions
|
|
@ -63,6 +63,7 @@
|
||||||
|
|
||||||
#include <CoreFoundation/CoreFoundation.h>
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
#include <SystemConfiguration/SystemConfiguration.h>
|
#include <SystemConfiguration/SystemConfiguration.h>
|
||||||
|
#include <CoreServices/CoreServices.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
@ -180,6 +181,34 @@ QString System::osVersionString(void)
|
||||||
|
|
||||||
result = QString("CPU: %1<br/>System: %2<br/>Release: %3<br/>Version: %4")
|
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);
|
.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
|
#endif
|
||||||
result += QString("<br/>Qt version %1").arg(qVersion());
|
result += QString("<br/>Qt version %1").arg(qVersion());
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,9 @@ macx {
|
||||||
QMAKE_LFLAGS_PPC=-mmacosx-version-min=10.4 -arch ppc
|
QMAKE_LFLAGS_PPC=-mmacosx-version-min=10.4 -arch ppc
|
||||||
QMAKE_LFLAGS_X86=-mmacosx-version-min=10.4 -arch i386
|
QMAKE_LFLAGS_X86=-mmacosx-version-min=10.4 -arch i386
|
||||||
CONFIG+=x86 ppc
|
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
|
INCLUDEPATH += /usr/local/include
|
||||||
|
|
||||||
# rule for creating a dmg file
|
# rule for creating a dmg file
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue