Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 26, 2004, 1:31:19 AM (21 years ago)
Author:
bensch
Message:

orxonox/branches/updater: getting some system information

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/updater/src/gui/orxonox_gui_update.cc

    r3284 r3285  
    3030#include "orxonox_gui.h"
    3131#include <stdio.h>
     32#include <stdlib.h>
    3233
    3334using namespace std;
     
    3839OrxonoxGuiUpdate::OrxonoxGuiUpdate ()
    3940{
     41  this->getSystemInfo();
     42
    4043  this->updateFrame = new Frame ("Update-Options:");
    4144  this->updateFrame->setGroupName ("update");
     
    7073{
    7174  return updateFrame;
     75}
     76
     77/**
     78    \brief Look what info we can get from this system
     79*/
     80bool OrxonoxGuiUpdate::getSystemInfo(void)
     81{
     82  PRINTF(3)("Grabbing system information\n");
     83  tmpDir = getenv("TMPDIR");
     84  if (!tmpDir)
     85    tmpDir = "/tmp";
     86  PRINTF(4)("Temporary directory is: %s\n", tmpDir);
     87
     88#ifdef __WIN32__
     89  homeDir = getenv ("USERPROFILE");
     90#else
     91  homeDir = getenv("HOME");
     92#endif
     93  PRINTF(4)("Home directory is %s\n", homeDir);
     94
     95  installDataDir = "/usr/share/games/orxonox";
     96  PRINTF(4)("Installation of orxonox-data will go to this directory is %s\n", installDataDir);
     97
     98  installSourceDir = "/usr/games/bin";
     99  PRINTF(4)("Installation of orxonox-source will go to this directory is %s\n", installSourceDir);
     100
     101  userName = getenv("USER");
     102  PRINTF(4)("Logged in username is: %s\n", userName);
    72103}
    73104
Note: See TracChangeset for help on using the changeset viewer.