r=cmp
Make packaging understand OSes other than Windows
This commit is contained in:
mkaply%us.ibm.com 2005-03-09 18:49:17 +00:00
parent d2d5aedc5b
commit 6d3036d7c9
4 changed files with 28 additions and 20 deletions

View File

@ -55,7 +55,11 @@ MOZ_PKG_FORMAT = DMG
else
ifeq (,$(filter-out OS2 WINNT, $(OS_ARCH)))
MOZ_PKG_FORMAT = ZIP
ifeq (,$(filter-out OS2, $(OS_ARCH)))
INSTALLER_DIR = os2
else
INSTALLER_DIR = windows
endif
else
ifeq (,$(filter-out SunOS, $(OS_ARCH)))
MOZ_PKG_FORMAT = BZ2

View File

@ -59,7 +59,6 @@ $gDirCwd = cwd();
push(@INC, $gDirScripts);
require StageUtils;
$gOsPkg = undef;
$inProductName = undef;
$inStagingScript = undef;
$inOs = undef;
@ -89,15 +88,6 @@ if(!$inProductName || !$inOs)
PrintUsage();
}
if($inOs =~ /^win$/i)
{
$gOsPkg = "dos";
}
else
{
$gOsPkg = $inOs;
}
if(!$inStagingScript)
{
# Look for the stage script in cwd first, then look at the
@ -128,7 +118,7 @@ else
}
# This is where the stage area is actually created.
&StageProduct($inDirSrcDist, $inDirDestStage, $inProductName, $gOsPkg);
&StageProduct($inDirSrcDist, $inDirDestStage, $inProductName, $inOs);
chdir($gDirCwd);
exit(0);
@ -195,6 +185,7 @@ sub ParseArgV
++$counter;
if(($myArgv[$counter] =~ /^win$/i) ||
($myArgv[$counter] =~ /^mac$/i) ||
($myArgv[$counter] =~ /^os2$/i) ||
($myArgv[$counter] =~ /^unix$/i))
{
$inOs = $myArgv[$counter];
@ -251,7 +242,7 @@ sub PrintUsage
mozilla
* -os
win, mac, unix
win, mac, unix, os2
'*' indicates required parameters.
\n";

View File

@ -81,7 +81,7 @@ $inRedirIniURL = $inXpiURL if !defined($inRedirIni
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
{
print " windows/makeall.pl\n";
print " os2/makeall.pl\n";
print " topobjdir : $topobjdir\n";
print " topsrcdir : $topsrcdir\n";
print " inStagePath: $inStagePath\n";
@ -135,7 +135,7 @@ $gDirDistInstall = "$inDistPath/install";
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
{
print " back in windows/makeall.pl\n";
print " back in os2/makeall.pl\n";
print " inStagePath: $inStagePath\n";
print " inDistPath : $inDistPath\n";
}

View File

@ -41,7 +41,7 @@ return(1);
sub StageProduct
{
my($aDirSrcDist, $aDirStage, $aProductName, $aOsPkg) = @_;
my($aDirSrcDist, $aDirStage, $aProductName, $aInOs) = @_;
my($dirDistPackagesProductName) = "$aDirSrcDist/packages/$aProductName";
my($dirStageProductName) = "$aDirStage/$aProductName";
my($dirMozRoot) = StageUtils::GetAbsPath("moz_root");
@ -53,24 +53,37 @@ sub StageProduct
print " aDirSrcDist : $aDirSrcDist\n";
print " aDirStage : $aDirStage\n";
print " aProductName : $aProductName\n";
print " aOsPkg : $aOsPkg\n";
print " aInOs : $aInOs\n";
print " dirDistPackagesProductName : $dirDistPackagesProductName\n";
print " dirStageProductName : $dirStageProductName\n";
print " dirMozRoot : $dirMozRoot\n";
print " dirMozPackager : $dirMozPackager\n";
}
my($osPkg);
my($osPkgFile);
if($aInOs =~ /^win$/i)
{
$osPkg = "dos";
$osPkgFile = "win";
}
else
{
$osPkg = $aInOs;
$osPkgFile = $aInOs;
}
StageUtils::CleanupStage($aDirStage, $aProductName);
StageUtils::CleanupDistPackages("$aDirSrcDist/packages", $aProductName);
StageUtils::CopyAdditionalPackage("$dirMozPackager/xpcom-win.pkg", $dirDistPackagesProductName);
StageUtils::CopyAdditionalPackage("$dirMozPackager/packages-win", $dirDistPackagesProductName);
StageUtils::CopyAdditionalPackage("$dirMozPackager/xpcom-$osPkgFile.pkg", $dirDistPackagesProductName);
StageUtils::CopyAdditionalPackage("$dirMozPackager/packages-$osPkgFile", $dirDistPackagesProductName);
# StageUtils::GeneratePackagesFromSinglePackage($inOs, "$dirMozPackager/packages-win", $dirDistPackagesProductName);
# Call CreateStage() to create the aProductName stage dir using the packages
# in dist/packages.
StageUtils::CreateStage($aDirSrcDist, $dirStageProductName, $dirDistPackagesProductName, $aOsPkg);
StageUtils::CreateStage($aDirSrcDist, $dirStageProductName, $dirDistPackagesProductName, $osPkg);
# consolidate the .xpt files for each xpi into one file
system("perl \"$dirMozPackager/xptlink.pl\" --source \"$aDirSrcDist\" --destination \"$dirStageProductName\" -o $aOsPkg --verbose");
system("perl \"$dirMozPackager/xptlink.pl\" --source \"$aDirSrcDist\" --destination \"$dirStageProductName\" -o $osPkg --verbose");
}