rpms/opengl-games-utils/F-7 opengl-game-functions.sh, NONE, 1.1 opengl-game-wrapper.sh, 1.1, 1.2 opengl-games-utils.spec, 1.1, 1.2
Hans de Goede (jwrdegoede)
fedora-extras-commits at redhat.com
Mon Sep 24 20:27:39 UTC 2007
Author: jwrdegoede
Update of /cvs/extras/rpms/opengl-games-utils/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23016
Modified Files:
opengl-game-wrapper.sh opengl-games-utils.spec
Added Files:
opengl-game-functions.sh
Log Message:
* Mon Sep 24 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.1-3
- Put DRI checking functionality in a checkDriOK bash function in
opengl-game-functions.sh, for usage from existing wrapper scripts
--- NEW FILE opengl-game-functions.sh ---
# check if DRI is available, show an error and exit if it isn't
function checkDriOK ()
{
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 $1 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
}
Index: opengl-game-wrapper.sh
===================================================================
RCS file: /cvs/extras/rpms/opengl-games-utils/F-7/opengl-game-wrapper.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- opengl-game-wrapper.sh 24 Sep 2007 17:39:41 -0000 1.1
+++ opengl-game-wrapper.sh 24 Sep 2007 20:27:07 -0000 1.2
@@ -1,15 +1,9 @@
#!/bin/bash
-GAME=`basename $0 | sed 's/-wrapper.*//'`
+. /usr/share/opengl-games-utils/opengl-game-functions.sh
-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.
+GAME=`basename $0 | sed 's/-wrapper.*//'`
-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
+checkDriOK $GAME
exec $GAME "$@"
Index: opengl-games-utils.spec
===================================================================
RCS file: /cvs/extras/rpms/opengl-games-utils/F-7/opengl-games-utils.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- opengl-games-utils.spec 24 Sep 2007 17:39:41 -0000 1.1
+++ opengl-games-utils.spec 24 Sep 2007 20:27:07 -0000 1.2
@@ -1,12 +1,13 @@
Name: opengl-games-utils
Version: 0.1
-Release: 2%{?dist}
+Release: 3%{?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
+Source1: opengl-game-functions.sh
+Source2: README
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Requires: zenity glx-utils
@@ -20,7 +21,7 @@
%prep
%setup -c -T
-cp %{SOURCE1} .
+cp %{SOURCE2} .
%build
@@ -30,7 +31,9 @@
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
install -p -m 755 %{SOURCE0} $RPM_BUILD_ROOT%{_bindir}
+install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}
%clean
@@ -41,9 +44,14 @@
%defattr(-,root,root,-)
%doc README
%{_bindir}/opengl-game-wrapper.sh
+%{_datadir}/%{name}
%changelog
+* Mon Sep 24 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.1-3
+- Put DRI checking functionality in a checkDriOK bash function in
+ opengl-game-functions.sh, for usage from existing wrapper scripts
+
* Sun Sep 16 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.1-2
- Various spelling fixes thanks to Rahul Sundaram
More information about the fedora-extras-commits
mailing list