
Originally Posted by
marcel
Try looking on developer.apple.com.
But you can also look at
darwinsource.opendarwin.org( which is down now
).
I am not sure but now is all transfer to
http://www.macports.org/
http://www.macosforge.org/
libs && other i install from http://darwinports.com/
port install mysql ..
if you like to discovery sysinfo user..
I want some system information as username currently using the system,Mac OS version, Machine Name,Processor Type(Intel or Power Pc) etc at run time.
You can use applescript and qprocess...
#elif defined(Q_OS_MACX)
//create script
QString scriptFilename
= ((Window
*)qApp
->mainWidget
())->getTitle
()->getAlbum
()->getTmpDir
() + "/tmpBackgroundScript";
QFile file( scriptFilename
);
if(file.open(IO_WriteOnly))
{
//-----
stream.setDevice( &file );
//-----
stream << "tell application \"Finder\"\n";
stream << "set pFile to POSIX file \"" << chosenFilename.ascii() << "\"\n";
stream << "set desktop picture to file pFile\n";
stream << "end tell";
}
file.close();
//run script to set background
p.addArgument( "/usr/bin/osascript" );
p.addArgument( scriptFilename );
p.start();
//if there is an old file remove it
if(!oldFilename.isNull())
{ tmpDir.remove( oldFilename ); }
//-------------------------------
//UNIX
#else
#elif defined(Q_OS_MACX)
//create script
QString scriptFilename = ((Window*)qApp->mainWidget())->getTitle()->getAlbum()->getTmpDir() +
"/tmpBackgroundScript";
QFile file( scriptFilename );
if(file.open(IO_WriteOnly))
{
//-----
QTextStream stream;
stream.setDevice( &file );
stream.setEncoding( QTextStream::UnicodeUTF8 );
//-----
stream << "tell application \"Finder\"\n";
stream << "set pFile to POSIX file \"" << chosenFilename.ascii() << "\"\n";
stream << "set desktop picture to file pFile\n";
stream << "end tell";
}
file.close();
//run script to set background
QProcess p;
p.addArgument( "/usr/bin/osascript" );
p.addArgument( scriptFilename );
p.start();
//if there is an old file remove it
if(!oldFilename.isNull())
{ tmpDir.remove( oldFilename ); }
//-------------------------------
//UNIX
#else
To copy to clipboard, switch view to plain text mode
have a look on applescript you can get so many info....
Bookmarks