зеркало из https://github.com/mozilla/pjs.git
fixing bug 162079 - installer: lack of objdir support. r=seawood/sr=leaf
This commit is contained in:
Родитель
d322964941
Коммит
caf31c8560
|
@ -160,7 +160,7 @@ sub GetAbsPath
|
|||
}
|
||||
|
||||
# verify the existance of path
|
||||
if(!$_path)
|
||||
if(!defined($_path))
|
||||
{
|
||||
die " StageUtils::GetAbsPath::unrecognized path to locate: $aWhichPath\n";
|
||||
}
|
||||
|
@ -210,6 +210,12 @@ sub CreateStage
|
|||
next if(-d "$aDirDistPackagesProductName/$file");
|
||||
$processedAFile = 1;
|
||||
print "\n\n pkg file: $file (located in $aDirDistPackagesProductName)\n\n";
|
||||
|
||||
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
|
||||
{
|
||||
print "\n calling \"$dirMozPackager/pkgcp.pl\" -s \"$aDirSrcDist\" -d \"$aDirStageProductName\" -f \"$aDirDistPackagesProductName/$file\" -o $aOs -v\n\n";
|
||||
}
|
||||
|
||||
system("perl \"$dirMozPackager/pkgcp.pl\" -s \"$aDirSrcDist\" -d \"$aDirStageProductName\" -f \"$aDirDistPackagesProductName/$file\" -o $aOs -v");
|
||||
}
|
||||
closedir($SDIR);
|
||||
|
@ -281,7 +287,7 @@ sub GeneratePackagesFromSinglePackage
|
|||
}
|
||||
|
||||
# To retrieve a build id ($aDefine) from $aBuildIDFile (normally
|
||||
# mozilla/config/nsBuildID.h).
|
||||
# $topobjdir/dist/include/nsBuildID.h).
|
||||
sub GetProductBuildID
|
||||
{
|
||||
my($aBuildIDFile, $aDefine) = @_;
|
||||
|
@ -289,6 +295,13 @@ sub GetProductBuildID
|
|||
my($buildID);
|
||||
my($fpInIt);
|
||||
|
||||
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
|
||||
{
|
||||
print " GetProductBuildID\n";
|
||||
print " aBuildIDFile : $aBuildIDFile\n";
|
||||
print " aDefine : $aDefine\n";
|
||||
}
|
||||
|
||||
if(!(-e $aBuildIDFile))
|
||||
{
|
||||
die "\n file not found: $aBuildIDFile\n";
|
||||
|
@ -320,15 +333,23 @@ sub GetProductBuildID
|
|||
# * Use mozilla's milestone version for 1st 2 numbers of version x.x.x.x.
|
||||
# * DO NOT Strip out any non numerical chars from mozilla's milestone
|
||||
# version.
|
||||
# * Get the y2k ID from mozilla/config/nsBuildID.h.
|
||||
# * Get the y2k ID from Mozilla's $topobjdir/dist/include/nsBuildID.h. It
|
||||
# has to be from Mozilla because GRE is from Mozilla.
|
||||
# * Build the GRE special ID given the following:
|
||||
# mozilla milestone: 1.4a
|
||||
# mozilla buildID.h: 2003030510
|
||||
# GRE Special ID : 1.4a_2003030510
|
||||
sub GetGreSpecialID
|
||||
{
|
||||
my($aDirMozTopSrc) = @_;
|
||||
my($fileBuildID) = "$aDirMozTopSrc/config/nsBuildID.h";
|
||||
my($aDirMozTopObj) = @_;
|
||||
my($fileBuildID) = "$aDirMozTopObj/dist/include/nsBuildID.h";
|
||||
|
||||
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
|
||||
{
|
||||
print " GetGreSpecialID\n";
|
||||
print " aDirMozTopObj : $aDirMozTopObj\n";
|
||||
print " fileBuildID : $fileBuildID\n";
|
||||
}
|
||||
|
||||
return(GetProductBuildID($fileBuildID, "GRE_BUILD_ID"));
|
||||
}
|
||||
|
@ -337,7 +358,7 @@ sub GetGreSpecialID
|
|||
# To build GRE's file version as follows:
|
||||
# * Use mozilla's milestone version for 1st 2 numbers of version x.x.x.x.
|
||||
# * Strip out any non numerical chars from mozilla's milestone version.
|
||||
# * Get the y2k ID from mozilla/config/nsBuildID.h.
|
||||
# * Get the y2k ID from $topobjdir/dist/include/nsBuildID.h.
|
||||
# * Split the y2k ID exactly in 2 equal parts and use them for the last
|
||||
# 2 numbers of the version x.x.x.x.
|
||||
# ie: y2k: 2003030510
|
||||
|
@ -354,14 +375,23 @@ sub GetGreSpecialID
|
|||
# GRE version: 1.4.20030.30510
|
||||
sub GetGreFileVersion
|
||||
{
|
||||
my($aDirMozTopSrc) = @_;
|
||||
my($fileBuildID) = "$aDirMozTopSrc/config/nsBuildID.h";
|
||||
my($aDirTopObj, $aDirMozTopSrc) = @_;
|
||||
my($fileBuildID) = "$aDirTopObj/dist/include/nsBuildID.h";
|
||||
|
||||
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
|
||||
{
|
||||
print " GetGreFileVersion\n";
|
||||
print " aDirTopObj : $aDirTopObj\n";
|
||||
print " aDirMozTopSrc : $aDirMozTopSrc\n";
|
||||
print " fileBuildID : $fileBuildID\n";
|
||||
}
|
||||
|
||||
my($initEmptyValues) = 1;
|
||||
my(@version) = undef;
|
||||
my($y2kDate) = undef;
|
||||
my($buildID_hi) = undef;
|
||||
my($buildID_lo) = undef;
|
||||
my($versionMilestone) = GetProductMilestoneVersion($aDirMozTopSrc, $aDirMozTopSrc, $initEmptyValues);
|
||||
my($versionMilestone) = GetProductMilestoneVersion($aDirTopObj, $aDirMozTopSrc, $aDirMozTopSrc, $initEmptyValues);
|
||||
|
||||
$versionMilestone =~ s/[^0-9.][^.]*//g; # Strip out non numerical chars from versionMilestone.
|
||||
@version = split /\./, $versionMilestone;
|
||||
|
@ -396,19 +426,33 @@ sub GetGreFileVersion
|
|||
# The milestone version is acquired from [topsrcdir]/config/milestone.txt
|
||||
sub GetProductMilestoneVersion
|
||||
{
|
||||
my($aDirMozTopSrc, $aDirConfigTopSrc, $initEmptyValues) = @_;
|
||||
my($aDirTopObj, $aDirMozTopSrc, $aDirConfigTopSrc, $initEmptyValues) = @_;
|
||||
my($y2kDate) = undef;
|
||||
my($versionMilestone) = undef;
|
||||
my($counter) = undef;
|
||||
my(@version) = undef;
|
||||
my($saveCwd) = cwd();
|
||||
|
||||
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
|
||||
{
|
||||
print " GetProductMileStoneVersion\n";
|
||||
print " aDirTopObj : $aDirTopObj\n";
|
||||
print " aDirMozTopSrc : $aDirMozTopSrc\n";
|
||||
print " aDirConfigTopSrc: $aDirConfigTopSrc\n";
|
||||
}
|
||||
|
||||
chdir("$aDirMozTopSrc/config");
|
||||
$versionMilestone = `perl milestone.pl --topsrcdir $aDirConfigTopSrc`;
|
||||
|
||||
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
|
||||
{
|
||||
print " versionMilestone: $versionMilestone\n";
|
||||
}
|
||||
|
||||
chop($versionMilestone);
|
||||
chdir($saveCwd);
|
||||
|
||||
if(($initEmptyValues ne undef) && ($initEmptyValues eq 1))
|
||||
if(defined($initEmptyValues) && ($initEmptyValues eq 1))
|
||||
{
|
||||
@version = split /\./, $versionMilestone;
|
||||
|
||||
|
@ -425,7 +469,9 @@ sub GetProductMilestoneVersion
|
|||
# Retrieves the products's milestone version from either the ns tree or the
|
||||
# mozilla tree.
|
||||
#
|
||||
# It will also use the y2k compliant build id from mozilla/config/nsBuildID.h
|
||||
# However, it will use the y2k compliant build id only from:
|
||||
# .../mozilla/dist/include/nsBuildID.h
|
||||
#
|
||||
# in the last value:
|
||||
# ie: milestone.txt : 1.4a
|
||||
# nsBuildID.h : 2003030510
|
||||
|
@ -434,12 +480,24 @@ sub GetProductMilestoneVersion
|
|||
# The milestone version is acquired from [topsrcdir]/config/milestone.txt
|
||||
sub GetProductY2KVersion
|
||||
{
|
||||
my($aDirMozTopSrc, $aDirConfigTopSrc) = @_;
|
||||
my($fileBuildID) = "$aDirMozTopSrc/config/nsBuildID.h";
|
||||
my($aDirTopObj, $aDirMozTopSrc, $aDirConfigTopSrc, $aDirMozTopObj) = @_;
|
||||
|
||||
$aDirMozTopObj = $aDirTopObj if(!defined($aDirMozTopObj));
|
||||
|
||||
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
|
||||
{
|
||||
print " GetProductY2KVersion\n";
|
||||
print " aDirTopObj : $aDirTopObj\n";
|
||||
print " aDirMozTopObj : $aDirMozTopObj\n";
|
||||
print " aDirMozTopSrc : $aDirMozTopSrc\n";
|
||||
print " aDirConfigTopSrc: $aDirConfigTopSrc\n";
|
||||
}
|
||||
|
||||
my($fileBuildID) = "$aDirMozTopObj/dist/include/nsBuildID.h";
|
||||
my($initEmptyValues) = 1;
|
||||
my(@version) = undef;
|
||||
my($y2kDate) = undef;
|
||||
my($versionMilestone) = GetProductMilestoneVersion($aDirMozTopSrc, $aDirConfigTopSrc, $initEmptyValues);
|
||||
my($versionMilestone) = GetProductMilestoneVersion($aDirTopObj, $aDirMozTopSrc, $aDirConfigTopSrc, $initEmptyValues);
|
||||
|
||||
@version = split /\./, $versionMilestone;
|
||||
$y2kDate = GetProductBuildID($fileBuildID, "NS_BUILD_ID");
|
||||
|
|
|
@ -49,6 +49,7 @@ use File::Path;
|
|||
use File::Basename;
|
||||
use IO::Handle;
|
||||
|
||||
$DEPTH = "../../";
|
||||
$gDirScripts = dirname($0); # directory of the running script
|
||||
$gDirScripts =~ s/\\/\//g;
|
||||
$gDirCwd = cwd();
|
||||
|
@ -62,12 +63,26 @@ $gOsPkg = undef;
|
|||
$inProductName = undef;
|
||||
$inStagingScript = undef;
|
||||
$inOs = undef;
|
||||
$gDirMozRoot = StageUtils::GetAbsPath("moz_root");
|
||||
$inDirDestStage = "$gDirMozRoot/stage";
|
||||
|
||||
ParseArgV(@ARGV);
|
||||
|
||||
$inDirSrcDist = StageUtils::GetAbsPath("moz_dist") if !defined($inDirSrcDist);
|
||||
if(!defined($topobjdir))
|
||||
{
|
||||
chdir($DEPTH);
|
||||
$topobjdir = cwd();
|
||||
chdir($gDirCwd);
|
||||
}
|
||||
|
||||
$inDirDestStage = "$topobjdir/stage" if !defined($inDirDestStage);
|
||||
$inDirSrcDist = "$topobjdir/dist" if !defined($inDirSrcDist);
|
||||
|
||||
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
|
||||
{
|
||||
print "\n make_stage.pl\n";
|
||||
print " topobjdir : $topobjdir\n";
|
||||
print " gDirCwd : $gDirCwd\n";
|
||||
print " inDirDestStage: $inDirDestStage\n";
|
||||
print " inDirSrcDist : $inDirSrcDist\n";
|
||||
}
|
||||
|
||||
if(!$inProductName || !$inOs)
|
||||
{
|
||||
|
@ -129,6 +144,15 @@ sub ParseArgV
|
|||
{
|
||||
PrintUsage();
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]objDir$/i)
|
||||
{
|
||||
if($#myArgv >= ($counter + 1))
|
||||
{
|
||||
++$counter;
|
||||
$topobjdir = $myArgv[$counter];
|
||||
$topobjdir =~ s/\\/\//g;
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]dd$/i)
|
||||
{
|
||||
if($#myArgv >= ($counter + 1))
|
||||
|
|
|
@ -47,6 +47,19 @@ sub StageProduct
|
|||
my($dirMozRoot) = StageUtils::GetAbsPath("moz_root");
|
||||
my($dirMozPackager) = StageUtils::GetAbsPath("moz_packager");
|
||||
|
||||
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
|
||||
{
|
||||
print "\n stage_mozilla.pl\n";
|
||||
print " aDirSrcDist : $aDirSrcDist\n";
|
||||
print " aDirStage : $aDirStage\n";
|
||||
print " aProductName : $aProductName\n";
|
||||
print " aOsPkg : $aOsPkg\n";
|
||||
print " dirDistPackagesProductName : $dirDistPackagesProductName\n";
|
||||
print " dirStageProductName : $dirStageProductName\n";
|
||||
print " dirMozRoot : $dirMozRoot\n";
|
||||
print " dirMozPackager : $dirMozPackager\n";
|
||||
}
|
||||
|
||||
StageUtils::CleanupStage($aDirStage, $aProductName);
|
||||
StageUtils::CleanupDistPackages("$aDirSrcDist/packages", $aProductName);
|
||||
StageUtils::CopyAdditionalPackage("$dirMozPackager/xpcom-win.pkg", $dirDistPackagesProductName);
|
||||
|
|
|
@ -38,26 +38,30 @@ push(@INC, "$topsrcdir/xpinstall/packager");
|
|||
require StageUtils;
|
||||
require "$topsrcdir/config/zipcfunc.pl";
|
||||
|
||||
$inDefaultProductVersion = StageUtils::GetProductY2KVersion($topsrcdir, $topsrcdir);
|
||||
# The mozilla's milestone is the same as the GRE's milestone version.
|
||||
# initEmptyValues indicates to GetProductMilestoneVersion() whether or not to
|
||||
# prefill the missing version values with '0's:
|
||||
# ie: if milestone version is 1.4a
|
||||
# initEmptyValues dictate whether is should be 1.4a.0.0 or not.
|
||||
$initEmptyValues = 1;
|
||||
$inDefaultGreVersion = StageUtils::GetProductMilestoneVersion($topsrcdir, $topsrcdir, $initEmptyValues);
|
||||
$inStagePath = "$topsrcdir/stage";
|
||||
$inDistPath = "$topsrcdir/dist";
|
||||
$inXpiURL = "ftp://not.supplied.invalid";
|
||||
$inRedirIniURL = $inXpiURL;
|
||||
|
||||
ParseArgv(@ARGV);
|
||||
|
||||
$topobjdir = $topsrcdir if !defined($topobjdir);
|
||||
$inStagePath = "$topobjdir/stage" if !defined($inStagePath);
|
||||
$inDistPath = "$topobjdir/dist" if !defined($inDistPath);
|
||||
$inXpiURL = "ftp://not.supplied.invalid" if !defined($inXpiURL);
|
||||
$inRedirIniURL = $inXpiURL if !defined($inRedirIniURL);
|
||||
|
||||
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
|
||||
{
|
||||
print " win_gre/makeall.pl\n";
|
||||
print " topobjdir: $topobjdir\n";
|
||||
print " topsrcdir: $topsrcdir\n";
|
||||
print " inStagePath: $inStagePath\n";
|
||||
print " inDistPath : $inDistPath\n";
|
||||
}
|
||||
|
||||
$gDefaultProductVersion = StageUtils::GetProductY2KVersion($topobjdir, $topsrcdir, $topsrcdir);
|
||||
|
||||
print "\n";
|
||||
print " Building GRE\n";
|
||||
print " Raw version id : $inDefaultProductVersion\n";
|
||||
print " Raw version id : $gDefaultProductVersion\n";
|
||||
|
||||
# $inDefaultGreVersion has the form maj.min.release.bld where maj, min, release
|
||||
# $gDefaultProductVersion has the form maj.min.release.bld where maj, min, release
|
||||
# and bld are numerics representing version information.
|
||||
# Other variables need to use parts of the version info also so we'll
|
||||
# split out the dot separated values into the array @versionParts
|
||||
|
@ -67,16 +71,16 @@ print " Raw version id : $inDefaultProductVersion\n";
|
|||
# $versionParts[1] = min
|
||||
# $versionParts[2] = release
|
||||
# $versionParts[3] = bld
|
||||
@versionParts = split /\./, $inDefaultProductVersion;
|
||||
@versionParts = split /\./, $gDefaultProductVersion;
|
||||
|
||||
# We allow non-numeric characters to be included as the last
|
||||
# characters in fields of $inDefaultProductVersion for display purposes (mostly to
|
||||
# characters in fields of $gDefaultProductVersion for display purposes (mostly to
|
||||
# show that we have moved past a certain version by adding a '+'
|
||||
# character). Non-numerics must be stripped out of $inDefaultProductVersion,
|
||||
# character). Non-numerics must be stripped out of $gDefaultProductVersion,
|
||||
# however, since this variable is used to identify the the product
|
||||
# for comparison with other installations, so the values in each field
|
||||
# must be numeric only:
|
||||
$inDefaultProductVersion =~ s/[^0-9.][^.]*//g;
|
||||
$gDefaultProductVersion =~ s/[^0-9.][^.]*//g;
|
||||
|
||||
# set environment vars for use by other .pl scripts called from this script.
|
||||
if($versionParts[2] eq "0")
|
||||
|
@ -88,7 +92,7 @@ else
|
|||
$versionMain = "$versionParts[0].$versionParts[1].$versionParts[2]";
|
||||
}
|
||||
print " Display version : $versionMain\n";
|
||||
print " Xpinstall version: $inDefaultProductVersion\n";
|
||||
print " Xpinstall version: $gDefaultProductVersion\n";
|
||||
print "\n";
|
||||
|
||||
$gDirPackager = "$topsrcdir/xpinstall/packager";
|
||||
|
@ -96,7 +100,7 @@ $gDirDistInstall = "$inDistPath/inst_gre";
|
|||
$gDirStageProduct = "$inStagePath/gre";
|
||||
|
||||
# Create the stage area here.
|
||||
# If -sd is not used, the default stage dir will be: $topsrcdir/stage
|
||||
# If -sd is not used, the default stage dir will be: $topobjdir/stage
|
||||
if(system("perl \"$gDirPackager/make_stage.pl\" -pn gre -os win -sd \"$inStagePath\" -dd \"$inDistPath\""))
|
||||
{
|
||||
die "\n Error: perl \"$gDirPackager/make_stage.pl\" -pn gre -os win -sd \"$inStagePath\" -dd \"$inDistPath\"\n";
|
||||
|
@ -122,19 +126,26 @@ $ENV{WIZ_userAgent} = "$versionMain";
|
|||
# userAgentShort just means it does not have the language string.
|
||||
# ie: '1.3b' as opposed to '1.3b (en)'
|
||||
$ENV{WIZ_userAgentShort} = "$versionMain";
|
||||
$ENV{WIZ_xpinstallVersion} = "$inDefaultProductVersion";
|
||||
$ENV{WIZ_xpinstallVersion} = "$gDefaultProductVersion";
|
||||
$ENV{WIZ_distInstallPath} = "$gDirDistInstall";
|
||||
|
||||
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
|
||||
{
|
||||
print " back in win_gre/makeall.pl\n";
|
||||
print " inStagePath: $inStagePath\n";
|
||||
print " inDistPath : $inDistPath\n";
|
||||
}
|
||||
|
||||
# GetProductBuildID() will return the build id for GRE located here:
|
||||
# NS_BUILD_ID in nsBuildID.h: 2003030610
|
||||
$ENV{WIZ_greBuildID} = StageUtils::GetProductBuildID("$topsrcdir/config/nsBuildID.h", "NS_BUILD_ID");
|
||||
$ENV{WIZ_greBuildID} = StageUtils::GetProductBuildID("$topobjdir/dist/include/nsBuildID.h", "NS_BUILD_ID");
|
||||
|
||||
# GetGreFileVersion() will return the actual version of xpcom.dll used by GRE.
|
||||
# ie:
|
||||
# given milestone.txt : 1.4a
|
||||
# given nsBuildID.h : 2003030610
|
||||
# gre version would be: 1.4.20030.30610
|
||||
$ENV{WIZ_greFileVersion} = StageUtils::GetGreFileVersion($topsrcdir);
|
||||
$ENV{WIZ_greFileVersion} = StageUtils::GetGreFileVersion($topobjdir, $topsrcdir);
|
||||
|
||||
# GetGreSpecialID() will return the GRE ID to be used in the windows registry.
|
||||
# This ID is also the same one being querried for by the mozilla glue code.
|
||||
|
@ -142,7 +153,7 @@ $ENV{WIZ_greFileVersion} = StageUtils::GetGreFileVersion($topsrcdir);
|
|||
# given milestone.txt : 1.4a
|
||||
# given nsBuildID.h : 2003030610
|
||||
# gre special ID would be: 1.4a_2003030610
|
||||
$ENV{WIZ_greUniqueID} = StageUtils::GetGreSpecialID($topsrcdir);
|
||||
$ENV{WIZ_greUniqueID} = StageUtils::GetGreSpecialID($topobjdir);
|
||||
|
||||
print "\n";
|
||||
print " GRE build id : $ENV{WIZ_greBuildID}\n";
|
||||
|
@ -373,12 +384,13 @@ sub ParseArgv
|
|||
{
|
||||
PrintUsage();
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]productVer$/i)
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]objDir$/i)
|
||||
{
|
||||
if($#myArgv >= ($counter + 1))
|
||||
{
|
||||
++$counter;
|
||||
$inDefaultProductVersion = $myArgv[$counter];
|
||||
$topobjdir = $myArgv[$counter];
|
||||
$topobjdir =~ s/\\/\//g;
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]stagePath$/i)
|
||||
|
@ -423,16 +435,16 @@ sub MakeConfigFile
|
|||
{
|
||||
chdir("$gDirPackager/win_gre");
|
||||
# Make config.ini file
|
||||
if(system("perl makecfgini.pl config.it $inDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL"))
|
||||
if(system("perl makecfgini.pl config.it $gDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL"))
|
||||
{
|
||||
print "\n Error: perl makecfgini.pl config.it $inDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL\n";
|
||||
print "\n Error: perl makecfgini.pl config.it $gDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL\n";
|
||||
return(1);
|
||||
}
|
||||
|
||||
# Make install.ini file
|
||||
if(system("perl makecfgini.pl install.it $inDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL"))
|
||||
if(system("perl makecfgini.pl install.it $gDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL"))
|
||||
{
|
||||
print "\n Error: perl makecfgini.pl install.it $inDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL\n";
|
||||
print "\n Error: perl makecfgini.pl install.it $gDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL\n";
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
|
@ -480,9 +492,9 @@ sub MakeUninstall
|
|||
sub MakeUninstallIniFile
|
||||
{
|
||||
# Make config.ini file
|
||||
if(system("perl makeuninstallini.pl uninstall.it $inDefaultProductVersion"))
|
||||
if(system("perl makeuninstallini.pl uninstall.it $gDefaultProductVersion"))
|
||||
{
|
||||
print "\n Error: perl makeuninstallini.pl uninstall.it $inDefaultProductVersion\n";
|
||||
print "\n Error: perl makeuninstallini.pl uninstall.it $gDefaultProductVersion\n";
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
|
@ -494,9 +506,9 @@ sub MakeJsFile
|
|||
|
||||
chdir("$gDirPackager/win_gre");
|
||||
# Make .js file
|
||||
if(system("perl makejs.pl $mComponent.jst $inDefaultProductVersion $gDirStageProduct/$mComponent"))
|
||||
if(system("perl makejs.pl $mComponent.jst $gDefaultProductVersion $gDirStageProduct/$mComponent"))
|
||||
{
|
||||
print "\n Error: perl makejs.pl $mComponent.jst $inDefaultProductVersion $gDirStageProduct/$mComponent\n";
|
||||
print "\n Error: perl makejs.pl $mComponent.jst $gDefaultProductVersion $gDirStageProduct/$mComponent\n";
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
|
|
|
@ -38,26 +38,30 @@ push(@INC, "$topsrcdir/xpinstall/packager");
|
|||
require StageUtils;
|
||||
require "$topsrcdir/config/zipcfunc.pl";
|
||||
|
||||
$inDefaultProductVersion = StageUtils::GetProductY2KVersion($topsrcdir, $topsrcdir);
|
||||
# The mozilla's milestone is the same as the GRE's milestone version.
|
||||
# initEmptyValues indicates to GetProductMilestoneVersion() whether or not to
|
||||
# prefill the missing version values with '0's:
|
||||
# ie: if milestone version is 1.4a
|
||||
# initEmptyValues dictate whether is should be 1.4a.0.0 or not.
|
||||
$initEmptyValues = 1;
|
||||
$inDefaultGreVersion = StageUtils::GetProductMilestoneVersion($topsrcdir, $topsrcdir, $initEmptyValues);
|
||||
$inStagePath = "$topsrcdir/stage";
|
||||
$inDistPath = "$topsrcdir/dist";
|
||||
$inXpiURL = "ftp://not.supplied.invalid";
|
||||
$inRedirIniURL = $inXpiURL;
|
||||
|
||||
ParseArgv(@ARGV);
|
||||
|
||||
$topobjdir = "$topsrcdir" if !defined($topobjdir);
|
||||
$inStagePath = "$topobjdir/stage" if !defined($inStagePath);
|
||||
$inDistPath = "$topobjdir/dist" if !defined($inDistPath);
|
||||
$inXpiURL = "ftp://not.supplied.invalid" if !defined($inXpiURL);
|
||||
$inRedirIniURL = $inXpiURL if !defined($inRedirIniURL);
|
||||
|
||||
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
|
||||
{
|
||||
print " win_mfcembed/makeall.pl\n";
|
||||
print " topobjdir : $topobjdir\n";
|
||||
print " topsrcdir : $topsrcdir\n";
|
||||
print " inStagePath: $inStagePath\n";
|
||||
print " inDistPath : $inDistPath\n";
|
||||
}
|
||||
|
||||
$gDefaultProductVersion = StageUtils::GetProductY2KVersion($topobjdir, $topsrcdir, $topsrcdir);
|
||||
|
||||
print "\n";
|
||||
print " Building MfcEmbed\n";
|
||||
print " Raw version id : $inDefaultProductVersion\n";
|
||||
print " Raw version id : $gDefaultProductVersion\n";
|
||||
|
||||
# $inDefaultProductVersion has the form maj.min.release.bld where maj, min, release
|
||||
# $gDefaultProductVersion has the form maj.min.release.bld where maj, min, release
|
||||
# and bld are numerics representing version information.
|
||||
# Other variables need to use parts of the version info also so we'll
|
||||
# split out the dot separated values into the array @versionParts
|
||||
|
@ -67,16 +71,16 @@ print " Raw version id : $inDefaultProductVersion\n";
|
|||
# $versionParts[1] = min
|
||||
# $versionParts[2] = release
|
||||
# $versionParts[3] = bld
|
||||
@versionParts = split /\./, $inDefaultProductVersion;
|
||||
@versionParts = split /\./, $gDefaultProductVersion;
|
||||
|
||||
# We allow non-numeric characters to be included as the last
|
||||
# characters in fields of $inDefaultProductVersion for display purposes (mostly to
|
||||
# characters in fields of $gDefaultProductVersion for display purposes (mostly to
|
||||
# show that we have moved past a certain version by adding a '+'
|
||||
# character). Non-numerics must be stripped out of $inDefaultProductVersion,
|
||||
# character). Non-numerics must be stripped out of $gDefaultProductVersion,
|
||||
# however, since this variable is used to identify the the product
|
||||
# for comparison with other installations, so the values in each field
|
||||
# must be numeric only:
|
||||
$inDefaultProductVersion =~ s/[^0-9.][^.]*//g;
|
||||
$gDefaultProductVersion =~ s/[^0-9.][^.]*//g;
|
||||
|
||||
# set environment vars for use by other .pl scripts called from this script.
|
||||
if($versionParts[2] eq "0")
|
||||
|
@ -89,7 +93,7 @@ else
|
|||
}
|
||||
|
||||
print " Display version : $versionMain\n";
|
||||
print " Xpinstall version: $inDefaultProductVersion\n";
|
||||
print " Xpinstall version: $gDefaultProductVersion\n";
|
||||
print "\n";
|
||||
|
||||
$gDirPackager = "$topsrcdir/xpinstall/packager";
|
||||
|
@ -106,9 +110,16 @@ $seiGreFileNameSpecific = "gre-win32-installer.exe";
|
|||
$seizGreFileNameSpecific = "gre-win32-installer.zip";
|
||||
|
||||
# Build GRE installer package first before building Mozilla! GRE installer is required by the mozilla installer.
|
||||
if(system("perl \"$gDirPackager/win_gre/makeall.pl\" -productVer $inDefaultGreVersion -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL"))
|
||||
if(system("perl \"$gDirPackager/win_gre/makeall.pl\" -objDir \"$topobjdir\" -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL"))
|
||||
{
|
||||
die "\n Error: perl \"$gDirPackager/win_gre/makeall.pl\" -productVer $inDefaultGreVersion -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL\n";
|
||||
die "\n Error: perl \"$gDirPackager/win_gre/makeall.pl\" -objDir \"$topobjdir\" -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL\n";
|
||||
}
|
||||
|
||||
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
|
||||
{
|
||||
print " back in win_mfcembed/makeall.pl\n";
|
||||
print " inStagePath: $inStagePath\n";
|
||||
print " inDistPath : $inDistPath\n";
|
||||
}
|
||||
|
||||
# Create the stage area here.
|
||||
|
@ -143,19 +154,19 @@ $ENV{WIZ_fileUninstallZip} = $seuzFileNameSpecific;
|
|||
# the installer.
|
||||
$ENV{WIZ_userAgent} = "$versionMain";
|
||||
$ENV{WIZ_userAgentShort} = "$versionMain";
|
||||
$ENV{WIZ_xpinstallVersion} = "$inDefaultProductVersion";
|
||||
$ENV{WIZ_xpinstallVersion} = "$gDefaultProductVersion";
|
||||
$ENV{WIZ_distInstallPath} = "$gDirDistInstall";
|
||||
|
||||
# GetProductBuildID() will return the build id for GRE located here:
|
||||
# NS_BUILD_ID in nsBuildID.h: 2003030610
|
||||
$ENV{WIZ_greBuildID} = StageUtils::GetProductBuildID("$topsrcdir/config/nsBuildID.h", "NS_BUILD_ID");
|
||||
$ENV{WIZ_greBuildID} = StageUtils::GetProductBuildID("$topobjdir/dist/include/nsBuildID.h", "NS_BUILD_ID");
|
||||
|
||||
# GetGreFileVersion() will return the actual version of xpcom.dll used by GRE.
|
||||
# ie:
|
||||
# given milestone.txt : 1.4a
|
||||
# given nsBuildID.h : 2003030610
|
||||
# gre version would be: 1.4.20030.30610
|
||||
$ENV{WIZ_greFileVersion} = StageUtils::GetGreFileVersion($topsrcdir);
|
||||
$ENV{WIZ_greFileVersion} = StageUtils::GetGreFileVersion($topobjdir, $topsrcdir);
|
||||
|
||||
# GetGreSpecialID() will return the GRE ID to be used in the windows registry.
|
||||
# This ID is also the same one being querried for by the mozilla glue code.
|
||||
|
@ -163,7 +174,7 @@ $ENV{WIZ_greFileVersion} = StageUtils::GetGreFileVersion($topsrcdir);
|
|||
# given milestone.txt : 1.4a
|
||||
# given nsBuildID.h : 2003030610
|
||||
# gre special ID would be: 1.4a_2003030610
|
||||
$ENV{WIZ_greUniqueID} = StageUtils::GetGreSpecialID($topsrcdir);
|
||||
$ENV{WIZ_greUniqueID} = StageUtils::GetGreSpecialID($topobjdir);
|
||||
|
||||
print "\n";
|
||||
print " GRE file version : $ENV{WIZ_greFileVersion}\n";
|
||||
|
@ -377,14 +388,7 @@ sub PrintUsage
|
|||
|
||||
options include:
|
||||
|
||||
-productVer <ver string> : Version of the product. By default it will acquire the
|
||||
version listed in mozilla/config/milestone.txt and
|
||||
mozilla/config/nsBuildID.h files.
|
||||
ie: 1.0.0.2003030410
|
||||
|
||||
-greVer <ver string> : Version of GRE. By default it will acquire the
|
||||
version listed in mozilla/config/milestone.txt file.
|
||||
ie: 1.4a.0.0
|
||||
-objDir <path> : path to the objdir. default is topsrcdir
|
||||
|
||||
-stagePath <staging path> : full path to where the mfc embed components are staged at
|
||||
Default stage path, if this is not set, is:
|
||||
|
@ -415,20 +419,13 @@ sub ParseArgv
|
|||
{
|
||||
PrintUsage();
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]productVer$/i)
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]objDir$/i)
|
||||
{
|
||||
if($#myArgv >= ($counter + 1))
|
||||
{
|
||||
++$counter;
|
||||
$inDefaultProductVersion = $myArgv[$counter];
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]greVer$/i)
|
||||
{
|
||||
if($#myArgv >= ($counter + 1))
|
||||
{
|
||||
++$counter;
|
||||
$inDefaultGreVersion = $myArgv[$counter];
|
||||
$topobjdir = $myArgv[$counter];
|
||||
$topobjdir =~ s/\\/\//g;
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]stagePath$/i)
|
||||
|
@ -473,16 +470,16 @@ sub MakeConfigFile
|
|||
{
|
||||
chdir("$gDirPackager/win_mfcembed");
|
||||
# Make config.ini file
|
||||
if(system("perl makecfgini.pl config.it $inDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL"))
|
||||
if(system("perl makecfgini.pl config.it $gDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL"))
|
||||
{
|
||||
print "\n Error: perl makecfgini.pl config.it $inDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL\n";
|
||||
print "\n Error: perl makecfgini.pl config.it $gDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL\n";
|
||||
return(1);
|
||||
}
|
||||
|
||||
# Make install.ini file
|
||||
if(system("perl makecfgini.pl install.it $inDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL"))
|
||||
if(system("perl makecfgini.pl install.it $gDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL"))
|
||||
{
|
||||
print "\n Error: perl makecfgini.pl install.it $inDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL\n";
|
||||
print "\n Error: perl makecfgini.pl install.it $gDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL\n";
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
|
@ -536,9 +533,9 @@ sub MakeUninstallIniFile
|
|||
{
|
||||
chdir("$gDirPackager/win_mfcembed");
|
||||
# Make config.ini file
|
||||
if(system("perl makeuninstallini.pl uninstall.it $inDefaultProductVersion"))
|
||||
if(system("perl makeuninstallini.pl uninstall.it $gDefaultProductVersion"))
|
||||
{
|
||||
print "\n Error: perl makeuninstallini.pl uninstall.it $inDefaultProductVersion\n";
|
||||
print "\n Error: perl makeuninstallini.pl uninstall.it $gDefaultProductVersion\n";
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
|
@ -550,9 +547,9 @@ sub MakeJsFile
|
|||
|
||||
chdir("$gDirPackager/win_mfcembed");
|
||||
# Make .js file
|
||||
if(system("perl makejs.pl $mComponent.jst $inDefaultProductVersion $gDirStageProduct/$mComponent"))
|
||||
if(system("perl makejs.pl $mComponent.jst $gDefaultProductVersion $gDirStageProduct/$mComponent"))
|
||||
{
|
||||
print "\n Error: perl makejs.pl $mComponent.jst $inDefaultProductVersion $gDirStageProduct/$mComponent\n";
|
||||
print "\n Error: perl makejs.pl $mComponent.jst $gDefaultProductVersion $gDirStageProduct/$mComponent\n";
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
|
|
|
@ -33,24 +33,13 @@ use File::Basename;
|
|||
|
||||
$DEPTH = "../../..";
|
||||
$topsrcdir = GetTopSrcDir();
|
||||
|
||||
# ensure that Packager.pm is in @INC, since we might not be called from
|
||||
# mozilla/xpinstall/packager
|
||||
push(@INC, "$topsrcdir/xpinstall/packager");
|
||||
require StageUtils;
|
||||
require "$topsrcdir/config/zipcfunc.pl";
|
||||
|
||||
$inDefaultProductVersion = StageUtils::GetProductY2KVersion($topsrcdir, $topsrcdir);
|
||||
# The mozilla's milestone is the same as the GRE's milestone version.
|
||||
# initEmptyValues indicates to GetProductMilestoneVersion() whether or not to
|
||||
# prefill the missing version values with '0's:
|
||||
# ie: if milestone version is 1.4a
|
||||
# initEmptyValues dictate whether is should be 1.4a.0.0 or not.
|
||||
$initEmptyValues = 1;
|
||||
$inDefaultGreVersion = StageUtils::GetProductMilestoneVersion($topsrcdir, $topsrcdir, $initEmptyValues);
|
||||
$inStagePath = "$topsrcdir/stage";
|
||||
$inDistPath = "$topsrcdir/dist";
|
||||
$inXpiURL = "ftp://not.supplied.invalid";
|
||||
$inRedirIniURL = $inXpiURL;
|
||||
$seiFileNameGeneric = "nsinstall.exe";
|
||||
$seiFileNameSpecific = "mozilla-win32-installer.exe";
|
||||
$seiStubRootName = "mozilla-win32-stub-installer";
|
||||
|
@ -62,11 +51,28 @@ $seizGreFileNameSpecific = "gre-win32-installer.zip";
|
|||
|
||||
ParseArgv(@ARGV);
|
||||
|
||||
$topobjdir = "$topsrcdir" if !defined($topobjdir);
|
||||
$inStagePath = "$topobjdir/stage" if !defined($inStagePath);
|
||||
$inDistPath = "$topobjdir/dist" if !defined($inDistPath);
|
||||
$inXpiURL = "ftp://not.supplied.invalid" if !defined($inXpiURL);
|
||||
$inRedirIniURL = $inXpiURL if !defined($inRedirIniURL);
|
||||
|
||||
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
|
||||
{
|
||||
print " windows/makeall.pl\n";
|
||||
print " topobjdir : $topobjdir\n";
|
||||
print " topsrcdir : $topsrcdir\n";
|
||||
print " inStagePath: $inStagePath\n";
|
||||
print " inDistPath : $inDistPath\n";
|
||||
}
|
||||
|
||||
$gDefaultProductVersion = StageUtils::GetProductY2KVersion($topobjdir, $topsrcdir, $topsrcdir);
|
||||
|
||||
print "\n";
|
||||
print " Building Mozilla\n";
|
||||
print " Raw version id : $inDefaultProductVersion\n";
|
||||
print " Raw version id : $gDefaultProductVersion\n";
|
||||
|
||||
# $inDefaultProductVersion has the form maj.min.release.bld where maj, min, release
|
||||
# $gDefaultProductVersion has the form maj.min.release.bld where maj, min, release
|
||||
# and bld are numerics representing version information.
|
||||
# Other variables need to use parts of the version info also so we'll
|
||||
# split out the dot separated values into the array @versionParts
|
||||
|
@ -76,16 +82,16 @@ print " Raw version id : $inDefaultProductVersion\n";
|
|||
# $versionParts[1] = min
|
||||
# $versionParts[2] = release
|
||||
# $versionParts[3] = bld
|
||||
@versionParts = split /\./, $inDefaultProductVersion;
|
||||
@versionParts = split /\./, $gDefaultProductVersion;
|
||||
|
||||
# We allow non-numeric characters to be included as the last
|
||||
# characters in fields of $inDefaultProductVersion for display purposes (mostly to
|
||||
# characters in fields of $gDefaultProductVersion for display purposes (mostly to
|
||||
# show that we have moved past a certain version by adding a '+'
|
||||
# character). Non-numerics must be stripped out of $inDefaultProductVersion,
|
||||
# character). Non-numerics must be stripped out of $gDefaultProductVersion,
|
||||
# however, since this variable is used to identify the the product
|
||||
# for comparison with other installations, so the values in each field
|
||||
# must be numeric only:
|
||||
$inDefaultProductVersion =~ s/[^0-9.][^.]*//g;
|
||||
$gDefaultProductVersion =~ s/[^0-9.][^.]*//g;
|
||||
|
||||
# set environment vars for use by other .pl scripts called from this script.
|
||||
if($versionParts[2] eq "0")
|
||||
|
@ -98,7 +104,7 @@ else
|
|||
}
|
||||
|
||||
print " Display version : $versionMain\n";
|
||||
print " Xpinstall version: $inDefaultProductVersion\n";
|
||||
print " Xpinstall version: $gDefaultProductVersion\n";
|
||||
print "\n";
|
||||
|
||||
$gDirPackager = "$topsrcdir/xpinstall/packager";
|
||||
|
@ -107,13 +113,20 @@ $gDirDistInstall = "$inDistPath/install";
|
|||
$gDirDistInstGre = "$inDistPath/inst_gre";
|
||||
|
||||
# Build GRE installer package first before building Mozilla! GRE installer is required by the mozilla installer.
|
||||
if(system("perl \"$gDirPackager/win_gre/makeall.pl\" -productVer $inDefaultGreVersion -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL"))
|
||||
if(system("perl \"$gDirPackager/win_gre/makeall.pl\" -objDir \"$topobjdir\" -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL"))
|
||||
{
|
||||
die "\n Error: perl \"$gDirPackager/win_gre/makeall.pl\" -productVer $inDefaultGreVersion -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL\n";
|
||||
die "\n Error: perl \"$gDirPackager/win_gre/makeall.pl\" -objDir \"$topobjdir\" -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL\n";
|
||||
}
|
||||
|
||||
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
|
||||
{
|
||||
print " back in windows/makeall.pl\n";
|
||||
print " inStagePath: $inStagePath\n";
|
||||
print " inDistPath : $inDistPath\n";
|
||||
}
|
||||
|
||||
# Create the stage area here.
|
||||
# If -sd is not used, the default stage dir will be: $topsrcdir/stage
|
||||
# If -sd is not used, the default stage dir will be: $topobjdir/stage
|
||||
if(system("perl \"$gDirPackager/make_stage.pl\" -pn mozilla -os win -sd \"$inStagePath\" -dd \"$inDistPath\""))
|
||||
{
|
||||
die "\n Error: perl \"$gDirPackager/make_stage.pl\" -pn mozilla -os win -sd \"$inStagePath\" -dd \"$inDistPath\"\n";
|
||||
|
@ -139,19 +152,19 @@ $ENV{WIZ_fileUninstallZip} = $seuzFileNameSpecific;
|
|||
# the installer.
|
||||
$ENV{WIZ_userAgent} = "$versionMain ($versionLanguage)";
|
||||
$ENV{WIZ_userAgentShort} = "$versionMain";
|
||||
$ENV{WIZ_xpinstallVersion} = "$inDefaultProductVersion";
|
||||
$ENV{WIZ_xpinstallVersion} = "$gDefaultProductVersion";
|
||||
$ENV{WIZ_distInstallPath} = "$gDirDistInstall";
|
||||
|
||||
# GetProductBuildID() will return the build id for GRE located here:
|
||||
# NS_BUILD_ID in nsBuildID.h: 2003030610
|
||||
$ENV{WIZ_greBuildID} = StageUtils::GetProductBuildID("$topsrcdir/config/nsBuildID.h", "NS_BUILD_ID");
|
||||
$ENV{WIZ_greBuildID} = StageUtils::GetProductBuildID("$inDistPath/include/nsBuildID.h", "NS_BUILD_ID");
|
||||
|
||||
# GetGreFileVersion() will return the actual version of xpcom.dll used by GRE.
|
||||
# ie:
|
||||
# given milestone.txt : 1.4a
|
||||
# given nsBuildID.h : 2003030610
|
||||
# gre version would be: 1.4.20030.30610
|
||||
$ENV{WIZ_greFileVersion} = StageUtils::GetGreFileVersion($topsrcdir);
|
||||
$ENV{WIZ_greFileVersion} = StageUtils::GetGreFileVersion($topobjdir, $topsrcdir);
|
||||
|
||||
# GetGreSpecialID() will return the GRE ID to be used in the windows registry.
|
||||
# This ID is also the same one being querried for by the mozilla glue code.
|
||||
|
@ -159,7 +172,7 @@ $ENV{WIZ_greFileVersion} = StageUtils::GetGreFileVersion($topsrcdir);
|
|||
# given milestone.txt : 1.4a
|
||||
# given nsBuildID.h : 2003030610
|
||||
# gre special ID would be: 1.4a_2003030610
|
||||
$ENV{WIZ_greUniqueID} = StageUtils::GetGreSpecialID($topsrcdir);
|
||||
$ENV{WIZ_greUniqueID} = StageUtils::GetGreSpecialID($topobjdir);
|
||||
|
||||
print "\n";
|
||||
print " GRE build id : $ENV{WIZ_greBuildID}\n";
|
||||
|
@ -426,14 +439,7 @@ sub PrintUsage
|
|||
|
||||
options include:
|
||||
|
||||
-productVer <ver string> : Version of the product. By default it will acquire the
|
||||
version listed in mozilla/config/milestone.txt and
|
||||
mozilla/config/nsBuildID.h files.
|
||||
ie: 1.4a.0.2003030410
|
||||
|
||||
-greVer <ver string> : Version of GRE. By default it will acquire the
|
||||
version listed in mozilla/config/milestone.txt file.
|
||||
ie: 1.4a.0.0
|
||||
-objDir <path> : path to the objdir. default is topsrcdir
|
||||
|
||||
-stagePath <staging path> : full path to where the mozilla components are staged at
|
||||
Default stage path, if this is not set, is:
|
||||
|
@ -464,20 +470,13 @@ sub ParseArgv
|
|||
{
|
||||
PrintUsage();
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]productVer$/i)
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]objDir$/i)
|
||||
{
|
||||
if($#myArgv >= ($counter + 1))
|
||||
{
|
||||
++$counter;
|
||||
$inDefaultProductVersion = $myArgv[$counter];
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]greVer$/i)
|
||||
{
|
||||
if($#myArgv >= ($counter + 1))
|
||||
{
|
||||
++$counter;
|
||||
$inDefaultGreVersion = $myArgv[$counter];
|
||||
$topobjdir = $myArgv[$counter];
|
||||
$topobjdir =~ s/\\/\//g;
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]stagePath$/i)
|
||||
|
@ -522,16 +521,16 @@ sub MakeConfigFile
|
|||
{
|
||||
chdir("$gDirPackager/windows");
|
||||
# Make config.ini file
|
||||
if(system("perl makecfgini.pl config.it $inDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL"))
|
||||
if(system("perl makecfgini.pl config.it $gDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL"))
|
||||
{
|
||||
print "\n Error: perl makecfgini.pl config.it $inDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL\n";
|
||||
print "\n Error: perl makecfgini.pl config.it $gDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL\n";
|
||||
return(1);
|
||||
}
|
||||
|
||||
# Make install.ini file
|
||||
if(system("perl makecfgini.pl install.it $inDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL"))
|
||||
if(system("perl makecfgini.pl install.it $gDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL"))
|
||||
{
|
||||
print "\n Error: perl makecfgini.pl install.it $inDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL\n";
|
||||
print "\n Error: perl makecfgini.pl install.it $gDefaultProductVersion $gDirStageProduct $gDirDistInstall/xpi $inRedirIniURL $inXpiURL\n";
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
|
@ -575,9 +574,9 @@ sub MakeUninstall
|
|||
sub MakeUninstallIniFile
|
||||
{
|
||||
# Make config.ini file
|
||||
if(system("perl makeuninstallini.pl uninstall.it $inDefaultProductVersion"))
|
||||
if(system("perl makeuninstallini.pl uninstall.it $gDefaultProductVersion"))
|
||||
{
|
||||
print "\n Error: perl makeuninstallini.pl uninstall.it $inDefaultProductVersion\n";
|
||||
print "\n Error: perl makeuninstallini.pl uninstall.it $gDefaultProductVersion\n";
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
|
@ -589,9 +588,9 @@ sub MakeJsFile
|
|||
|
||||
# Make .js file
|
||||
chdir("$gDirPackager/windows");
|
||||
if(system("perl makejs.pl $mComponent.jst $inDefaultProductVersion $gDirStageProduct/$mComponent"))
|
||||
if(system("perl makejs.pl $mComponent.jst $gDefaultProductVersion $gDirStageProduct/$mComponent"))
|
||||
{
|
||||
print "\n Error: perl makejs.pl $mComponent.jst $inDefaultProductVersion $gDirStageProduct/$mComponent\n";
|
||||
print "\n Error: perl makejs.pl $mComponent.jst $gDefaultProductVersion $gDirStageProduct/$mComponent\n";
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
|
|
|
@ -41,10 +41,6 @@ use File::Basename;
|
|||
|
||||
$DEPTH = "../../../..";
|
||||
$topsrcdir = GetTopSrcDir();
|
||||
$topobjdir = "$topsrcdir";
|
||||
$inXpiURL = "ftp://not.supplied.invalid";
|
||||
$inRedirIniURL = $inXpiURL;
|
||||
|
||||
# ensure that Packager.pm is in @INC, since we might not be called from
|
||||
# mozilla/xpinstall/packager
|
||||
push(@INC, "$topsrcdir/../mozilla/xpinstall/packager");
|
||||
|
@ -52,18 +48,27 @@ require StageUtils;
|
|||
|
||||
ParseArgv(@ARGV);
|
||||
|
||||
$DEPTH = "$topsrcdir" if !defined($DEPTH);
|
||||
$inStagePath = "$topobjdir/stage" if !defined($inStagePath);
|
||||
$inDistPath = "$topobjdir/dist" if !defined($inDistPath);
|
||||
$topobjdir = $topsrcdir if !defined($topobjdir);
|
||||
$inXpiURL = "ftp://not.supplied.invalid" if !defined($inXpiURL);
|
||||
$inRedirIniURL = $inXpiURL if !defined($inRedirIniURL);
|
||||
$inStagePath = "$topobjdir/stage" if !defined($inStagePath);
|
||||
$inDistPath = "$topobjdir/dist" if !defined($inDistPath);
|
||||
$cwdBuilder = "$topsrcdir/xpinstall/wizard/windows/builder";
|
||||
$gDistInstallPath = "$inDistPath/install";
|
||||
$gPackagerPath = "$topsrcdir/xpinstall/packager";
|
||||
|
||||
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
|
||||
{
|
||||
print " build.pl\n";
|
||||
print " topobjdir: $topobjdir\n";
|
||||
print " inDistPath: $inDistPath\n";
|
||||
}
|
||||
|
||||
# mozilla's makeall.pl will call GRE's makeall.pl
|
||||
chdir("$gPackagerPath/windows");
|
||||
if(system("perl makeall.pl -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL"))
|
||||
if(system("perl makeall.pl -objDir \"$topobjdir\" -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL"))
|
||||
{
|
||||
die "\n Error: perl makeall.pl -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL\n";
|
||||
die "\n Error: perl makeall.pl -objDir \"$topobjdir\" -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL\n";
|
||||
}
|
||||
|
||||
chdir($cwdBuilder);
|
||||
|
@ -134,6 +139,7 @@ sub ParseArgv
|
|||
{
|
||||
++$counter;
|
||||
$topobjdir = $myArgv[$counter];
|
||||
$topobjdir =~ s/\\/\//g;
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]stagePath$/i)
|
||||
|
@ -142,6 +148,7 @@ sub ParseArgv
|
|||
{
|
||||
++$counter;
|
||||
$inStagePath = $myArgv[$counter];
|
||||
$inStagePath =~ s/\\/\//g;
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]distPath$/i)
|
||||
|
@ -150,6 +157,7 @@ sub ParseArgv
|
|||
{
|
||||
++$counter;
|
||||
$inDistPath = $myArgv[$counter];
|
||||
$inDistPath =~ s/\\/\//g;
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]aurl$/i)
|
||||
|
|
|
@ -41,11 +41,6 @@ use File::Basename;
|
|||
|
||||
$DEPTH = "../../../..";
|
||||
$topsrcdir = GetTopSrcDir();
|
||||
$inStagePath = "$topsrcdir/stage";
|
||||
$inDistPath = "$topsrcdir/dist";
|
||||
$inXpiURL = "ftp://not.supplied.invalid";
|
||||
$inRedirIniURL = $inXpiURL;
|
||||
|
||||
# ensure that Packager.pm is in @INC, since we might not be called from
|
||||
# mozilla/xpinstall/packager
|
||||
push(@INC, "$topsrcdir/../mozilla/xpinstall/packager");
|
||||
|
@ -53,16 +48,27 @@ require StageUtils;
|
|||
|
||||
ParseArgv(@ARGV);
|
||||
|
||||
$DEPTH = "$topsrcdir" if !defined($DEPTH);
|
||||
$topobjdir = $topsrcdir if !defined($topobjdir);
|
||||
$inStagePath = "$topobjdir/stage" if !defined($inStagePath);
|
||||
$inDistPath = "$topobjdir/dist" if !defined($inDistPath);
|
||||
$inXpiURL = "ftp://not.supplied.invalid" if !defined($inXpiURL);
|
||||
$inRedirIniURL = $inXpiURL if !defined($inRedirIniURL);
|
||||
$cwdBuilder = "$topsrcdir/xpinstall/wizard/windows/builder";
|
||||
$stageDir = "$topsrcdir/stage";
|
||||
$gDistInstallPath = "$inDistPath/inst_gre";
|
||||
$gPackagerPath = "$topsrcdir/xpinstall/packager";
|
||||
|
||||
chdir("$gPackagerPath/win_gre");
|
||||
if(system("perl makeall.pl -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL"))
|
||||
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
|
||||
{
|
||||
die "\n Error: perl makeall.pl -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL\n";
|
||||
print " build_gre.pl\n";
|
||||
print " topobjdir : $topobjdir\n";
|
||||
print " inDistPath : $inDistPath\n";
|
||||
print " inStagePath: $inStagePath\n";
|
||||
}
|
||||
|
||||
chdir("$gPackagerPath/win_gre");
|
||||
if(system("perl makeall.pl -objDir \"$topobjdir\" -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL"))
|
||||
{
|
||||
die "\n Error: perl makeall.pl -objDir \"$topobjdir\" -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL\n";
|
||||
}
|
||||
|
||||
chdir($cwdBuilder);
|
||||
|
@ -92,6 +98,8 @@ sub PrintUsage
|
|||
|
||||
-h - this usage.
|
||||
|
||||
-objDir <path> - the build directory (defaults to a srcdir build)
|
||||
|
||||
-stagePath <path> - Full path to where the mozilla stage dir is at.
|
||||
Default path, if one is not set, is:
|
||||
[mozilla]/stage
|
||||
|
@ -125,12 +133,22 @@ sub ParseArgv
|
|||
{
|
||||
PrintUsage();
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]objDir$/i)
|
||||
{
|
||||
if($#myArgv >= ($counter + 1))
|
||||
{
|
||||
++$counter;
|
||||
$topobjdir = $myArgv[$counter];
|
||||
$topobjdir =~ s/\\/\//g;
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]stagePath$/i)
|
||||
{
|
||||
if($#myArgv >= ($counter + 1))
|
||||
{
|
||||
++$counter;
|
||||
$inStagePath = $myArgv[$counter];
|
||||
$inStagePath =~ s/\\/\//g;
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]distPath$/i)
|
||||
|
@ -139,6 +157,7 @@ sub ParseArgv
|
|||
{
|
||||
++$counter;
|
||||
$inDistPath = $myArgv[$counter];
|
||||
$inDistPath =~ s/\\/\//g;
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]aurl$/i)
|
||||
|
|
|
@ -40,10 +40,6 @@ use File::Basename;
|
|||
|
||||
$DEPTH = "../../../..";
|
||||
$topsrcdir = GetTopSrcDir();
|
||||
$inStagePath = "$topsrcdir/stage";
|
||||
$inDistPath = "$topsrcdir/dist";
|
||||
$inXpiURL = "ftp://not.supplied.invalid";
|
||||
$inRedirIniURL = $inXpiURL;
|
||||
|
||||
# ensure that Packager.pm is in @INC, since we might not be called from
|
||||
# mozilla/xpinstall/packager
|
||||
|
@ -52,15 +48,19 @@ require StageUtils;
|
|||
|
||||
ParseArgv(@ARGV);
|
||||
|
||||
$DEPTH = "$topsrcdir" if !defined($DEPTH);
|
||||
$topobjdir = $topsrcdir if !defined($topobjdir);
|
||||
$inStagePath = "$topobjdir/stage" if !defined($inStagePath);
|
||||
$inDistPath = "$topobjdir/dist" if !defined($inDistPath);
|
||||
$inXpiURL = "ftp://not.supplied.invalid" if !defined($inXpiURL);
|
||||
$inRedirIniURL = $inXpiURL if !defined($inRedirIniURL);
|
||||
$builderPath = "$topsrcdir/xpinstall/wizard/windows/builder";
|
||||
$gDistInstallPath = "$inDistPath/inst_mfcembed";
|
||||
$gPackagerPath = "$topsrcdir/xpinstall/packager";
|
||||
|
||||
chdir("$gPackagerPath/win_mfcembed");
|
||||
if(system("perl \"$gPackagerPath/win_mfcembed/makeall.pl\" -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL"))
|
||||
if(system("perl \"$gPackagerPath/win_mfcembed/makeall.pl\" -objDir \"$topobjdir\" -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL"))
|
||||
{
|
||||
die "\n Error: perl \"$gPackagerPath/win_mfcembed/makeall.pl\" -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL\n";
|
||||
die "\n Error: perl \"$gPackagerPath/win_mfcembed/makeall.pl\" -objDir \"$topobjdir\" -stagePath \"$inStagePath\" -distPath \"$inDistPath\" -aurl $inXpiURL -rurl $inRedirIniURL\n";
|
||||
}
|
||||
|
||||
chdir($builderPath);
|
||||
|
@ -90,6 +90,8 @@ sub PrintUsage
|
|||
|
||||
-h - this usage.
|
||||
|
||||
-objDir <path> - the build directory (defaults to a srcdir build)
|
||||
|
||||
-stagePath <path> - Full path to where the mozilla stage dir is at.
|
||||
Default path, if one is not set, is:
|
||||
[mozilla]/stage
|
||||
|
@ -121,12 +123,22 @@ sub ParseArgv
|
|||
{
|
||||
PrintUsage();
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]objDir$/i)
|
||||
{
|
||||
if($#myArgv >= ($counter + 1))
|
||||
{
|
||||
++$counter;
|
||||
$topobjdir = $myArgv[$counter];
|
||||
$topobjdir =~ s/\\/\//g;
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]stagePath$/i)
|
||||
{
|
||||
if($#myArgv >= ($counter + 1))
|
||||
{
|
||||
++$counter;
|
||||
$inStagePath = $myArgv[$counter];
|
||||
$inStagePath =~ s/\\/\//g;
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]distPath$/i)
|
||||
|
@ -135,6 +147,7 @@ sub ParseArgv
|
|||
{
|
||||
++$counter;
|
||||
$inDistPath = $myArgv[$counter];
|
||||
$inDistPath =~ s/\\/\//g;
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]aurl$/i)
|
||||
|
|
Загрузка…
Ссылка в новой задаче