зеркало из https://github.com/mozilla/pjs.git
b144551 inconsistent en-mac/en-unix in different platform langenus.xpi files, r=cls, sr=sfraser
This commit is contained in:
Родитель
1a6dec6330
Коммит
aa1dc85b28
|
@ -13,6 +13,29 @@ my $chromeType = $ARGV[2];
|
|||
my $pkgName = $ARGV[3];
|
||||
my $jarFileName = $ARGV[4];
|
||||
|
||||
my $win32 = ($^O =~ /((MS)?win32)|cygwin|os2/i) ? 1 : 0;
|
||||
my $macos = ($^O =~ /MacOS|darwin/i) ? 1 : 0;
|
||||
my $unix = !($win32 || $macos) ? 1 : 0;
|
||||
|
||||
sub foreignPlatformFile
|
||||
{
|
||||
my ($jarfile) = @_;
|
||||
|
||||
if (!$win32 && index($jarfile, "-win") != -1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!$unix && index($jarfile, "-unix") != -1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!$macos && index($jarfile, "-mac") != -1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#print "add-chrome $installedChromeFile $disableJarPackaging $chromeType $pkgName $jarFileName\n";
|
||||
|
||||
my $nofilelocks = 0;
|
||||
|
@ -24,6 +47,8 @@ if ($jarFileName =~ /(.*)\.jar/) {
|
|||
$jarFileName = $1;
|
||||
}
|
||||
|
||||
if (!foreignPlatformFile($jarFileName)) {
|
||||
|
||||
my $line;
|
||||
if ($disableJarPackaging) {
|
||||
$line = "$chromeType,install,url,resource:/chrome/$jarFileName/$chromeType/$pkgName/";
|
||||
|
@ -86,4 +111,5 @@ if ($err) {
|
|||
die "error: can't close $installedChromeFile: $!";
|
||||
}
|
||||
print "+++ adding chrome $installedChromeFile\n+++\t$line\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -77,6 +77,29 @@ if ($verbose) {
|
|||
. "\n";
|
||||
}
|
||||
|
||||
my $win32 = ($^O =~ /((MS)?win32)|cygwin|os2/i) ? 1 : 0;
|
||||
my $macos = ($^O =~ /MacOS|darwin/i) ? 1 : 0;
|
||||
my $unix = !($win32 || $macos) ? 1 : 0;
|
||||
|
||||
sub foreignPlatformFile
|
||||
{
|
||||
my ($jarfile) = @_;
|
||||
|
||||
if (!$win32 && index($jarfile, "-win") != -1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!$unix && index($jarfile, "-unix") != -1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!$macos && index($jarfile, "-mac") != -1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub zipErrorCheck($$)
|
||||
{
|
||||
my ($err,$lockfile) = @_;
|
||||
|
@ -319,7 +342,7 @@ while (<STDIN>) {
|
|||
my $srcPath = defined($2) ? substr($2, 1, -1) : $2;
|
||||
EnsureFileInDir("$chromeDir/$jarfile", $baseFilesDir, $dest, $srcPath, 0);
|
||||
$args = "$args$dest ";
|
||||
if ($autoreg && $dest =~ /([\w\d.\-\_\+]+)\/([\w\d.\-\_\\\/]+)contents.rdf/)
|
||||
if (!foreignPlatformFile($jarfile) && $autoreg && $dest =~ /([\w\d.\-\_\+]+)\/([\w\d.\-\_\\\/]+)contents.rdf/)
|
||||
{
|
||||
my $chrome_type = $1;
|
||||
my $pkg_name = $2;
|
||||
|
@ -330,7 +353,7 @@ while (<STDIN>) {
|
|||
my $srcPath = defined($2) ? substr($2, 1, -1) : $2;
|
||||
EnsureFileInDir("$chromeDir/$jarfile", $baseFilesDir, $dest, $srcPath, 1);
|
||||
$overrides = "$overrides$dest ";
|
||||
if ($autoreg && $dest =~ /([\w\d.\-\_\+]+)\/([\w\d.\-\_\\\/]+)contents.rdf/)
|
||||
if (!foreignPlatformFile($jarfile) && $autoreg && $dest =~ /([\w\d.\-\_\+]+)\/([\w\d.\-\_\\\/]+)contents.rdf/)
|
||||
{
|
||||
my $chrome_type = $1;
|
||||
my $pkg_name = $2;
|
||||
|
|
Загрузка…
Ссылка в новой задаче