Add support for using msys perl

Thanks to Howard Chu <hyc@symas.com> for the patch.
Bug #294122 r=cls a=shaver
This commit is contained in:
cls%seawood.org 2005-06-01 14:20:35 +00:00
parent 1229896b01
commit 8312fa228c
5 changed files with 13 additions and 6 deletions

View File

@ -13,7 +13,7 @@ my $chromeType = $ARGV[2];
my $pkgName = $ARGV[3]; my $pkgName = $ARGV[3];
my $jarFileName = $ARGV[4]; my $jarFileName = $ARGV[4];
my $win32 = ($^O =~ /((MS)?win32)|cygwin|os2/i) ? 1 : 0; my $win32 = ($^O =~ /((MS)?win32)|msys|cygwin|os2/i) ? 1 : 0;
my $macos = ($^O =~ /MacOS|darwin/i) ? 1 : 0; my $macos = ($^O =~ /MacOS|darwin/i) ? 1 : 0;
my $unix = !($win32 || $macos) ? 1 : 0; my $unix = !($win32 || $macos) ? 1 : 0;

View File

@ -68,7 +68,7 @@ my $nofilelocks = $flock ? ($flock eq "-l") : 0;
# chrome your platform uses. There are currently three sorts of chrome: # chrome your platform uses. There are currently three sorts of chrome:
# win, mac, and unix. # win, mac, and unix.
my $win32 = ($^O =~ /((MS)?win32)|cygwin|os2/i) ? 1 : 0; my $win32 = ($^O =~ /((MS)?win32)|msys|cygwin|os2/i) ? 1 : 0;
my $macos = ($^O =~ /MacOS|darwin/i) ? 1 : 0; my $macos = ($^O =~ /MacOS|darwin/i) ? 1 : 0;
my $unix = !($win32 || $macos) ? 1 : 0; my $unix = !($win32 || $macos) ? 1 : 0;

View File

@ -152,7 +152,7 @@ if ($verbose) {
. "\n"; . "\n";
} }
my $win32 = ($^O =~ /((MS)?win32)|cygwin|os2/i) ? 1 : 0; my $win32 = ($^O =~ /((MS)?win32)|msys|cygwin|os2/i) ? 1 : 0;
my $macos = ($^O =~ /MacOS|darwin/i) ? 1 : 0; my $macos = ($^O =~ /MacOS|darwin/i) ? 1 : 0;
my $unix = !($win32 || $macos) ? 1 : 0; my $unix = !($win32 || $macos) ? 1 : 0;
my $vms = ($^O =~ /VMS/i) ? 1 : 0; my $vms = ($^O =~ /VMS/i) ? 1 : 0;

View File

@ -112,7 +112,7 @@ sub include {
my $lineout = 0; my $lineout = 0;
while (<FILE>) { while (<FILE>) {
# on cygwin, line endings are screwed up, so normalise them. # on cygwin, line endings are screwed up, so normalise them.
s/[\x0D\x0A]+$/\n/os if ($^O eq 'cygwin' || "$^O" eq "MSWin32"); s/[\x0D\x0A]+$/\n/os if ($^O eq 'msys' || $^O eq 'cygwin' || "$^O" eq "MSWin32");
$stack->newline; $stack->newline;
if (/^\#([a-z]+)\n?$/os) { # argumentless processing instruction if (/^\#([a-z]+)\n?$/os) { # argumentless processing instruction
process($stack, $1); process($stack, $1);

View File

@ -23,6 +23,7 @@
# #
# Contributor(s): # Contributor(s):
# Sean Su <ssu@netscape.com> # Sean Su <ssu@netscape.com>
# Howard Chu <hyc@symas.com>
# #
# Alternatively, the contents of this file may be used under the terms of # Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or # either the GNU General Public License Version 2 or later (the "GPL"), or
@ -310,10 +311,16 @@ sub OutputInstallSize()
print " calculating size for $inPath\n"; print " calculating size for $inPath\n";
my ($inPathWin) = `cygpath -wa $inPath`; my ($inPathWin);
if($^O =~ msys)
{
$inPathWin = $inPath;
} else {
$inPathWin = `cygpath -wa $inPath`;
chomp($inPathWin); chomp($inPathWin);
$inPathWin =~ s/\\/\\\\/g; $inPathWin =~ s/\\/\\\\/g;
$installSize = `$ENV{WIZ_distInstallPath}/ds32.exe /D /L0 /A /S /C 32768 $inPathWin`; }
$installSize = `$ENV{WIZ_distInstallPath}/ds32.exe -D -L0 -A -S -C 32768 $inPathWin`;
$installSize += 32768; # take into account install.js $installSize += 32768; # take into account install.js
$installSize = int($installSize / 1024); $installSize = int($installSize / 1024);
$installSize += 1; $installSize += 1;