Author: pebender
Date: Tue Sep 2 06:24:40 2008
New Revision: 3691
Modified:
trunk/gar-minimyth/html/minimyth/document-changelog.txt
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/X11/xinit/xinitrc
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_game_exit
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_game_start
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_term_exit
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_term_start
trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums
trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm
Log:
- Converted the following mm_* scripts to perl:
mm_game_exit
mm_game_start
mm_term_exit
mm_term_start
Modified: trunk/gar-minimyth/html/minimyth/document-changelog.txt
==============================================================================
--- trunk/gar-minimyth/html/minimyth/document-changelog.txt (original)
+++ trunk/gar-minimyth/html/minimyth/document-changelog.txt Tue Sep 2
06:24:40 2008
@@ -1,27 +1,30 @@
MiniMyth Changelog
--------------------------------------------------------------------------------
-Changes since 57 (2008-09-01):
+Changes since 57 (2008-09-02):
Current MythTV versions
MythTV 0.21: version 0.21.0, release-0-21-fixes branch svn 18228.
MythTV trunk: version trunk.18227, trunk svn 18227.
-Added MiniMyth perl package
- - Implements a subset of the functions in /etc/rc.d/functions.
- - More functions will be implemented over time.
+Converted to perl from sh
+ - Added MiniMyth perl package.
+ - Implements the functions in /etc/rc.d/functions.
+ - Added perl init scripts.
+ - sh init scripts are the default.
+ - perl init scripts can be enabled by adding MM_INIT_TYPE=perl to
the
+ boot line.
+ - Converted the following mm_* scripts to perl:
+ mm_game_exit
+ mm_game_start
+ mm_term_exit
+ mm_term_start
+ - Converted web page CGI scripts to perl.
Modified image
- Added g15daemon's g15plugin_clock to help with testing.
-Modified built in web pages
- - Coverted CGI scripts from sh to perl.
-
Modified init
- - Added perl init scripts.
- - sh init scripts are the default.
- - perl init scripts can be enabled by adding MM_INIT_TYPE=perl to
the
- boot line.
- Changed udev rules so that they move /dev/uinput to
/dev/input/uinput.
Modified Linux kernel
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/X11/xinit/xinitrc
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/X11/xinit/xinitrc
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/X11/xinit/xinitrc
Tue Sep 2 06:24:40 2008
@@ -1,7 +1,7 @@
#!/bin/sh
-# Include MiniMyth functions and variables so that they are available for
use.
-. /etc/rc.d/functions
+# Include MiniMyth variables so that they are available for use.
+. /etc/conf
for file in /etc/X11/xinit/xinitrc.d/* ; do
. ${file}
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_game_exit
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_game_exit
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_game_exit
Tue Sep 2 06:24:40 2008
@@ -1,9 +1,14 @@
-#!/bin/sh
+#!/usr/bin/perl
-. /etc/rc.d/functions
+use strict;
+use warnings;
-mm_x_applications_exit ':game'
+require MiniMyth;
-if /usr/bin/test -n "`/bin/pidof mm_ss_suspend`" ; then
- /usr/bin/killall mm_ss_suspend
-fi
+my $minimyth = new MiniMyth;
+
+$minimyth->x_applications_exit({ ':game' => 1 });
+
+$minimyth->application_stop('mm_ss_suspend');
+
+1;
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_game_start
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_game_start
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_game_start
Tue Sep 2 06:24:40 2008
@@ -1,262 +1,266 @@
-#!/bin/sh
+#!/usr/bin/perl
-/usr/bin/test -e /etc/conf && . /etc/conf
+use strict;
+use warnings;
-game_console="${1}"
-game_file="${2}"
+require File::Basename;
+require File::Spec;
+require MiniMyth;
-/usr/bin/mm_ss_suspend "`/usr/bin/basename ${0}`" > /dev/null 2>&1 &
+my $minimyth = new MiniMyth;
-usage()
+my $program = File::Basename::basename(__FILE__);
+my $game_console = shift;
+my $game_file = shift;
+
+################################################################################
+# Game console emulator configurations.
+################################################################################
+my %emulator = ();
+{
+ my $home = $ENV{'HOME'};
+ my $bios_root = $minimyth->var_get('MM_GAME_BIOS_ROOT');
+ my $resolution_x = 0;
+ my $resolution_y = 0;
+ if ($minimyth->var_get('MM_X_MODE') =~ /^([0-9]+)x([0-9]+)[^0-9]*$/)
+ {
+ $resolution_x = $1;
+ $resolution_y = $2;
+ }
+
+ $emulator{'fceu'} =
+ {
+ 'program' => '/usr/bin/fceu',
+ 'argument' => [
+ "-xres $resolution_x",
+ "-yres $resolution_y",
+ '-stretchx 1',
+ '-stretchy 1',
+ '-opengl 1',
+ '-fs 1',
+ '-sound 1',
+ '-soundrate 48000',
+ '-soundvol 100',
+ '-soundq 1',
+ '-soundbufsize 24',
+ '-input1 gamepad',
+ '-input2 gamepad'
+ ]
+ };
+ $emulator{'jzintv'} =
+ {
+ 'program' => '/usr/bin/jzintv',
+ 'argument' => [
+ (-e "$bios_root/intv/exec.bin"
) ? "--execimg=$bios_root/intv/exec.bin" : '',
+ (-e "$bios_root/intv/grom.bin"
) ? "--gromimg=$bios_root/intv/grom.bin" : '',
+ (-e "$bios_root/intv/ecs.bin"
) ? "--ecsimg=$bios_root/intv/ecs.bin" : '',
+ '--fullscreen=1',
+
(-e "$home/.jzintv/kbdhackfile") ? "--kbdhackfile=$home/.jzintv/kbdhackfile" :
'',
+ ]
+ };
+ $emulator{'mednafen'} =
+ {
+ 'program' => '/usr/bin/mednafen',
+ 'argument' => [
+ '-fs 1',
+ '-gb.stretch 1',
+ "-gb.xres $resolution_x",
+ "-gb.yres $resolution_y",
+ ]
+ };
+ $emulator{'stella'} =
+ {
+ 'program' => '/usr/bin/stella',
+ 'argument' => [
+ '-video gl',
+ '-gl_fsmax 1',
+ '-fullscreen 1',
+ '-scale_tia zoom1x',
+ '-scale_ui zoom1x',
+ '-center 1',
+ '-sound 1',
+ '-channels 2',
+ '-freq 48000',
+ '-volume 100',
+ '-clipvol 1'
+ ]
+ };
+ $emulator{'VisualBoyAdvance'} =
+ {
+ 'program' => '/usr/bin/VisualBoyAdvance',
+ 'argument' => [
+ '--fullscreen',
+ '--no-debug'
+ ]
+ };
+ $emulator{'zsnes'} =
+ {
+ 'program' => '/usr/bin/zsnes',
+ 'argument' => [
+ ]
+ };
+}
+
+################################################################################
+# Game console configurations.
+################################################################################
+my %console = ();
+{
+ $console{'a2600'} =
+ {
+ 'description' => 'Atari 2600',
+ 'emulator' => [
+ $emulator{'stella'}
+ ]
+ };
+ $console{'cgb'} =
+ {
+ 'description' => 'Color Game Boy',
+ 'emulator' => [
+ $emulator{'VisualBoyAdvance'},
+ $emulator{'mednafen'}
+ ]
+ };
+ $console{'gb'} =
+ {
+ 'description' => 'Game Boy',
+ 'emulator' => [
+ $emulator{'VisualBoyAdvance'},
+ $emulator{'mednafen'}
+ ]
+ };
+ $console{'gba'} =
+ {
+ 'description' => 'Game Boy Advance',
+ 'emulator' => [
+ $emulator{'VisualBoyAdvance'},
+ $emulator{'mednafen'}
+ ]
+ };
+ $console{'intv'} =
+ {
+ 'description' => 'Intellivision',
+ 'emulator' => [
+ $emulator{'jzintv'}
+ ]
+ };
+ $console{'nes'} =
+ {
+ 'description' => 'Nintendo Entertainment System',
+ 'emulator' => [
+ $emulator{'fceu'},
+ $emulator{'mednafen'}
+ ]
+ };
+ $console{'snes'} =
+ {
+ 'description' => 'Super Nintendo Entertainment System',
+ 'emulator' => [
+ $emulator{'zsnes'}
+ ]
+ };
+}
+
+################################################################################
+# Usage.
+################################################################################
+sub usage()
+{
+ my @usage = ();
+
+ push(@usage, '');
+ push(@usage, 'usage:');
+ push(@usage, ' mm_mythgame_start <game_console> <game_file>');
+ push(@usage, '');
+ push(@usage, 'where:');
+ push(@usage, ' <game_console>:');
+ push(@usage, ' The game console.');
+ push(@usage, ' Valid game consoles are:');
+ my $width = 0;
+ foreach (sort keys %console)
+ {
+ if ($width < length($_)) { $width = length($_); }
+ }
+ foreach (sort keys %console)
+ {
+ my $line = '';
+ $line .= ' ' x 6;
+ $line .= $_;
+ $line .= ' ' x ($width - length($_) + 1);
+ $line .= ':';
+ $line .= ' ';
+ $line .= $console{$_}->{'description'};
+ push(@usage, $line);
+ }
+ push(@usage, ' <game_file>:');
+ push(@usage, ' The game file.');
+ push(@usage, '');
+
+ return [EMAIL PROTECTED];
+}
+
+################################################################################
+# Check arguments.
+################################################################################
+if ((! defined($game_console)) || (! $game_console))
+{
+ die join("\n", '', "error: game console
missing.", '', @{usage()}) . "\n";
+}
+if (! exists($console{$game_console}))
{
- /bin/echo ""
- /bin/echo "usage:"
- /bin/echo " mm_mythgame_start <game_console> <game_file>"
- /bin/echo ""
- /bin/echo "where:"
- /bin/echo " <game_console>:"
- /bin/echo " The game console."
- /bin/echo " Valid game consoles are:"
- /bin/echo " a2600: Atari 2600"
- /bin/echo " cgb : Color Game Boy"
- /bin/echo " gb : Game Boy"
- /bin/echo " gba : Game Boy Advance"
- /bin/echo " intv : Intellivision"
- /bin/echo " nes : Nintendo Entertainment System"
- /bin/echo " snes : Super Nintendo Entertainment System"
- /bin/echo " <game_file>:"
- /bin/echo " The game file."
- /bin/echo ""
+ die join("\n", '', "error: game console $game_console is
unknown.", '', @{usage()}) . "\n";
}
+if ((! defined($game_file)) || (! $game_file))
+{
+ die join("\n", '', "error: game file
missing.", '', @{usage()}) . "\n";
+}
+if (! -e $game_file)
+{
+ die join("\n", '', "error: game file $game_file does not
exist.", '', @{usage()}) . "\n";
+}
+if (! -f $game_file)
+{
+ die join("\n", '', "error: game file $game_file is not a
file.", '', @{usage()}) . "\n";
+}
+if (! -r $game_file)
+{
+ die join("\n", '', "error: game file $game_file cannot be
read.", '', @{usage()}) . "\n";
+}
+
+################################################################################
+# Run emulator.
+################################################################################
+{
+ my $emulator = undef;
+
+ # Find the emulator.
+ foreach (@{$console{$game_console}->{'emulator'}})
+ {
+ if (-e $_->{'program'})
+ {
+ $emulator = $_;
+ last;
+ }
+ }
+ if (! defined($emulator))
+ {
+ die join("\n", '', "error: console name $game_console has no valid
emulator.", '', @{usage()}) . "\n";
+ }
-if /usr/bin/test ! -n "${game_console}" ; then
- /bin/echo ""
- /bin/echo "error: game console missing."
- /bin/echo ""
- usage
- exit 1
-fi
-if /usr/bin/test ! -n "${game_file}" ; then
- /bin/echo ""
- /bin/echo "error: game file missing."
- /bin/echo ""
- usage
- exit 1
-fi
-if /usr/bin/test ! -e "${game_file}" ; then
- /bin/echo ""
- /bin/echo "error: game file ${game_file} does not exist."
- /bin/echo ""
- usage
- exit 1
-fi
-if /usr/bin/test ! -f "${game_file}" ; then
- /bin/echo ""
- /bin/echo "error: game file ${game_file} is not a file."
- /bin/echo ""
- usage
- exit 1
-fi
-if /usr/bin/test ! -r "${game_file}" ; then
- /bin/echo ""
- /bin/echo "error: game file ${game_file} cannot be read."
- /bin/echo ""
- usage
- exit 1
-fi
-
-case ${game_console} in
- a2600)
- if /usr/bin/test -e /usr/bin/stella ; then
- args=
- args="${args} -video gl"
- args="${args} -gl_fsmax 1"
- args="${args} -fullscreen 1"
- args="${args} -scale_tia zoom1x"
- args="${args} -scale_ui zoom1x"
- args="${args} -center 1"
- args="${args} -sound 1"
- args="${args} -channels 2"
- args="${args} -freq 48000"
- args="${args} -volume 100"
- args="${args} -clipvol 1"
- args="${args} -accurate 1"
- /usr/bin/stella ${args} "${game_file}"
- if /usr/bin/test "${MM_GAME_SAVE_ENABLED}" = "yes" ; then
- /usr/bin/mm_run_in_terminal_window /usr/bin/mm_command
game_save
- fi
- else
- /bin/echo ""
- /bin/echo "error: console name ${game_console} has no valid
emulator."
- /bin/echo ""
- exit 1
- fi
- ;;
- cgb)
- if /usr/bin/test -e /usr/bin/VisualBoyAdvance ; then
- args=
- args="${args} --fullscreen"
- args="${args} --no-debug"
- /usr/bin/VisualBoyAdvance ${args} "${game_file}"
- if /usr/bin/test "${MM_GAME_SAVE_ENABLED}" = "yes" ; then
- /usr/bin/mm_run_in_terminal_window /usr/bin/mm_command
game_save
- fi
- elif /usr/bin/test -e /usr/bin/mednafen ; then
- resolution_x=`/bin/echo ${MM_X_RESOLUTION} | /bin/sed
-e 's%\([0-9][0-9]*\)x\([0-9][0-9]*\)%\1%'`
- resolution_y=`/bin/echo ${MM_X_RESOLUTION} | /bin/sed
-e 's%\([0-9][0-9]*\)x\([0-9][0-9]*\)%\2%'`
- args=
- args="${args} -fs 1"
- args="${args} -gb.stretch 1"
- args="${args} -gb.xres ${resolution_x}"
- args="${args} -gb.yres ${resolution_y}"
- /usr/bin/mednafen ${args} "${game_file}"
- if /usr/bin/test "${MM_GAME_SAVE_ENABLED}" = "yes" ; then
- /usr/bin/mm_run_in_terminal_window /usr/bin/mm_command
game_save
- fi
- else
- /bin/echo ""
- /bin/echo "error: console name ${game_console} has no valid
emulator."
- /bin/echo ""
- exit 1
- fi
- ;;
- gb)
- if /usr/bin/test -e /usr/bin/VisualBoyAdvance ; then
- args=
- args="${args} --fullscreen"
- args="${args} --no-debug"
- /usr/bin/VisualBoyAdvance ${args} "${game_file}"
- if /usr/bin/test "${MM_GAME_SAVE_ENABLED}" = "yes" ; then
- /usr/bin/mm_run_in_terminal_window /usr/bin/mm_command
game_save
- fi
- elif /usr/bin/test -e /usr/bin/mednafen ; then
- resolution_x=`/bin/echo ${MM_X_RESOLUTION} | /bin/sed
-e 's%\([0-9][0-9]*\)x\([0-9][0-9]*\)%\1%'`
- resolution_y=`/bin/echo ${MM_X_RESOLUTION} | /bin/sed
-e 's%\([0-9][0-9]*\)x\([0-9][0-9]*\)%\2%'`
- args=
- args="${args} -fs 1"
- args="${args} -gb.stretch 1"
- args="${args} -gb.xres ${resolution_x}"
- args="${args} -gb.yres ${resolution_y}"
- /usr/bin/mednafen ${args} "${game_file}"
- if /usr/bin/test "${MM_GAME_SAVE_ENABLED}" = "yes" ; then
- /usr/bin/mm_run_in_terminal_window /usr/bin/mm_command
game_save
- fi
- else
- /bin/echo ""
- /bin/echo "error: console name ${game_console} has no valid
emulator."
- /bin/echo ""
- exit 1
- fi
- ;;
- gba)
- if /usr/bin/test -e /usr/bin/VisualBoyAdvance ; then
- args=
- args="${args} --fullscreen"
- args="${args} --no-debug"
- /usr/bin/VisualBoyAdvance ${args} "${game_file}"
- if /usr/bin/test "${MM_GAME_SAVE_ENABLED}" = "yes" ; then
- /usr/bin/mm_run_in_terminal_window /usr/bin/mm_command
game_save
- fi
- elif /usr/bin/test -e /usr/bin/mednafen ; then
- resolution_x=`/bin/echo ${MM_X_RESOLUTION} | /bin/sed
-e 's%\([0-9][0-9]*\)x\([0-9][0-9]*\)%\1%'`
- resolution_y=`/bin/echo ${MM_X_RESOLUTION} | /bin/sed
-e 's%\([0-9][0-9]*\)x\([0-9][0-9]*\)%\2%'`
- args=
- args="${args} -fs 1"
- args="${args} -gba.stretch 1"
- args="${args} -gba.xres ${resolution_x}"
- args="${args} -gba.yres ${resolution_y}"
- /usr/bin/mednafen ${args} "${game_file}"
- if /usr/bin/test "${MM_GAME_SAVE_ENABLED}" = "yes" ; then
- /usr/bin/mm_run_in_terminal_window /usr/bin/mm_command
game_save
- fi
- else
- /bin/echo ""
- /bin/echo "error: console name ${game_console} has no valid
emulator."
- /bin/echo ""
- exit 1
- fi
- ;;
- intv)
- if /usr/bin/test -e /usr/bin/jzintv ; then
- args=
- /usr/bin/test -e ${MM_GAME_BIOS_ROOT}/intv/exec.bin &&
args="${args} --execimg=${MM_GAME_BIOS_ROOT}/intv/exec.bin"
- /usr/bin/test -e ${MM_GAME_BIOS_ROOT}/intv/grom.bin &&
args="${args} --gromimg=${MM_GAME_BIOS_ROOT}/intv/grom.bin"
- /usr/bin/test -e ${MM_GAME_BIOS_ROOT}/intv/ecs.bin &&
args="${args} --ecsimg=${MM_GAME_BIOS_ROOT}/intv/ecs.bin"
- args="${args} --fullscreen=1"
- /usr/bin/test -e ${HOME}/.jzintv/kbdhackfile &&
args="${args} --kbdhackfile=${HOME}/.jzintv/kbdhackfile"
- /usr/bin/jzintv ${args} "${game_file}"
- if /usr/bin/test "${MM_GAME_SAVE_ENABLED}" = "yes" ; then
- /usr/bin/mm_run_in_terminal_window /usr/bin/mm_command
game_save
- fi
- else
- /bin/echo ""
- /bin/echo "error: console name ${game_console} has no valid
emulator."
- /bin/echo ""
- exit 1
- fi
- ;;
- nes)
- if /usr/bin/test -e /usr/bin/fceu ; then
- resolution_x=`/bin/echo ${MM_X_RESOLUTION} | /bin/sed
-e 's%\([0-9][0-9]*\)x\([0-9][0-9]*\)%\1%'`
- resolution_y=`/bin/echo ${MM_X_RESOLUTION} | /bin/sed
-e 's%\([0-9][0-9]*\)x\([0-9][0-9]*\)%\2%'`
- args=
- args="${args} -xres ${resolution_x}"
- args="${args} -yres ${resolution_y}"
- args="${args} -stretchx 1"
- args="${args} -stretchy 1"
- args="${args} -opengl 1"
- args="${args} -fs 1"
- args="${args} -sound 1"
- args="${args} -soundrate 48000"
- args="${args} -soundvol 100"
- args="${args} -soundq 1"
- args="${args} -soundbufsize 24"
- args="${args} -input1 gamepad"
- args="${args} -input2 gamepad"
- /usr/bin/fceu ${args} "${game_file}"
- if /usr/bin/test "${MM_GAME_SAVE_ENABLED}" = "yes" ; then
- /usr/bin/mm_run_in_terminal_window /usr/bin/mm_command
game_save
- fi
- elif /usr/bin/test -e /usr/bin/mednafen ; then
- resolution_x=`/bin/echo ${MM_X_RESOLUTION} | /bin/sed
-e 's%\([0-9][0-9]*\)x\([0-9][0-9]*\)%\1%'`
- resolution_y=`/bin/echo ${MM_X_RESOLUTION} | /bin/sed
-e 's%\([0-9][0-9]*\)x\([0-9][0-9]*\)%\2%'`
- args=
- args="${args} -fs 1"
- args="${args} -nes.stretch 1"
- args="${args} -nes.xres ${resolution_x}"
- args="${args} -nes.yres ${resolution_y}"
- /usr/bin/mednafen ${args} "${game_file}"
- if /usr/bin/test "${MM_GAME_SAVE_ENABLED}" = "yes" ; then
- /usr/bin/mm_run_in_terminal_window /usr/bin/mm_command
game_save
- fi
- else
- /bin/echo ""
- /bin/echo "error: console name ${game_console} has no valid
emulator."
- /bin/echo ""
- exit 1
- fi
- ;;
- snes)
- if /usr/bin/test -e /usr/bin/zsnes ; then
- args=
- /usr/bin/zsnes ${args} "${game_file}"
- if /usr/bin/test "${MM_GAME_SAVE_ENABLED}" = "yes" ; then
- /usr/bin/mm_run_in_terminal_window /usr/bin/mm_command
game_save
- fi
- else
- /bin/echo ""
- /bin/echo "error: console name ${game_console} has no valid
emulator."
- /bin/echo ""
- exit 1
- fi
- ;;
- *)
- /bin/echo ""
- /bin/echo "error: console name ${game_console} is not valid."
- /bin/echo ""
- usage
- exit 1
- ;;
-esac
+ # Suspend screen saver while the emulator is running.
+ {
+ my $devnull = File::Spec->devnull;
+ system(qq(/usr/bin/mm_ss_suspend $program > $devnull 2>&1 &));
+ }
+
+ # Run the emulator.
+ system(join(' ', $emulator->{'program'}, @{$emulator->{'argument'}},
qq('$game_file')));
+
+ # Save game settings.
+ if ($minimyth->var_get('MM_GAME_SAVE_ENABLED') eq 'yes')
+ {
+ system(qq(/usr/bin/mm_term_start /usr/bin/mm_command game_save));
+ }
+}
-exit 0
+1;
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_term_exit
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_term_exit
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_term_exit
Tue Sep 2 06:24:40 2008
@@ -1,5 +1,12 @@
-#!/bin/sh
+#!/usr/bin/perl
-for pid in `/bin/pidof rxvt` ; do
- /bin/kill ${pid}
-done
+use strict;
+use warnings;
+
+require MiniMyth;
+
+my $minimyth = new MiniMyth;
+
+$minimyth->application_stop('rxvt');
+
+1;
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_term_start
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_term_start
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_term_start
Tue Sep 2 06:24:40 2008
@@ -1,9 +1,20 @@
-#!/bin/sh
+#!/usr/bin/perl
-/usr/bin/mm_ss_suspend "`/usr/bin/basename ${0}`" > /dev/null 2>&1 &
+use strict;
+use warnings;
-if /usr/bin/test -z "$*" ; then
- /usr/bin/rxvt -display :0.0 -e /bin/sh
-else
- /usr/bin/rxvt -display :0.0 -e "$@"
-fi
+require File::Basename;
+require File::Spec;
+
+my $program = File::Basename::basename(__FILE__);
+my @command = @ARGV || ('/bin/sh');
+
+my $devnull = File::Spec->devnull;
+
+system(qq(/usr/bin/mm_ss_suspend $program > $devnull 2>&1 &));
+
[EMAIL PROTECTED] = ('/usr/bin/rxvt', '-display', ':0.0', '-e', @command);
+
+system(@command);
+
+1;
Modified: trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums
==============================================================================
--- trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums (original)
+++ trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums Tue Sep 2
06:24:40 2008
@@ -1 +1 @@
-0faa45881dc3b5dae05bd7ecc8d4062a download/MiniMyth.pm
+59e3d38930984558a7029d40772ee4c2 download/MiniMyth.pm
Modified: trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm
==============================================================================
--- trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm
(original)
+++ trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm Tue Sep
2 06:24:40 2008
@@ -1978,7 +1978,7 @@
{
my $self = shift;
my $program = shift;
- my $command = shift;
+ my $xmacro = shift;
my $devnull = File::Spec->devnull;
@@ -2012,7 +2012,10 @@
# Send key sequence to window.
if (open(FILE, '|-', "/usr/bin/xmacroplay -d 100 :0.0 >
$devnull 2>&1"))
{
- print FILE $command . "\n";
+ foreach (@{$xmacro})
+ {
+ print FILE $_ . "\n";
+ }
close(FILE);
}
}
@@ -2095,7 +2098,7 @@
{
if ($self->application_running($application))
{
- my $xmacro = '';
+ my @xmacro = ();
given ($application)
{
# Myth
@@ -2116,36 +2119,36 @@
}
}
# Browsers
- when (/^mythbrowser$/) { $xmacro = 'KeyStr Escape\n';
}
+ when (/^mythbrowser$/) { push(@xmacro, 'KeyStr
Escape'); }
# Players
- when (/^mplayer$/) { $xmacro = 'KeyStr Escape\n';
}
- when (/^mplayer-svn$/) { $xmacro = 'KeyStr Escape\n';
}
- when (/^mythtv$/) { $xmacro = 'KeyStr Escape\n';
}
+ when (/^mplayer$/) { push(@xmacro, 'KeyStr
Escape'); }
+ when (/^mplayer-svn$/) { push(@xmacro, 'KeyStr
Escape'); }
+ when (/^mythtv$/) { push(@xmacro, 'KeyStr
Escape'); }
# Does not work because the window name is not 'vlc'.
# when (/^vlc$/)
- {
- $xmacro='KeyStrPress Control_L\n KeyStrPress Q\n
KeyStrRelease Q\n KeyStrRelease Control_L\n';
- }
- when (/^xine$/) { $xmacro = 'KeyStr Q\n';
}
+# {
+# push(@xmacro, 'KeyStrPress Control_L', 'KeyStrPress
Q', 'KeyStrRelease Q', 'KeyStrRelease Control_L');
+# }
+ when (/^xine$/) { push(@xmacro, 'KeyStr
Q'); }
# Games
- when (/^fceu$/) { $xmacro = 'KeyStr Escape\n';
}
- when (/^jzintv$/) { $xmacro = 'KeyStr F1\n';
}
- when (/^mame$/) { $xmacro = 'KeyStr Escape\n';
}
- when (/^mess$/) { $xmacro = 'KeyStr Escape\n';
}
- when (/^mednafen$/) { $xmacro = 'KeyStr Escape\n';
}
+ when (/^fceu$/) { push(@xmacro, 'KeyStr
Escape'); }
+ when (/^jzintv$/) { push(@xmacro, 'KeyStr
F1'); }
+ when (/^mame$/) { push(@xmacro, 'KeyStr
Escape'); }
+ when (/^mess$/) { push(@xmacro, 'KeyStr
Escape'); }
+ when (/^mednafen$/) { push(@xmacro, 'KeyStr
Escape'); }
when (/^stella$/)
{
- $xmacro = 'KeyStrPress Control_L\n KeyStrPress Q\n
KeyStrRelease Q\n KeyStrRelease Control_L\n';
+ push(@xmacro, 'KeyStrPress Control_L', 'KeyStrPress
Q', 'KeyStrRelease Q', 'KeyStrRelease Control_L');
}
- when (/^VisualBoyAdvance$/) { $xmacro = 'KeyStr Escape\n';
}
- when (/^zsnes$/) { $xmacro = 'KeyStr Escape\n
KeyStr Q\n KeyStr Return\n'; }
+ when (/^VisualBoyAdvance$/) { push(@xmacro, 'KeyStr
Escape'); }
+ when (/^zsnes$/) { push(@xmacro, 'KeyStr
Escape', 'KeyStr Q', 'KeyStr Return'); }
# Terminals
# Does not work because rxvt does not have a key sequence to quit. Also,
the window is named 'xterm' not 'rxvt'.
-# when (/^rxvt$/) { $xmacro = '';
}
+# when (/^rxvt$/) {
push(@xmacro, ''); }
}
- if ($xmacro)
+ if (@xmacro)
{
- $self->x_xmacroplay($application, $xmacro);
+ $self->x_xmacroplay($application, [EMAIL PROTECTED]);
if ($self->application_running($application))
{
$self->message_output('error', "failed to
exit '$application'.");
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"minimyth-commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/minimyth-commits?hl=en
-~----------~----~----~----~------~----~------~--~---