diff --git a/xpinstall/packager/unix/makeall.pl b/xpinstall/packager/unix/makeall.pl index 873200ce344a..bfb16863d635 100755 --- a/xpinstall/packager/unix/makeall.pl +++ b/xpinstall/packager/unix/makeall.pl @@ -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); } diff --git a/xpinstall/packager/unix/makexpi.pl b/xpinstall/packager/unix/makexpi.pl index ff1eb4c8f6ac..b662a43d37c1 100755 --- a/xpinstall/packager/unix/makexpi.pl +++ b/xpinstall/packager/unix/makexpi.pl @@ -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