Bug 217531 mozilla .xpi files' install.js has filesize too big
patch by Andrew Schultz <ajschult@eos.ncsu.edu> r=bsmedberg sr=leaf
This commit is contained in:
Родитель
b09d6185e2
Коммит
f6da0f4018
|
@ -94,26 +94,12 @@ sub MakeConfigFile
|
|||
}
|
||||
}
|
||||
|
||||
sub MakeJsFile
|
||||
{
|
||||
my($componentName) = @_;
|
||||
|
||||
# Make .js file
|
||||
if(system("perl makejs.pl $componentName.jst $inDefaultVersion $inStagePath/$componentName") != 0)
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
sub MakeXpiFile
|
||||
{
|
||||
my($componentName) = @_;
|
||||
|
||||
# Make .js file
|
||||
MakeJsFile($componentName);
|
||||
|
||||
# Make .xpi file
|
||||
if(system("perl makexpi.pl $componentName $inStagePath $inDistPath") != 0)
|
||||
if(system("perl makexpi.pl $componentName $inStagePath $inDistPath $inDefaultVersion") != 0)
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -66,6 +66,17 @@ sub RecursiveStrip
|
|||
system("strip @libraryList") if (defined(@libraryList));
|
||||
}
|
||||
|
||||
sub MakeJsFile
|
||||
{
|
||||
my($componentName) = @_;
|
||||
|
||||
# Make .js file
|
||||
if(system("perl makejs.pl $componentName.jst $inDefaultVersion $inStagePath/$componentName install.js") != 0)
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
sub find_libraries
|
||||
{
|
||||
/\.so$/ && push @libraryList, $File::Find::name;
|
||||
|
@ -85,6 +96,7 @@ if($#ARGV < 2)
|
|||
$inComponentName = $ARGV[0];
|
||||
$inStagePath = $ARGV[1];
|
||||
$inDestPath = $ARGV[2];
|
||||
$inDefaultVersion = $ARGV[3];
|
||||
|
||||
# check for existence of staging component path
|
||||
if(!(-e "$inStagePath/$inComponentName"))
|
||||
|
@ -92,12 +104,6 @@ if(!(-e "$inStagePath/$inComponentName"))
|
|||
die "invalid path: $inStagePath/$inComponentName\n";
|
||||
}
|
||||
|
||||
# check for existence of .js script
|
||||
if(!(-e "$inComponentName.js"))
|
||||
{
|
||||
die "missing .js script: $inComponentName.js\n";
|
||||
}
|
||||
|
||||
# delete component .xpi file
|
||||
if(-e "$inDestPath/$inComponentName.xpi")
|
||||
{
|
||||
|
@ -135,7 +141,9 @@ RecursiveStrip(cwd());
|
|||
system("zip -r -y $inDestPath/$inComponentName.xpi *");
|
||||
chdir("$saveCwdir");
|
||||
|
||||
system("cp $inComponentName.js install.js");
|
||||
# Make .js file
|
||||
MakeJsFile($inComponentName);
|
||||
|
||||
system("zip -g $inDestPath/$inComponentName.xpi install.js");
|
||||
|
||||
# delete install.js
|
||||
|
|
Загрузка…
Ссылка в новой задаче