r=bsmedberg
OS/2 bustage - just remove $os from xptlink.pl - it's not used anymore


git-svn-id: svn://10.0.0.236/trunk@180980 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkaply%us.ibm.com
2005-09-26 20:00:32 +00:00
parent 6853e3a14f
commit 39f6b46c8a
8 changed files with 8 additions and 258 deletions

View File

@@ -131,7 +131,7 @@ system("perl pkgcp.pl -o $platform -s $DIST -d $STAGE -f $inConfigFiles/$ENV{WIZ
spew("Completed copying build files");
#// call xptlink.pl to make big .xpt files/component
system("perl xptlink.pl -o $platform -s $DIST -d $STAGE -v");
system("perl xptlink.pl -s $DIST -d $STAGE -v");
spew("Completed xptlinking");
#// call makeall.pl tunneling args (delivers .xpis to $inObjDir/installer/stage)

View File

@@ -256,7 +256,7 @@ ifdef MOZ_PKG_MANIFEST
$(PERL) -I$(topsrcdir)/xpinstall/packager -e 'use Packager; \
Packager::Copy("$(DIST)", "$(DIST)/$(MOZ_PKG_APPNAME)", \
"$(MOZ_PKG_MANIFEST)", "$(PKGCP_OS)", 1, 0, 1);'
$(PERL) $(topsrcdir)/xpinstall/packager/xptlink.pl -s $(DIST) -d $(DIST)/xpt -f $(DIST)/$(MOZ_PKG_APPNAME)/components -v -o $(PKGCP_OS)
$(PERL) $(topsrcdir)/xpinstall/packager/xptlink.pl -s $(DIST) -d $(DIST)/xpt -f $(DIST)/$(MOZ_PKG_APPNAME)/components -v
else # !MOZ_PKG_MANIFEST
ifeq ($(MOZ_PKG_FORMAT),DMG)
@cd $(DIST) && rsync -auv --copy-unsafe-links $(_APPNAME) $(MOZ_PKG_APPNAME)

View File

@@ -1,233 +0,0 @@
#!c:\perl\bin\perl
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is Mozilla Communicator client code, released
# March 31, 1998.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1999
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Sean Su <ssu@netscape.com>
# IBM Corp.
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
#
# Purpose:
# To build the seamonkey self-extracting installer and its corresponding .xpi files
# given a seamonkey build on a local system.
#
# Requirements:
# 1. perl needs to be installed correctly on the build system because cwd.pm is used.
# 2. mozilla\xpinstall\wizard\os2 needs to be built.
#
if($ENV{MOZ_SRC} eq "")
{
print "Error: MOZ_SRC not set!";
exit(1);
}
if($ENV{MOZ_OBJDIR} eq "")
{
print "Error: set MOZ_OBJDIR to the name of the objdir used!";
exit(1);
}
$inXpiURL = "";
$inRedirIniURL = "";
ParseArgv(@ARGV);
if($inXpiURL eq "")
{
# archive url not supplied, set it to default values
$inXpiURL = "ftp://not.supplied.invalid";
}
if($inRedirIniURL eq "")
{
# redirect url not supplied, set it to default value.
$inRedirIniURL = $inXpiURL;
}
$DEPTH = "$ENV{MOZ_SRC}/mozilla";
$DEPTH =~ s/\\/\//g;
$cwdBuilder = "$DEPTH/xpinstall/wizard/os2/builder";
$cwdDist = GetCwd("dist", $DEPTH, $ENV{MOZ_OBJDIR}, $cwdBuilder);
$cwdInstall = GetCwd("install", $DEPTH, $ENV{MOZ_OBJDIR}, $cwdBuilder);
$cwdPackager = GetCwd("packager", $DEPTH, $ENV{MOZ_OBJDIR}, $cwdBuilder);
$cwdConfig = GetCwd("config", $DEPTH, $ENV{MOZ_OBJDIR}, $cwdBuilder);
push(@INC,"$DEPTH/config");
require "Moz/Milestone.pm";
$version = Moz::Milestone::getOfficialMilestone("$DEPTH/config/milestone.txt");
#get date from build_number file
open(FILENEW, "<$cwdConfig/build_number");
$dateversion = <FILENEW>;
close(FILENEW);
chomp($dateversion);
$fullversion = join('.0.',$version,$dateversion);
# Check for existence of seamonkey.exe
$fileSeamonkey = "$DEPTH/$ENV{MOZ_OBJDIR}/dist/bin/seamonkey.exe";
if(!(-e "$fileSeamonkey"))
{
print "file not found: $fileSeamonkey\n";
exit(1);
}
if(-d "$DEPTH/stage")
{
system("perl $cwdPackager/os2/rdir.pl $DEPTH/stage");
}
# The destination cannot be a sub directory of the source.
# pkgcp.pl will get very unhappy.
mkdir("$DEPTH/stage", 0775);
system("perl $cwdPackager/pkgcp.pl -s $cwdDist -d $DEPTH/stage -f $cwdPackager/packages-os2 -o unix -v");
system("perl $cwdPackager/xptlink.pl -s $cwdDist -d $DEPTH/stage -o unix -v");
chdir("$cwdPackager/os2");
if(system("perl makeall.pl $fullversion $DEPTH/stage $cwdDist/install -aurl $inXpiURL -rurl $inRedirIniURL"))
{
print "\n Error: perl makeall.pl $fullversion $DEPTH/stage $cwdDist/install $inXpiURL $inRedirIniURL\n";
exit(1);
}
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, $objdirName, $returnCwd) = @_;
my($distCwd);
my($distPath);
if($whichPath eq "dist")
{
# verify the existance of path
if(!(-e "$depthPath/$objdirName/dist"))
{
print "path not found: $depthPath/$objDirName/dist\n";
exit(1);
}
$distPath = "$depthPath/$objdirName/dist";
}
elsif($whichPath eq "install")
{
# verify the existance of path
if(!(-e "$depthPath/$objdirName/dist/install"))
{
print "path not found: $depthPath/$objdirName/dist/install\n";
exit(1);
}
$distPath = "$depthPath/$objdirname/install";
}
elsif($whichPath eq "packager")
{
# verify the existance of path
if(!(-e "$depthPath/xpinstall/packager"))
{
print "path not found: $depthPath/xpinstall/packager\n";
exit(1);
}
$distPath = "$depthPath/xpinstall/packager";
}
elsif($whichPath eq "config")
{
# verify the existance of path
if(!(-e "$depthPath/$objdirName/config"))
{
print "path not found: $depthPath/$objdirName/config\n";
exit(1);
}
$distPath = "$depthPath/$objdirName/config";
}
return($distPath);
}

View File

@@ -77,6 +77,6 @@ sub StageProduct
system("perl \"$dirMozPackager/pkgcp.pl\" -s \"$aDirSrcDist/bin\" -d \"$dirStageProductName/gre\" -f \"$dirDistPackagesProductName/gre-installer-$osPkgFile.pkg\" -o $osPkg -v");
# consolidate the .xpt files for each xpi into one file
system("perl \"$dirMozPackager/xptlink.pl\" --source \"$aDirSrcDist\" --destination \"$dirStageProductName\" -o $osPkg --verbose");
system("perl \"$dirMozPackager/xptlink.pl\" --source \"$aDirSrcDist\" --destination \"$dirStageProductName\" --verbose");
}

View File

@@ -89,6 +89,6 @@ sub StageProduct
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 $osPkg --verbose");
system("perl \"$dirMozPackager/xptlink.pl\" --source \"$aDirSrcDist\" --destination \"$dirStageProductName\" --verbose");
}

View File

@@ -145,7 +145,7 @@ system("perl pkgcp.pl -o unix -s $TREETOP/dist -d $STAGE -f $TREETOP/xpinstall/p
spew("Completed copying build files for STATIC BUILD");
#// call xptlink.pl to make big .xpt files/component
system("perl xptlink.pl -o unix -s $TREETOP/dist -d $STAGE -v");
system("perl xptlink.pl -s $TREETOP/dist -d $STAGE -v");
spew("Completed xptlinking");
#// call makeall.pl tunneling args (delivers .xpis to mozilla/installer/stage)

View File

@@ -167,7 +167,7 @@ system("perl pkgcp.pl -o unix -s $topobjdir/dist -d $STAGE -f $topsrcdir/xpinsta
spew("Completed copying build files");
#// call xptlink.pl to make big .xpt files/component
system("perl xptlink.pl -o unix -s $topobjdir/dist -d $STAGE -v");
system("perl xptlink.pl -s $topobjdir/dist -d $STAGE -v");
spew("Completed xptlinking");
#// strip libs

View File

@@ -51,7 +51,6 @@ use Getopt::Long;
$srcdir = ""; # root directory being copied from
$destdir = ""; # root directory being copied to
$finaldir = ""; # where to put the final linked XPT
$os = ""; # os type (MSDOS, Unix)
$verbose = 0; # shorthand for --debug 1
$debug = 0; # controls amount of debug output
$help = 0; # flag: if set, print usage
@@ -60,7 +59,6 @@ $help = 0; # flag: if set, print usage
$return = GetOptions( "source|s=s", \$srcdir,
"destination|d=s", \$destdir,
"final|f=s", \$finaldir,
"os|o=s", \$os,
"help|h", \$help,
"debug=i", \$debug,
"verbose|v", \$verbose,
@@ -115,7 +113,7 @@ foreach my $component (@xptdirs) {
if -f "$destdir/$component/$bindir"."components/$component.xpt";
# create list of .xpt files in cwd
my @xptfiles;
my @xptfiles;
($debug >= 4) && print "opendir: $destdir/$component/$bindir"."components\n";
opendir (COMPDIR, "$destdir/$component/$bindir"."components") ||
@@ -144,7 +142,7 @@ foreach my $component (@xptdirs) {
my @realxptfiles;
my $realmerged;
if ($os eq "MSDOS") {
if ($^O eq "cygwin") {
@realxptfiles = map {my $file = `cygpath -t mixed $_`;
chomp $file;
$file} @xptfiles;
@@ -216,21 +214,6 @@ sub check_arguments
$exitval += 2;
}
# check OS == {unix|dos}
if ($os eq "") {
print "Error: OS type (--os) not specified.\n";
$exitval += 8;
} elsif ( $os =~ /dos/i ) {
$os = "MSDOS";
($debug >= 4) && print " OS: $os\n";
} elsif ( $os =~ /unix/i ) {
$os = "Unix"; # can be anything but MacOS, MSDOS, or VMS
($debug >= 4) && print " OS: Unix\n";
} else {
print "Error: OS type \"$os\" unknown.\n";
$exitval += 16;
}
if ($exitval) {
print "See \'$0 --help\' for more information.\n";
print "Exiting...\n";