2006-04-21

Cool game - puzzle - Professor Fizzwizzle

Grubby Games produced Professor Fizzwizzle.
A nice mixture of "The Incredible Machine" and something like "Sokoban".

The coolest thing I thought was that production was first done for Linux and then ported/adapted to windows and Mac.

My only remark was the missing installation routine for global linux installation (so different users can run the game without all having to install it).




#!/usr/bin/bash
# Filename: INSTALL.SH
# Author: Dieter Demerre
# copyright: GPL (http://www.gnu.org/licenses/)
# Project: Professor Fizwizzle
# Description:
# This bash-script will install Professor Fizzwizzle in global directory
# with user accessable script.

PACKAGE=/tmp/ProfessorFizzwizzleFULL.tar.gz;
TARGET=/usr/local/games;
if [ ! -f ${PACKAGE} ]; then
echo "Install Script cannot find tar-gz file (looking for ${PACKAGE}).">&2;
echo "if tar-file is named or located elsewhere, adjust INSTALL script," >&2;
echo " OR move/rename it to ${PACKAGE}.">&2;
exit 4;
fi
if [ ! -d ${TARGET} ]; then
echo "Install script would extract ${PACKAGE} into ${TARGET}.">&2;
echo "But ${TARGET} is found to be no directory.">&2;
echo "create directory ${TARGET} OR change value TARGET in this script.">&2;
exit 5;
fi

#these if-test instructions will check whether the system is run as user root
# OR should be using sudo system.
#
if [ $UID -ne 0 ]; then
SUDO=`which sudo`;
if [ -z "${SUDO}" ]; then
echo "The install script should be run as user root." >&2;
exit 1;
elif [ ! -x ${SUDO} ]; then
echo "The executable SUDO is not executable." >&2;
echo "reconfigure your system or run this install script as user root." >&2;
exit 2;
else
echo "Following instruction will ask for a password. Enter your USER-password.";
${SUDO} -i which sudo || SUDO="";
if [ -z "${SUDO}" ]; then
cat >&2 <<EOFMSG2
sudo seems to be not well-configured OR you entered your password incorrectly.
configure sudo (read man visudo and run visudo as root) OR run install script as user root.
EOFMSG2
exit 3;
fi
fi
else
SUDO="";
fi

# the next lines will extract the archive and change permissions so all users
# in the group "games" can run the program.
cd ${TARGET};
${SUDO} tar zxf ~user/Desktop/ProfessorFizzwizzleFULL.tar.gz;
${SUDO} chown -R root.games ProfessorFizzwizzleFULL_1.02;
${SUDO} chmod g+r resource.dat;
${SUDO} chmod g+w USERS.DAT;

# Now being root, we'll run the run.sh to configure the game (and produce the
# Professor executable (link it).
${SUDO} bash ./run.sh;

# in the next lines we'll produce a run-instruction professor to launch the game
# provided /usr/local/bin is present in PATH.
sc=/usr/local/bin/professor;
if [ -f ${sc} ]; then
echo "The script ${sc} is already existing.">&2;
echo "No ${sc} shortcut was created.">&2;
else
${SUDO} cat >$sc <<EOSCRIPT
#!/bin/bash
cd /usr/local/games/ProfessorFizzwizzleFULL_1.02;
./Professor $@;
EOSCRIPT
${SUDO} chown root.games ${sc};
${SUDO} chmod 555 ${sc};
echo "Users in group \"games\" now should be able to launch Professor " "Fizzwizzle by executing \"${sc}\" or even only \"`basename ${sc}`\"" " if `dirname ${sc}` makes part of PATH.";
fi

0 Comments:

Post a Comment

<< Home