From 7c2e91b35cea4f56199755cb7f861a01a16ed25a Mon Sep 17 00:00:00 2001 From: atotic Date: Thu, 11 Jun 1998 03:58:24 +0000 Subject: [PATCH] First Checked In. --- build/mac/BuildNGLayoutDebug.pl | 114 ++++++++++++++ build/mac/MacCVS.pm | 198 +++++++++++++++++++++++ build/mac/MacCVSLib | Bin 0 -> 9592 bytes build/mac/NGLayoutBuildList.pm | 271 ++++++++++++++++++++++++++++++++ 4 files changed, 583 insertions(+) create mode 100644 build/mac/BuildNGLayoutDebug.pl create mode 100644 build/mac/MacCVS.pm create mode 100644 build/mac/MacCVSLib create mode 100644 build/mac/NGLayoutBuildList.pm diff --git a/build/mac/BuildNGLayoutDebug.pl b/build/mac/BuildNGLayoutDebug.pl new file mode 100644 index 000000000000..74071e999745 --- /dev/null +++ b/build/mac/BuildNGLayoutDebug.pl @@ -0,0 +1,114 @@ +#!perl -w + +# +# The contents of this file are subject to the Netscape Public License +# Version 1.0 (the "NPL"); you may not use this file except in +# compliance with the NPL. You may obtain a copy of the NPL at +# http://www.mozilla.org/NPL/ +# +# Software distributed under the NPL is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +# for the specific language governing rights and limitations under the +# NPL. +# +# The Initial Developer of this code under the NPL is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All Rights +# Reserved. +# + +# +# nglayout build script (debug) +# +use NGLayoutBuildList; +use Cwd; +use Moz; + +# configuration variables +$DEBUG = 1; +$pull{all} = 0; +$pull{lizard} = 0; +$pull{xpcom} = 0; +$pull{imglib} = 0; +$pull{netlib} = 0; +$pull{nglayout} = 0; +$pull{mac} = 0; + +$build{all} = 0; +$build{dist} = 0; +$build{projects}= 0; + +# +# UI +# + +@choices = ("pull_and_build_all", + "pull_all", + "build_all", + "pull_nglayout", + "build_dist", + "build_projects"); +#damn, this does not work on +if (0) +{ + @pick = MacPerl::Pick("What would you like to do?", @choices); + $pull{all} = 0; + $build{all} = 1; + foreach $i (@pick) + { + if ($i eq "pull_and_build_all") + { + $pull{all} = 1; + $build{all} = 1; + } + elsif ($i eq "pull_all") + { + $pull{all} = 1; + } + elsif ($i eq "build_all") + { + $build{all} = 1; + } + elsif ($i eq "build_dist") + { + $build{dist} = 1; + } + elsif ($i eq "build_projects") + { + $build{projects} = 1; + } + } +} +else +{ + $pull{all} = 1; + $build{all} = 0; +} + +if ($pull{all}) +{ + foreach $k (keys(%pull)) + { + $pull{$k} = 1; + } +} +if ($build{all}) +{ + foreach $k (keys(%build)) + { + $build{$k} = 1; + } +} + +# do the work +# you should not have to edit anything bellow + +chdir("::::"); +$MOZ_SRC = cwd(); + +OpenErrorLog(":::BuildLog"); +Checkout(); +chdir($MOZ_SRC); +BuildDist(); +chdir($MOZ_SRC); +BuildProjects(); diff --git a/build/mac/MacCVS.pm b/build/mac/MacCVS.pm new file mode 100644 index 000000000000..89758d7818ee --- /dev/null +++ b/build/mac/MacCVS.pm @@ -0,0 +1,198 @@ +#!perl -w +package MacCVS; + +# package Mac::Apps::MacCVS; this should really be the name of the package +# but due to our directory hierarchy in mozilla, I am not doing it + +require 5.004; +require Exporter; + +use strict; + +use vars qw($VERSION @ISA @EXPORT $MacCVSLib); +use Mac::StandardFile; +use Moz; +use Cwd; +use Exporter; +use File::Basename; + +@ISA = qw(Exporter); +@EXPORT = qw( new print checkout); +$VERSION = "1.00"; + +# Architecture: +# cvs session object: +# name - session name +# session_file - session file +# +# globals +# $MacCVSLib - location of MacCVS applescript library +# +# + +# +# utility routines +# + +# just like Mac::DoAppleScript, 1 is success, 0 is failure +sub _myDoAppleScript($) +{ + my($script) = @_; + my $asresult = MacPerl::DoAppleScript($script); + if ($asresult eq "0") + { + return 1; + } + else + { + print STDERR "AppleScript error: $asresult\n"; + print STDERR "AppleScript was: \n $script \n"; + return 0; + } +} + +# _useMacCVSLib +# returns 1 on success +# Search the include path for the file called MacCVSLib +sub _useMacCVSLib() +{ + unless ( defined($MacCVSLib) ) + { + my($libname) = "MacCVSLib"; +# try the directory we were run from + my($c) = dirname($0) . ":" . $libname; + if ( -e $c) + { + $MacCVSLib = $c; + } + else + { + # now search the include directories + foreach (@INC) + { + unless ( m/^Dev:Pseudo/ ) # This is some bizarre MacPerl special-case directory + { + $c = $_ . $libname; + if (-e $c) + { + $MacCVSLib = $c; + last; + } + } + } + } + if (! (-e $MacCVSLib)) + { + print STDERR "MacCVS lib could not be found! $MacCVSLib"; + return 0; + } + } + return 1; +} + + +# +# Session object methods +# + +sub new { + my ( $proto, $session_file) = @_; + my $class = ref($proto) || $proto; + my $self = {}; + + if ( defined($session_file) && ( -e $session_file) ) + { + $self->{"name"} = basename( $session_file ); + $self->{"session_file"} = $session_file; + bless $self, $class; + return $self; + } + else + { + print STDERR "MacCVS->new cvs file < $session_file > does not exist\n"; + return; + } +} + +# makes sure that the session is open +# assertSessionOpen() +# returns 1 on failure +sub assertSessionOpen() { + my ($self) = shift; + _useMacCVSLib() || die "Could not load MacCVSLib\n"; + my $script = <{session_file}") +END_OF_APPLESCRIPT + return _myDoAppleScript($script); +} + +# prints the cvs object, used mostly for debugging +sub print { + my($self) = shift; + print "MacCVS:: name: ", $self->{name}, " session file: ", $self->{session_file}, "\n"; +} + +# checkout( self, module, revision, date) +# MacCVS checkout command +# returns 1 on failure +sub checkout { + my($self, $module, $revision, $date ) = @_; + unless( defined ($module) ) { $module = ""; } # get rid of the pesky undefined warnings + unless( defined ($revision) ) { $revision = ""; } + unless( defined ($date) ) { $date = ""; } + + $self->assertSessionOpen() || return 1; + + my $script = <{name}", module:"$module", revision:"$revision", date:"$date" +END_OF_APPLESCRIPT + return _myDoAppleScript($script); +} + +1; +=pod + +=head1 NAME + +MacCVS - Interface to MacCVS + +=head1 SYNOPSIS + + use MacCVS; + $session = MacCVS->new( ) || die "cannot create session"; + $session->checkout([module] [revision] [date]) || die "Could not check out"; + +=head1 DESCRIPTION + +This is a MacCVS interface for talking to MacCVS Pro client. +MacCVSSession is the class used to manipulate the session + +=item new + MacCVS->new( ); + + Creates a new session. Returns undef on failure. + +=item checkout( [revision] [date] ) + + cvs checkout command. Revision and date are optional + returns 0 on failure + +=cut + +=head1 SEE ALSO + +=over + +=item MacCVS Home Page + +http://www.maccvs.org/ + +=back + +=head1 AUTHORS + +Aleks Totic atotic@netscape.com + +=cut + +__END__ diff --git a/build/mac/MacCVSLib b/build/mac/MacCVSLib new file mode 100644 index 0000000000000000000000000000000000000000..826cdc34c9cb4803650fc3abb721307f5d0735ff GIT binary patch literal 9592 zcmb_id3;sH^*{H$#|ydlO%f20BGgMT$Qpth5^-S_6hb6HpiuSYK%EEnA?v>C0uNs816y-vct|2)fKr{@uHDJdz?@t&WS^Z7Fsm_A~ zr_**{Z?9MRykVjDhmW?Z_6wZfr_qbI&xpo6cl=?8A69elghLYPn3taJ9#lQvOC{2D z6?*OQ+On?PGXzzG2HrWtvZ(yZ<4a~Vud)Ww%Aq>~cka4#@kGn_Ttj*gMZ59&Uk4z9gVj`<;m@U4Utr|J>y1_@pw4VoOYv$OfuKb zP3w2*YNfi9M$tjiZT2EwdnVf9#kyQCobDRqHf1wzJiHA3dmUcF&9r&)BI>0xZYG>w zmUdHKI0ovraH_f5o#l2$(`_i0CA?0zvrT$TM_UtKvm4D+yWvbS6O9~`@G|L0xZSIU zeAQ5HfOY|*3JPhX8z^W$I*qD*vwas7N=-1hZbmrWJb!Y7JHC2+jof9Z50o>bCm;DO zAf$j>%QQXS`6z%ly(p*vd@)na|D_TO0DMb)n|*gHcNG5JMkpCcCNf?klXjCWP#V^0 z5q}D&JU5+fTIxlheo|YbE~kuJpKXdoBkt^I#7m?->E}c*m5wG85VFP{A(pGGtDjvt z@(8ypnT1ii+(a_tX476b2HtWR0F0Nkhk4p#(QqQ-!K|4!!>)cdhJ8`4gJe@C98I`k zkhXUjQ9Tz-U}@=~Et6@l9XGDCv$Hy$JS`fFg{zaP)^Q*hhu1>UkZj3xidN0hbS4$W zXk)0diDtN(2rOMe_wFyDPdMRL!u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ib6DaNVpq*T@fFOaDZ!t^f~lz-Rgf-tgnQ7M e-PW!CpWW&|>Q?`);K_6tf77NQao_7#sQ&?H_Bnt6 literal 0 HcmV?d00001 diff --git a/build/mac/NGLayoutBuildList.pm b/build/mac/NGLayoutBuildList.pm new file mode 100644 index 000000000000..76f797f21b9a --- /dev/null +++ b/build/mac/NGLayoutBuildList.pm @@ -0,0 +1,271 @@ +#!perl -w +package NGLayoutBuildList; + +require 5.004; +require Exporter; + +use strict; +use vars qw(@ISA @EXPORT $IMGLIB_BRANCH $distlist); + +use MacCVS; +use Mac::StandardFile; +use Cwd; +use Moz; + +@ISA = qw(Exporter); +@EXPORT = qw( Checkout BuildDist ); + +# NGLayoutBuildList builds the nglayout project +# it is configured by setting the following variables in the caller: +# Usage: +# caller variables that affect behaviour: +# DEBUG : 1 if we are building a debug version +# 3-part build process: checkout, dist, and build_projects + +# +# declarations +# +$IMGLIB_BRANCH = "MODULAR_IMGLIB_BRANCH"; + + +# +# Utility routines +# + +# pickWithMemoryFile stores the information about the user pick inside +# the file $session_storage +sub _pickWithMemoryFile($) +{ + my ($sessionStorage) = @_; + my $cvsfile; + + if (( -e $sessionStorage) && + open( SESSIONFILE, $sessionStorage )) + { + # Read in the path if available + $cvsfile = ; + chomp $cvsfile; + close SESSIONFILE; + if ( ! -e $cvsfile ) + { + print STDERR "$cvsfile has disappeared\n"; + undef $cvsfile; + } + } + unless (defined ($cvsfile)) + { + # prompt user for the file name, and store it + print "Choose a CVS session file in file dialog box:\n"; # no way to display a prompt? + my $macFile = StandardGetFile( 0, "McvD"); + if ( $macFile->sfGood() ) + { + $cvsfile = $macFile->sfFile(); + # save the choice if we can + if ( open (SESSIONFILE, ">" . $sessionStorage)) + { + printf SESSIONFILE $cvsfile, "\n"; + close SESSIONFILE; + } + else + { + print STDERR "Could not open storage file\n"; + } + } + } + return $cvsfile; +} + +# assert that we are in the correct directory for the build +sub _assertRightDirectory() +{ + unless (-e ":mozilla") + { + my($dir) = cwd(); + print STDERR "NGLayoutBuildList called from incorrect directory: $dir"; + } +} + +# +# MAIN ROUTINES +# +sub Checkout() +{ + _assertRightDirectory(); + my($cvsfile) = _pickWithMemoryFile("::nglayout.cvsloc"); + my($session) = MacCVS->new( $cvsfile ); + unless (defined($session)) { die "Checkout aborted. Cannot create session file: $session" } + + if ($main::pull{lizard}) + { + $session->checkout("mozilla/LICENSE") || die "checkout failure"; + $session->checkout("mozilla/LEGAL") || die "checkout failure"; + $session->checkout("mozilla/config") || die "checkout failure"; + $session->checkout("mozilla/lib/liblayer") || die "checkout failure"; + $session->checkout("mozilla/modules/zlib") || die "checkout failure"; + $session->checkout("mozilla/modules/libutil") || die "checkout failure"; + $session->checkout("mozilla/nsprpub") || die "checkout failure"; + $session->checkout("mozilla/sun-java") || die "checkout failure"; + $session->checkout("mozilla/nav-java") || die "checkout failure"; + $session->checkout("mozilla/js") || die "checkout failure"; + $session->checkout("mozilla/modules/security/freenav") || die "checkout failure"; + $session->checkout("mozilla/modules/libpref") || die "checkout failure"; + } + if ($main::pull{xpcom}) + { + $session->checkout("mozilla/modules/libreg ") || die "checkout failure"; + $session->checkout("mozilla/xpcom") || die "checkout failure"; + } + if ($main::pull{imglib}) + { + $session->checkout("mozilla/jpeg ", $IMGLIB_BRANCH) || die "checkout failure"; + $session->checkout("mozilla/modules/libutil", $IMGLIB_BRANCH) || die "checkout failure"; + $session->checkout("mozilla/modules/libimg", $IMGLIB_BRANCH) || die "checkout failure"; + } + if ($main::pull{netlib}) + { + $session->checkout("mozilla/lib/xp ") || die "checkout failure"; + $session->checkout("mozilla/network") || die "checkout failure"; + $session->checkout("mozilla/include") || die "checkout failure"; + } + if ($main::pull{nglayout}) + { + $session->checkout("mozilla/base ") || die "checkout failure"; + $session->checkout("mozilla/dom") || die "checkout failure"; + $session->checkout("mozilla/gfx") || die "checkout failure"; + $session->checkout("mozilla/htmlparser") || die "checkout failure"; + $session->checkout("mozilla/layout") || die "checkout failure"; + $session->checkout("mozilla/view") || die "checkout failure"; + $session->checkout("mozilla/webshell") || die "checkout failure"; + $session->checkout("mozilla/widget") || die "checkout failure"; + } + if ($main::pull{mac}) + { + $session->checkout("mozilla/build/mac ") || die "checkout failure"; + $session->checkout("mozilla/cmd/macfe") || die "checkout failure"; + $session->checkout("mozilla/lib/mac/MacMemoryAllocator") || die "checkout failure"; + $session->checkout("mozilla/lib/mac/NSStdLib") || die "checkout failure"; + $session->checkout("mozilla/lib/mac/MoreFiles") || die "checkout failure"; + $session->checkout("mozilla/lib/mac/NSRuntime") || die "checkout failure"; + } +} + +# builds the dist directory +sub BuildDist() +{ + unless ( $main::build{dist} ) { return;} + _assertRightDirectory(); + + my($distlist) = [ +#INCLUDE + [":mozilla:config:mac:MANIFEST", ":mozilla:dist:config:"], + [":mozilla:include:MANIFEST", ":mozilla:dist:include:"], + [":mozilla:cmd:macfe:pch:MANIFEST", ":mozilla:dist:include:"], +#NSPR + [":mozilla:nsprpub:pr:include:MANIFEST", ":mozilla:dist:nspr:"], + [":mozilla:nsprpub:pr:src:md:mac:MANIFEST", ":mozilla:dist:nspr:mac:"], + [":mozilla:nsprpub:lib:ds:MANIFEST", ":mozilla:dist:nspr:"], + [":mozilla:nsprpub:lib:libc:include:MANIFEST", ":mozilla:dist:nspr:"], + [":mozilla:nsprpub:lib:msgc:include:MANIFEST", ":mozilla:dist:nspr:"], +#JPEG + [":mozilla:jpeg:MANIFEST", ":mozilla:dist:jpeg:"], +#LIBREG + [":mozilla:modules:libreg:include:MANIFEST", ":mozilla:dist:libreg:"], +#XPCOM + [":mozilla:xpcom:src:MANIFEST", ":mozilla:dist:xpcom:"], +#ZLIB + [":mozilla:modules:zlib:src:MANIFEST", ":mozilla:dist:zlib:"], +#LIBUTIL + [":mozilla:modules:libutil:public:MANIFEST", ":mozilla:dist:libutil:"], +#SUN_JAVA + [":mozilla:sun-java:stubs:include:MANIFEST", ":mozilla:dist:sun-java:"], + [":mozilla:sun-java:stubs:macjri:MANIFEST", ":mozilla:dist:sun-java:"], +#NAV_JAVA + [":mozilla:nav-java:stubs:include:MANIFEST", ":mozilla:dist:nav-java:"], + [":mozilla:nav-java:stubs:macjri:MANIFEST", ":mozilla:dist:nav-java:"], +#JS + [":mozilla:js:src:MANIFEST", ":mozilla:dist:js:"], +#SECURITY_freenav + [":mozilla:modules:security:freenav:MANIFEST", ":mozilla:dist:security:"], +#LIBPREF + [":mozilla:modules:libpref:public:MANIFEST", ":mozilla:dist:libpref:"], +#LIBIMAGE + [":mozilla:modules:libimg:png:MANIFEST", ":mozilla:dist:libimg:"], + [":mozilla:modules:libimg:src:MANIFEST", ":mozilla:dist:libimg:"], + [":mozilla:modules:libimg:public:MANIFEST", ":mozilla:dist:libimg:"], +#NETWORK + [":mozilla:network:cache:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:client:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:cnvts:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:cstream:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:main:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:mimetype:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:util:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:protocol:about:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:protocol:certld:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:protocol:dataurl:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:protocol:file:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:protocol:ftp:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:protocol:gopher:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:protocol:http:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:protocol:js:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:protocol:mailbox:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:protocol:marimba:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:protocol:nntp:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:protocol:pop3:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:protocol:remote:MANIFEST", ":mozilla:dist:network:"], + [":mozilla:network:protocol:smtp:MANIFEST", ":mozilla:dist:network:"], +#BASE +#XP +#error still not exported + ]; + foreach $a (@$distlist) + { + print "InstallFromManifest $a->[0] $a->[1]\n"; + InstallFromManifest( $a->[0], $a->[1]); + } +} + +# builds all projects +# different targets controlled by $main::build +sub BuildProjects() +{ + unless( $main::build{projects} ) { return; } + _assertRightDirectory(); + + # $D becomes a suffix to target names for selecting either the debug or non-debug target of a project + my($D) = $main::DEBUG ? " (Debug)" : ""; + + Moz::BuildProject(":mozilla:lib:mac:NSStdLib:NSStdLib.mcp", "Stub Library"); + Moz::BuildProject(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator.mcp", "Stub Library"); + Moz::BuildProject(":mozilla:cmd:macfe:projects:client:Navigator.mcp", "Stub Library"); + + Moz::BuildProject(":mozilla:lib:mac:NSRuntime:NSRuntime.mcp"); + Moz::BuildProject(":mozilla:cmd:macfe:restext:NavStringLibPPC.mcp"); + Moz::BuildProject(":mozilla:lib:mac:MoreFiles:build:MoreFilesPPC.prj"); + + if ( $D ) + { + Moz::BuildProject(":mozilla:nsprpub:macbuild:NSPR20PPCDebug.mcp"); + Moz::BuildProject(":mozilla:dbm:macbuild:DBMPPCDebug.mcp"); + } + else + { + Moz::BuildProject(":mozilla:nsprpub:macbuild:NSPR20PPC.mcp"); + Moz::BuildProject(":mozilla:dbm:macbuild:DBMPPC.mcp"); + } + + Moz::BuildProject(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator.mcp", "PPC Shared Library$D"); + Moz::BuildProject(":mozilla:lib:mac:NSStdLib:NSStdLib.mcp", "PPC Shared Library"); + Moz::BuildProject(":mozilla:modules:security:freenav:macbuild:NoSecurity.mcp", "PPC Shared Library$D"); + + if ( $D ) + { + Moz::BuildProject(":mozilla:xpcom:macbuild:xpcomPPCDebug.mcp"); + } + else + { + Moz::BuildProject(":mozilla:xpcom:macbuild:xpcomPPC.mcp"); + } + Moz::BuildProject(":mozilla:jpeg:macbuild:JPEG.mcp", "PPC Shared Library$D"); + +}