[SCM] Atari 2600 Emulator for SDL & the X Window System branch, master, updated. debian/3.2-1-11-g39038ae
Stephen Kitt
steve at sk2.org
Sat Sep 4 22:38:11 UTC 2010
The following commit has been merged in the master branch:
commit 6affc761e1a2ad3e2d3c3f46956fd20a87382069
Author: Stephen Kitt <steve at sk2.org>
Date: Sat Sep 4 00:03:53 2010 +0200
/etc/stella.pro is no longer available, so use stella -listrominfo instead. Also handle ~/.stella directory correctly.
diff --git a/debian/debian-menus b/debian/debian-menus
index 8b7cc25..e218cce 100755
--- a/debian/debian-menus
+++ b/debian/debian-menus
@@ -7,49 +7,53 @@ my $DEBUG=($1 || 1) if($ARGV[0]=~m/^-d(\d*)$/);
my $MD5='/usr/bin/md5sum';
my $USER=$>;
-my $STHOME=(getpwuid($USER))[7]."/.stella/roms";
+my $STHOME=(getpwuid($USER))[7]."/.stella";
my $PRO="$STHOME/stella.pro";
-$PRO="/etc/stella.pro" if(!$USER or ! -e $PRO);
+$PRO="stella -listrominfo |" if(!$USER or ! -e $PRO);
my @ROMPATHS=qw(/usr/lib/games/stella/roms);
-push(@ROMPATHS, $STHOME) if($USER and -d $STHOME);
+push(@ROMPATHS, $STHOME."/roms") if($USER and -d $STHOME."/roms");
my(%sums,$sum)=();
print "Using properties file: $PRO\n" if($DEBUG);
open(PRO, $PRO);
while(<PRO>) {
- $sum=$1 if(m/^"Cartridge\.MD5"\s+"(.*)"\s*$/);
- next if(!m/^"Cartridge\.Name"\s+"(.*)"\s*$/);
- next if(!length $sum);
- $sums{$sum}=$1;
- $sum='';
+ if (m/^([0-9a-f]+)\|([^\|]+)\|.*$/) {
+ $sums{$1} = $2;
+ } else {
+ $sum=$1 if(m/^"Cartridge\.MD5"\s+"(.*)"\s*$/);
+ next if(!m/^"Cartridge\.Name"\s+"(.*)"\s*$/);
+ next if(!length $sum);
+ $sums{$sum}=$1;
+ $sum='';
+ }
}
close(PRO);
my(%ents)=();
foreach $path (@ROMPATHS) {
- print "Scanning $path for ROM images.\n" if($DEBUG);
- chdir $path;
- opendir(DIR, ".");
- foreach $dent (readdir DIR) {
- next if($dent!~m/\.bin$/i);
- open(SUM, "-|") or exec($MD5, $dent);
- $sum=<SUM>;
- $sum=~s/ .*//s;
- close(SUM);
- my($name)=($sums{$sum});
- if(length $name) {
- print "Found $name\n" if($DEBUG > 1);
- $ents{$name}=sprintf(<<MENU, $name, "$path/$dent");
+ print "Scanning $path for ROM images.\n" if($DEBUG);
+ chdir $path;
+ opendir(DIR, ".");
+ foreach $dent (readdir DIR) {
+ next if($dent!~m/\.bin$/i);
+ open(SUM, "-|") or exec($MD5, $dent);
+ $sum=<SUM>;
+ $sum=~s/ .*//s;
+ close(SUM);
+ my($name)=($sums{$sum});
+ if(length $name) {
+ print "Found $name\n" if($DEBUG > 1);
+ $ents{$name}=sprintf(<<MENU, $name, "$path/$dent");
?package(stella):needs=x11 \\
section="Games/Arcade/Stella" \\
title="%s" \\
command="/usr/bin/stella %s"
MENU
+ }
}
- }
- closedir(DIR);
+ closedir(DIR);
}
my $MENU=(getpwuid($USER))[7]."/.menu/stella";
--
Atari 2600 Emulator for SDL & the X Window System
More information about the Pkg-games-commits
mailing list