зеркало из https://github.com/mozilla/gecko-dev.git
fixing bug 67728 - update installer build process to support urls. r=dveditz,leaf sr=mscott. not part of tinderbox builds. affects only windows
This commit is contained in:
Родитель
8e1d1ab4d9
Коммит
6763be0a44
|
@ -731,12 +731,11 @@ Identifier0=Site0
|
|||
;*** LOCALIZE ME BABY ***
|
||||
Description0=Default
|
||||
;*** LOCALIZE ME BABY ***
|
||||
Domain0=ftp://sweetlou.mcom.com$RedirectServerPath$
|
||||
;Domain0=ftp://ftp.netscape.com/pub/netscape6/english/6_PR3/windows/win32
|
||||
Domain0=$RedirIniUrl$
|
||||
|
||||
Identifier1=Site1
|
||||
;*** LOCALIZE ME BABY ***
|
||||
Description1=North America
|
||||
;*** LOCALIZE ME BABY ***
|
||||
Domain1=ftp://ftp.mozilla.org/pub/mozilla/win32
|
||||
Domain1=$RedirIniUrl$
|
||||
|
||||
|
|
|
@ -36,16 +36,7 @@ if($ENV{MOZ_SRC} eq "")
|
|||
# Make sure there are at least three arguments
|
||||
if($#ARGV < 2)
|
||||
{
|
||||
die "usage: $0 <default version> <staging path> <dist install path>
|
||||
|
||||
default version : y2k compliant based date version.
|
||||
ie: 5.0.0.2000040413
|
||||
|
||||
staging path : full path to where the components are staged at
|
||||
|
||||
dist install path : full path to where the dist install dir is at.
|
||||
ie: d:\\builds\\mozilla\\dist\\win32_o.obj\\install
|
||||
\n";
|
||||
PrintUsage();
|
||||
}
|
||||
|
||||
require "$ENV{MOZ_SRC}\\mozilla\\config\\zipcfunc.pl";
|
||||
|
@ -54,8 +45,20 @@ $inDefaultVersion = $ARGV[0];
|
|||
$inStagePath = $ARGV[1];
|
||||
$inDistPath = $ARGV[2];
|
||||
|
||||
$inRedirIniUrl = "ftp://not.needed.yet.until.release.eng.is.ready";
|
||||
$inXpiURL = "ftp://not.needed.yet.until.release.eng.is.ready";
|
||||
$inXpiURL = "";
|
||||
$inRedirIniURL = "";
|
||||
|
||||
ParseArgv(@ARGV);
|
||||
if($inXpiURL eq "")
|
||||
{
|
||||
# archive url not supplied, set it to default values
|
||||
$inXpiURL = "ftp://not.supplied.com";
|
||||
}
|
||||
if($inRedirIniURL eq "")
|
||||
{
|
||||
# redirect url not supplied, set it to default value.
|
||||
$inRedirIniURL = $inXpiURL;
|
||||
}
|
||||
|
||||
$seiFileNameGeneric = "nsinstall.exe";
|
||||
$seiFileNameSpecific = "mozilla-win32-installer.exe";
|
||||
|
@ -281,19 +284,74 @@ if((!(-e "$ENV{MOZ_SRC}\\redist\\microsoft\\system\\msvcrt.dll")) ||
|
|||
# end of script
|
||||
exit(0);
|
||||
|
||||
sub PrintUsage
|
||||
{
|
||||
die "usage: $0 <default version> <staging path> <dist install path> [options]
|
||||
|
||||
default version : y2k compliant based date version.
|
||||
ie: 5.0.0.2000040413
|
||||
|
||||
staging path : full path to where the components are staged at
|
||||
|
||||
dist install path : full path to where the dist install dir is at.
|
||||
ie: d:\\builds\\mozilla\\dist\\win32_o.obj\\install
|
||||
|
||||
options include:
|
||||
-aurl <archive url> : either ftp:// or http:// url to where the
|
||||
archives (.xpi, .exe, .zip, etc...) reside
|
||||
|
||||
-rurl <redirect.ini url> : either ftp:// or http:// url to where the
|
||||
redirec.ini resides. If not supplied, it
|
||||
will be assumed to be the same as archive
|
||||
url.
|
||||
\n";
|
||||
}
|
||||
|
||||
sub ParseArgv
|
||||
{
|
||||
my(@myArgv) = @_;
|
||||
my($counter);
|
||||
|
||||
# The first 3 arguments are required, so start on the 4th.
|
||||
for($counter = 3; $counter <= $#myArgv; $counter++)
|
||||
{
|
||||
if($myArgv[$counter] =~ /^[-,\/]h$/i)
|
||||
{
|
||||
PrintUsage();
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]aurl$/i)
|
||||
{
|
||||
if($#myArgv >= ($counter + 1))
|
||||
{
|
||||
++$counter;
|
||||
$inXpiURL = $myArgv[$counter];
|
||||
$inRedirIniURL = $inXpiURL;
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]rurl$/i)
|
||||
{
|
||||
if($#myArgv >= ($counter + 1))
|
||||
{
|
||||
++$counter;
|
||||
$inRedirIniURL = $myArgv[$counter];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub MakeConfigFile
|
||||
{
|
||||
# Make config.ini file
|
||||
if(system("perl makecfgini.pl config.it $inDefaultVersion $gLocalTmpStage $inDistPath\\xpi $inRedirIniUrl $inXpiURL"))
|
||||
if(system("perl makecfgini.pl config.it $inDefaultVersion $gLocalTmpStage $inDistPath\\xpi $inRedirIniURL $inXpiURL"))
|
||||
{
|
||||
print "\n Error: perl makecfgini.pl config.it $inDefaultVersion $gLocalTmpStage $inDistPath\\xpi $inRedirIniUrl $inXpiURL\n";
|
||||
print "\n Error: perl makecfgini.pl config.it $inDefaultVersion $gLocalTmpStage $inDistPath\\xpi $inRedirIniURL $inXpiURL\n";
|
||||
return(1);
|
||||
}
|
||||
|
||||
# Make redirect.ini file
|
||||
if(system("perl makecfgini.pl redirect.it $inDefaultVersion $gLocalTmpStage $inDistPath\\xpi $inRedirIniUrl $inXpiURL"))
|
||||
if(system("perl makecfgini.pl redirect.it $inDefaultVersion $gLocalTmpStage $inDistPath\\xpi $inRedirIniURL $inXpiURL"))
|
||||
{
|
||||
print "\n Error: perl makecfgini.pl redirect.it $inDefaultVersion $gLocalTmpStage $inDistPath\\xpi $inRedirIniUrl $inXpiURL\n";
|
||||
print "\n Error: perl makecfgini.pl redirect.it $inDefaultVersion $gLocalTmpStage $inDistPath\\xpi $inRedirIniURL $inXpiURL\n";
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[Site Selector]
|
||||
Site0=ftp://sweetlou.mcom.com/products/client/temp/ssu/moztest
|
||||
Site1=ftp://ftp.mozilla.org/pub/mozilla/win32
|
||||
Site0=$ArchiveUrl$
|
||||
Site1=$ArchiveUrl$
|
||||
|
||||
|
|
|
@ -40,6 +40,21 @@ if($ENV{MOZ_SRC} eq "")
|
|||
exit(1);
|
||||
}
|
||||
|
||||
$inXpiURL = "";
|
||||
$inRedirIniURL = "";
|
||||
|
||||
ParseArgv(@ARGV);
|
||||
if($inXpiURL eq "")
|
||||
{
|
||||
# archive url not supplied, set it to default values
|
||||
$inXpiURL = "ftp://not.supplied.com";
|
||||
}
|
||||
if($inRedirIniURL eq "")
|
||||
{
|
||||
# redirect url not supplied, set it to default value.
|
||||
$inRedirIniURL = $inXpiURL;
|
||||
}
|
||||
|
||||
$DEPTH = "$ENV{MOZ_SRC}\\mozilla";
|
||||
$cwdBuilder = "$DEPTH\\xpinstall\\wizard\\windows\\builder";
|
||||
$cwdBuilder =~ s/\//\\/g; # convert slashes to backslashes for Dos commands to work
|
||||
|
@ -59,9 +74,9 @@ mkdir("$cwdDist\\stage", 775);
|
|||
system("perl $cwdPackager\\pkgcp.pl -s $cwdDistWin -d $cwdDist\\stage -f $cwdPackager\\packages-win -o dos -v");
|
||||
|
||||
chdir("$cwdPackager\\windows");
|
||||
if(system("perl makeall.pl $ver $cwdDist\\stage $cwdDistWin\\install"))
|
||||
if(system("perl makeall.pl $ver $cwdDist\\stage $cwdDistWin\\install -aurl $inXpiURL -rurl $inRedirIniURL"))
|
||||
{
|
||||
print "\n Error: perl makeall.pl $ver $cwdDist\\stage $cwdDistWin\\install\n";
|
||||
print "\n Error: perl makeall.pl $ver $cwdDist\\stage $cwdDistWin\\install $inXpiURL $inRedirIniURL\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -92,6 +107,57 @@ print "\n";
|
|||
|
||||
exit(0);
|
||||
|
||||
sub PrintUsage
|
||||
{
|
||||
die "usage: $0 [options]
|
||||
|
||||
options available are:
|
||||
|
||||
-h - this usage.
|
||||
|
||||
-aurl - ftp or http url for where the archives (.xpi, exe, .zip, etx...) are.
|
||||
ie: ftp://my.ftp.com/mysoftware/version1.0/xpi
|
||||
|
||||
-rurl - ftp or http url for where the redirect.ini file is located at.
|
||||
ie: ftp://my.ftp.com/mysoftware/version1.0
|
||||
|
||||
This url can be the same as the archive url.
|
||||
If -rurl is not supplied, it will be assumed that the redirect.ini
|
||||
file is at -arul.
|
||||
\n";
|
||||
}
|
||||
|
||||
sub ParseArgv
|
||||
{
|
||||
my(@myArgv) = @_;
|
||||
my($counter);
|
||||
|
||||
for($counter = 0; $counter <= $#myArgv; $counter++)
|
||||
{
|
||||
if($myArgv[$counter] =~ /^[-,\/]h$/i)
|
||||
{
|
||||
PrintUsage();
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]aurl$/i)
|
||||
{
|
||||
if($#myArgv >= ($counter + 1))
|
||||
{
|
||||
++$counter;
|
||||
$inXpiURL = $myArgv[$counter];
|
||||
$inRedirIniURL = $inXpiURL;
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]rurl$/i)
|
||||
{
|
||||
if($#myArgv >= ($counter + 1))
|
||||
{
|
||||
++$counter;
|
||||
$inRedirIniURL = $myArgv[$counter];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub GetCwd
|
||||
{
|
||||
my($whichPath, $depthPath, $returnCwd) = @_;
|
||||
|
|
Загрузка…
Ссылка в новой задаче