зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
1aa68fd152
Коммит
51aea1c159
|
@ -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
|
sub MakeXpiFile
|
||||||
{
|
{
|
||||||
my($componentName) = @_;
|
my($componentName) = @_;
|
||||||
|
|
||||||
# Make .js file
|
|
||||||
MakeJsFile($componentName);
|
|
||||||
|
|
||||||
# Make .xpi file
|
# Make .xpi file
|
||||||
if(system("perl makexpi.pl $componentName $inStagePath $inDistPath") != 0)
|
if(system("perl makexpi.pl $componentName $inStagePath $inDistPath $inDefaultVersion") != 0)
|
||||||
{
|
{
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,17 @@ sub RecursiveStrip
|
||||||
system("strip @libraryList") if (defined(@libraryList));
|
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
|
sub find_libraries
|
||||||
{
|
{
|
||||||
/\.so$/ && push @libraryList, $File::Find::name;
|
/\.so$/ && push @libraryList, $File::Find::name;
|
||||||
|
@ -85,6 +96,7 @@ if($#ARGV < 2)
|
||||||
$inComponentName = $ARGV[0];
|
$inComponentName = $ARGV[0];
|
||||||
$inStagePath = $ARGV[1];
|
$inStagePath = $ARGV[1];
|
||||||
$inDestPath = $ARGV[2];
|
$inDestPath = $ARGV[2];
|
||||||
|
$inDefaultVersion = $ARGV[3];
|
||||||
|
|
||||||
# check for existence of staging component path
|
# check for existence of staging component path
|
||||||
if(!(-e "$inStagePath/$inComponentName"))
|
if(!(-e "$inStagePath/$inComponentName"))
|
||||||
|
@ -92,12 +104,6 @@ if(!(-e "$inStagePath/$inComponentName"))
|
||||||
die "invalid path: $inStagePath/$inComponentName\n";
|
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
|
# delete component .xpi file
|
||||||
if(-e "$inDestPath/$inComponentName.xpi")
|
if(-e "$inDestPath/$inComponentName.xpi")
|
||||||
{
|
{
|
||||||
|
@ -135,7 +141,9 @@ RecursiveStrip(cwd());
|
||||||
system("zip -r -y $inDestPath/$inComponentName.xpi *");
|
system("zip -r -y $inDestPath/$inComponentName.xpi *");
|
||||||
chdir("$saveCwdir");
|
chdir("$saveCwdir");
|
||||||
|
|
||||||
system("cp $inComponentName.js install.js");
|
# Make .js file
|
||||||
|
MakeJsFile($inComponentName);
|
||||||
|
|
||||||
system("zip -g $inDestPath/$inComponentName.xpi install.js");
|
system("zip -g $inDestPath/$inComponentName.xpi install.js");
|
||||||
|
|
||||||
# delete install.js
|
# delete install.js
|
||||||
|
|
Загрузка…
Ссылка в новой задаче