File: system_info

package info (click to toggle)
playonlinux 4.1.1-1
  • links: PTS, VCS
  • area: contrib
  • in suites: wheezy
  • size: 11,208 kB
  • sloc: python: 6,173; sh: 5,358; ansic: 72; makefile: 8
file content (102 lines) | stat: -rwxr-xr-x 4,123 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/bash

# Copyright (C) 2007-2010 PlayOnLinux Team
# Copyright (C) 2007 Pâris Quentin
# Copyright (C) 2009 Łukasz Wojniłowicz

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 

if [ "$PLAYONLINUX" = "" ]
then
	exit 0
fi

source "$PLAYONLINUX/lib/sources" 
FIRSTARGUMENT="$1"
APP="$2"

export WINEDEBUG="-all"
SYSTEME=$(uname -o)
NOYAU=$(uname -sr)

NOYAUALINUX=$(uname -r)
ARCHITECTURE=$(uname -m)
DIRECTRENDERING=$(glxinfo | grep direct)
OPENGL=$(glxinfo | grep "OpenGL version string")
GRAPHICDRIVERVERSION=`echo $OPENGL | cut -d":" -f2 | cut -d" " -f4`
OPENGL=`echo $OPENGL | cut -d":" -f2 | cut -d" " -f2`
if [ "`ps -e | grep -o compiz`" != "" ]
then
	RUNSCOMPIZ="Yes"
else
	RUNSCOMPIZ="No"
fi

UTILISATEUR=$USER
LANGUAGE=$LANG
NOM_MACHINE=$HOSTNAME
CARTE_VIDEO="$(glxinfo | grep renderer)"
CARTE_VIDEO=${CARTE_VIDEO:24}
PLACE_RESTANTE=$(df -h)
cat /etc/*{version,release}* 2>/dev/null | sort | uniq | tail -n 4 | grep "DISTRIB" > "$REPERTOIRE/tmp/infos"
source "$REPERTOIRE/tmp/infos"
rm -f "$REPERTOIRE/tmp/infos"
TEMP_INFOS=$REPERTOIRE/tmp/config_info
CURRENTWINEVERSION="$(wine --version 2> /dev/null)"
INSTALLEDWINEVERSION="$(/usr/bin/wine --version 2> /dev/null)"
touch $TEMP_INFOS
if [ "$FIRSTARGUMENT" == "--run2" ]
then
    echo "$(eval_gettext 'Your system: ')$DISTRIB_ID $DISTRIB_RELEASE (`uname -r`)" >> $TEMP_INFOS
    echo "$(eval_gettext 'System architecture: ')$ARCHITECTURE" >> $TEMP_INFOS
    echo "$(eval_gettext 'Your graphics card: ')$CARTE_VIDEO" >> $TEMP_INFOS
    echo "$(eval_gettext 'Graphic card driver: ')$GRAPHICDRIVERVERSION" >> $TEMP_INFOS
    echo "$DIRECTRENDERING" >> $TEMP_INFOS
    echo "$(eval_gettext 'OpenGL: ')$OPENGL" >> $TEMP_INFOS
    echo "$(eval_gettext 'Compiz in background: ')$RUNSCOMPIZ" >> $TEMP_INFOS
    APPEXEC=`detect_appexec "$APP"`
    APPDIR=`detect_appdir "$APP"`
    APPPATH=`find "$APPDIR" -iname "$APPEXEC"`

    APPEXECSIZE=`stat -c%s "$APPPATH"`
    let AAPPEXECSIZE="$APPEXECSIZE / 1024 / 1024"
    let BAPPEXECSIZE="($APPEXECSIZE - ($AAPPEXECSIZE * 1024 * 1024)) * 1000 / 1024 / 1024"
    echo "$(eval_gettext 'Executable file: ')$APPEXEC ("$AAPPEXECSIZE.$BAPPEXECSIZE" $(eval_gettext "MB"))" >> $TEMP_INFOS
    echo -e "$(eval_gettext "App launcher content: \n")" >> $TEMP_INFOS
    echo "[code language=console]
`cat "$REPERTOIRE/configurations/installed/$APP"`
[/code]
" >> $TEMP_INFOS

    echo -e "$(eval_gettext "Terminal output content: \n")" >> $TEMP_INFOS

else
    echo "$(eval_gettext "System information:")" > $TEMP_INFOS
    echo "" >> $TEMP_INFOS
    echo "$(eval_gettext "Your system: ")$SYSTEME" >> $TEMP_INFOS
    echo "$(eval_gettext "Your kernel: ")$NOYAU" >> $TEMP_INFOS
    echo "$(eval_gettext "System language: ")$LANGUAGE" >> $TEMP_INFOS
    echo "$(eval_gettext "Your username: ")$UTILISATEUR" >> $TEMP_INFOS
    echo "$(eval_gettext "Your computer's name: ")$NOM_MACHINE" >> $TEMP_INFOS
    echo "$(eval_gettext "Your graphic card: ")$CARTE_VIDEO" >> $TEMP_INFOS
    echo "$(eval_gettext "Your distribution: ")$DISTRIB_ID" >> $TEMP_INFOS
    echo "$(eval_gettext "Your distribution version: ")$DISTRIB_RELEASE" >> $TEMP_INFOS
    echo "$(eval_gettext "Current Wine version: ")$INSTALLEDWINEVERSION" >> $TEMP_INFOS
    echo "$(eval_gettext "Wine version used by PlayOnLinux: ")$CURRENTWINEVERSION" >> $TEMP_INFOS
    echo "$(eval_gettext "Free space on your hard drives:")" >> $TEMP_INFOS
    echo "$PLACE_RESTANTE" >> $TEMP_INFOS
fi
cat $TEMP_INFOS
rm $TEMP_INFOS -f