Advertisement
Guest User

Untitled

a guest
Mar 16th, 2012
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.70 KB | None | 0 0
  1. #elif defined(Q_WS_HAIKU)
  2.     QString strVersion("Haiku");
  3.     BPath path;
  4.     if (find_directory(B_BEOS_LIB_DIRECTORY, &path) == B_OK) {
  5.         path.Append("libbe.so");
  6.         BAppFileInfo appFileInfo;
  7.         version_info versionInfo;
  8.         BFile file;
  9.         if (file.SetTo(path.Path(), B_READ_ONLY) == B_OK
  10.             && appFileInfo.SetTo(&file) == B_OK
  11.             && appFileInfo.GetVersionInfo(&versionInfo,
  12.                 B_APP_VERSION_KIND) == B_OK
  13.             && versionInfo.short_info[0] != '\0')
  14.                 strVersion = versionInfo.short_info;
  15.     }
  16.  
  17.     const char* haikuRevision = __get_haiku_revision();
  18.     if (haikuRevision != NULL) {
  19.         os_str_ = "Haiku";
  20.         os_str_ += " ( " + strVersion + " Rev. ";
  21.         os_str_ += haikuRevision;
  22.         os_str_ += ")";
  23.     }
  24.        
  25. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement