#!/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