3 ###APPAUTHOR: xiaoranzzz
4 ###APPDATE: 2009-06-26 20:30:28
12 #ENV variable MUST be defined somewhere,
13 #FOR perl to search modules from,
15 use lib
$ENV{XR_PERL_MODULE_DIR
};
17 use MyPlace
::Script
::Usage qw
/help_required help_even_empty/;
18 #exit 0 if(help_required($0,@ARGV));
19 exit 0 if(help_even_empty
($0,@ARGV));
21 my $appdir="/myplace/wine/public/apps";
23 $name = "$name.exe" unless($name =~ /\.(:?dll|exe)$/i);
25 print STDERR
"find $appdir -iname $name\n";
26 open FI
,"-|","find",$appdir,"-iname", $name or die("$!\n");
35 print ":@props program matched:\n";
38 printf "[%03d]:%s\n",$idx,$_;
40 print "Please select (1-$idx):";
43 if($idx =~ /^[0-9]+$/ and $idx>=1 and $idx<=@props) {
44 $select = $props[$idx-1];
47 print "Invalid choice.\n";
56 if($select =~ /\.dll$/) {
57 print STDERR
"regsvr32 $select\n";
58 exec "regsvr32",$select;
61 print STDERR
"cn_wine $select\n";
62 exec "cn_wine","$select";