3
#############################################################################
4
# This script will create a special development build meant only for upload #
6
#############################################################################
10
use lib qw(buildtools);
13
sub Packager::fixLocales() {}
15
my $manifest = readFile("chrome.manifest");
16
unless ($manifest =~ /\bjar:chrome\/(\S+?)\.jar\b/)
18
die "Could not find JAR file name in chrome.manifest";
23
$params{version} = shift @ARGV;
24
die "Please specify version number on command line" unless $params{version};
26
my $xpiFile = "$baseName-$params{version}.xpi";
28
my $pkg = Packager->new(\%params);
29
$pkg->readLocales('chrome/locale', 1);
30
$pkg->readLocaleData('chrome/locale');
33
$pkg->makeJAR("$baseName.jar", 'content', 'skin', 'locale', '-/tests', '-/mochitest', '-/.incomplete');
36
my @files = grep {-e $_} ('components', 'defaults', 'install.rdf', 'chrome.manifest', 'icon.png');
39
$pkg->{postprocess_line} = \&postprocessInstallRDF;
40
$pkg->makeXPI($xpiFile, "chrome/$baseName.jar", @files);
41
unlink("chrome/$baseName.jar");
43
sub postprocessInstallRDF
45
my ($file, $line) = @_;
47
return $line unless $file eq "install.rdf";
49
if ($line =~ /\btargetApplication\b/)
52
return "" if $targetAppNum > 6;
55
return "" if $targetAppNum > 6 && $targetAppNum % 2 == 1;
64
open(local *FILE, "<", $file) || die "Could not read file '$file'";