3 # create_Info_plist.pl: generate Info.plist from a template and a
4 # list of supported readers
6 # Copyright (C) 2004-2009 Ludovic Rousseau <ludovic.rousseau@free.fr>
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
27 my (@manuf, @product, @name);
28 my ($manuf, $product, $name);
29 my $target = "libccid.so";
30 my $version = "1.0.0";
31 my $class = "<key>CFBundleName</key>
32 <string>CCIDCLASSDRIVER</string>";
36 "target=s" => \$target,
37 "version=s" => \$version,
38 "no-class" => \$noclass);
42 print "usage: $0 supported_readers.txt Info.plist
44 --version=$version\n";
48 open IN, "< $ARGV[0]" or die "Can't open $ARGV[0]: $!";
55 ($manuf, $product, $name) = split /:/;
56 # print "m: $manuf, p: $product, n: $name\n";
58 push @product, $product;
64 map { $_ = "\t\t<string>$_</string>\n" } @manuf;
65 map { $_ = "\t\t<string>$_</string>\n" } @product;
66 map { $_ = "\t\t<string>$_</string>\n" } @name;
68 open IN, "< $ARGV[1]" or die "Can't open $ARGV[1]: $!";
82 if (m/MAGIC_FRIENDLYNAME/)
89 s/MAGIC_TARGET/$target/;
95 s/MAGIC_VERSION/$version/;
103 s/MAGIC_CLASS/$class/;