Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3285 in orxonox.OLD for orxonox/branches


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

orxonox/branches/updater: getting some system information

Location:
orxonox/branches/updater/src/gui
Files:
2 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
  • orxonox/branches/updater/src/gui/orxonox_gui_update.h

    r3284 r3285  
    2424{
    2525 private:
     26  // Defining Variables
     27  char* tmpDir;                         //!< The Temporary directory.
     28  char* homeDir;                        //!< The Home directory.
     29  char* installDataDir;                 //!< Where to install the Data to.
     30  char* installSourceDir;               //!< Where to install the Source to.
     31  char* userName;                       //!< The user logged in.
     32
     33  bool getSystemInfo();
     34
     35 
     36  // Window creation.
    2637  Frame* updateFrame;                   //!< The Frame that holds the updateOptions.
    2738  Box* updateBox;                       //!< The Box that holds the updateOptions.
     
    4152
    4253  Button* test;                         //!< will be deleted soon.
    43  
    44 #ifdef HAVE_GTK2 
     54
     55#ifdef HAVE_GTK2
    4556  static gint updateDataFunc (GtkWidget* w, GdkEventKey* event, void* info);
    4657  static gint updateSourceFunc (GtkWidget* w, GdkEventKey* event, void* info);
     
    8798 
    8899  Widget* getWidget ();
    89  
     100#ifdef HAVE_CURL  
    90101  void updateDataWindowCreate (void);
    91102  Button* updateDataWindowGetButton(void);
     
    93104  void updateSourceWindowCreate (void);
    94105  Button* updateSourceWindowGetButton(void);
     106#endif /* HAVE_CURL */
     107
    95108};
    96109
    97 
    98 
    99110#endif /* _ORXONOX_GUI_UPDATE_H */
Note: See TracChangeset for help on using the changeset viewer.