rpms/opengl-games-utils/F-7 README, NONE, 1.1 opengl-game-wrapper.sh, NONE, 1.1 opengl-games-utils.spec, NONE, 1.1

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Mon Sep 24 17:39:44 UTC 2007


Author: jwrdegoede

Update of /cvs/extras/rpms/opengl-games-utils/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15336

Added Files:
	README opengl-game-wrapper.sh opengl-games-utils.spec 
Log Message:
* Sun Sep 16 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.1-2
- Various spelling fixes thanks to Rahul Sundaram



--- NEW FILE README ---
This package contains various shell scripts which are intented for use by
3D games packages. These shell scripts can be used to check if direct rendering
is available before launching an OpenGL game. This package is intended for use
by other packages and is not intended for direct end user use!


Currently this package only contains one script:
opengl-game-wrapper.sh

To use this script create a link in /usr/bin gamename-wrapper[.sh] to
opengl-game-wrapper.sh, and put gamename-wrapper[.sh] in your desktop file
instead of gamename. The wrapper script will use $0 to determine gamename,
if direct rendering is available the wrapper script will execute gamename
with any parameters passed to the script, if direct rendering is not
available a userfriendly error dialog will be shown explaining that gamename
cannot run without hardware accelerated 3d, and that this is probably due to
missing Free Software support for the users card.


In the future I also plan to add an opengl-games-functions.sh file which can
be included by other wrapper scripts, the idea is to have a function in here
which will return true or false depending on if the current glx setup is a
setup which is known to work well. This function will have a list of
OpenGL renderer strings of known to work well drivers. This can then be used
by games which can take advantage of OpenGL, but will work without it too,
to determine wether or not to enable OpenGL support. The idea here is that
one might not want to enable OpenGL by default on SIS, VIA and other
low quality chipset / drivers.


Last but not least before I forget, to avoid any licensing issues I hereby
declare that all files in this package are in the Public Domain.

Hans de Goede 22 septemper 2007.


--- NEW FILE opengl-game-wrapper.sh ---
#!/bin/bash

GAME=`basename $0 | sed 's/-wrapper.*//'`

if [ `glxinfo | grep "direct rendering: " | cut -d " " -f 3` != Yes ]; then
  zenity --error --text="Your system currently is not capable of hardware \
accelerated 3D. Therefor $GAME cannot run.

Usually the cause of this error is that there are no Free Software drivers \
for your graphics card, please contact your graphics card manufacturer and \
kindly ask them to provide Free Software support for your card."
  exit 1;
fi

exec $GAME "$@"


--- NEW FILE opengl-games-utils.spec ---
Name:           opengl-games-utils
Version:        0.1
Release:        2%{?dist}
Summary:        Utilities to check proper 3d support before launching 3d games
Group:          Amusements/Games
License:        Public Domain
URL:            http://fedoraproject.org/wiki/SIGs/Games
Source0:        opengl-game-wrapper.sh
Source1:        README
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
Requires:       zenity glx-utils

%description
This package contains various shell scripts which are intented for use by
3D games packages. These shell scripts can be used to check if direct rendering
is available before launching an OpenGL game. This package is intended for use
by other packages and is not intended for direct end user use!


%prep
%setup -c -T
cp %{SOURCE1} .


%build
# nothing to build


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -p -m 755 %{SOURCE0} $RPM_BUILD_ROOT%{_bindir}


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc README
%{_bindir}/opengl-game-wrapper.sh


%changelog
* Sun Sep 16 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.1-2
- Various spelling fixes thanks to Rahul Sundaram

* Sun Sep 16 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.1-1
- Initial Fedora package




More information about the fedora-extras-commits mailing list