bug 288199 - Rebrand suite installer, unix part - patch by Mark Banner <bugzilla@standard8.demon.co.uk> r=ajschult sr=dveditz a=asa

This commit is contained in:
kairo%kairo.at 2005-04-11 17:06:40 +00:00
Родитель 24d70ab4a4
Коммит 455e2bea65
13 изменённых файлов: 101 добавлений и 506 удалений

Просмотреть файл

@ -59,7 +59,7 @@ endif
endif
endif
B_NAME = mozilla-$(TARGET_CPU)-$(TARGET_VENDOR)-$(TARGET_OS)$(PKG_NAME_EXTRAS)
B_NAME = $(MOZ_APP_NAME)-$(TARGET_CPU)-$(TARGET_VENDOR)-$(TARGET_OS)$(PKG_NAME_EXTRAS)
STUB_NAME = $(B_NAME)-installer
SEA_NAME = $(B_NAME)-full-installer
@ -70,7 +70,7 @@ endif
installer:
$(PERL) $(srcdir)/deliver.pl \
-o $(DEPTH) -s $(topsrcdir) \
$(MOZILLA_VERSION) $(INSTALLER_URL) $(STUB_NAME) $(SEA_NAME)
$(MOZILLA_VERSION) $(INSTALLER_URL) $(STUB_NAME) $(SEA_NAME) NO $(MOZ_APP_NAME) $(MOZ_APP_DISPLAYNAME)
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -50,7 +50,7 @@ function upgradeCleanup()
var srDest = $SpaceRequired$;
var err = initInstall("Mozilla Navigator", "Browser", "$Version$");
var err = initInstall("$AppDisplayName$ Navigator", "Browser", "$Version$");
logComment("initInstall: " + err);
var communicatorFolder = getFolder("Program");

Просмотреть файл

@ -1,9 +1,9 @@
;-------------------------------------------------------------------------
[General]
;-------------------------------------------------------------------------
Default Location=/usr/local/mozilla
Default Location=/usr/local/$AppName$
; *** LOCALIZE ME BABY ***
Title=Mozilla Installer
Title=$AppDisplayName$ Installer
; The Default Setup Type value must exactly match the "Description Short"
; value of the desired setup type.
; *** LOCALIZE ME BABY ***
@ -21,7 +21,7 @@ ObjectToIgnore1=install.log
[Dialog Welcome]
;-------------------------------------------------------------------------
Show Dialog=TRUE
Title=Mozilla Installer
Title=$AppDisplayName$ Installer
Readme File=README
@ -29,14 +29,14 @@ Readme File=README
[Dialog License]
;-------------------------------------------------------------------------
Show Dialog=TRUE
Title=Mozilla Installer
Title=$AppDisplayName$ Installer
License File=MPL-1.1.txt
;-------------------------------------------------------------------------
[Dialog Setup Type]
;-------------------------------------------------------------------------
Title=Mozilla Installer
Title=$AppDisplayName$ Installer
; *** LOCALIZE ME BABY ***
Message0=Please select the setup type you wish to install.
@ -108,7 +108,7 @@ C11=Component11
;-------------------------------------------------------------------------
[Dialog Select Components]
;-------------------------------------------------------------------------
Title=Mozilla Installer
Title=$AppDisplayName$ Installer
; *** LOCALIZE ME BABY ***
Message0=Please select the components you wish to install.
@ -165,7 +165,7 @@ URL0=$URLPath$
[Component5]
Description Short=Quality Feedback Agent
; *** LOCALIZE ME BABY ***
Description Long=for reporting Mozilla crash information
Description Long=for reporting $AppDisplayName$ crash information
Archive=talkback.xpi
Install Size=1960
Archive Size=812
@ -236,7 +236,7 @@ URL0=$URLPath$
[Dialog Start Install]
;-------------------------------------------------------------------------
Show Dialog=TRUE
Title=Mozilla Installer
Title=$AppDisplayName$ Installer
; *** LOCALIZE ME BABY ***
Message0=Click the Install button to proceed with this installation.
XPInstall Engine=xpcom.xpi
@ -259,6 +259,6 @@ Arguments=regchrome
;-------------------------------------------------------------------------
[LegacyCheck0]
;-------------------------------------------------------------------------
Filename=mozilla-bin
Filename=$AppName$-bin
; *** LOCALIZE ME BABY ***
Message=The selected directory already contains a Mozilla installation. To delete %s completely, please press the 'Delete Directory' button. Information in your Mozilla profile(s) should not be affected. Or, please press the 'Cancel' button and choose a different destination directory.
Message=The selected directory already contains a $AppDisplayName$ installation. To delete %s completely, please press the 'Delete Directory' button. Information in your $AppDisplayName$ profile(s) should not be affected. Or, please press the 'Cancel' button and choose a different destination directory.

Просмотреть файл

@ -38,8 +38,8 @@
# ***** END LICENSE BLOCK *****
#==============================================================================
# usage: perl deliver.pl version URLPath stubName blobName buildWizard
# e.g. perl deliver.pl 5.0.0.1 ftp://foo/ mozilla-installer mozilla-installer
# usage: perl deliver.pl version URLPath stubName blobName buildWizard appName appDisplayName
# e.g. perl deliver.pl 5.0.0.1 ftp://foo/ mozilla-installer mozilla-installer mozilla Mozilla
#
# Delivers the stub and blob installers to mozilla/installer/stub
# and mozilla/installer/sea, respectively. Also, delivers the .xpis
@ -58,7 +58,6 @@
use Cwd;
#// constants
$SUBDIR = "mozilla-installer";
$_DEPTH = "../../..";
$_orig = cwd();
chdir($_DEPTH); # resolve absolute path
@ -79,22 +78,29 @@ $aURLPath = "ftp://ftp.mozilla.org/";
$aStubName = "mozilla-installer";
$aBlobName = "mozilla-installer";
$aBuildWizard = "NO";
$aMozAppName = "mozilla";
$aMozAppDisplayName = "Mozilla";
#// parse args
# all optional args: version, URLPath, stubName, blobName
if ($#ARGV >= 4) { $aBuildWizard = $ARGV[4]; }
if ($#ARGV >= 3) { $aBlobName = $ARGV[3]; }
if ($#ARGV >= 2) { $aStubName = $ARGV[2]; }
if ($#ARGV >= 1) { $aURLPath = $ARGV[1]; }
if ($#ARGV >= 0) { $aVersion = $ARGV[0]; }
# all optional args: version, URLPath, stubName, blobName, mozAppName,
# mozAppDisplayName
if ($#ARGV >= 6) { $aMozAppDisplayName = $ARGV[6]; }
if ($#ARGV >= 5) { $aMozAppName = $ARGV[5]; }
if ($#ARGV >= 4) { $aBuildWizard = $ARGV[4]; }
if ($#ARGV >= 3) { $aBlobName = $ARGV[3]; }
if ($#ARGV >= 2) { $aStubName = $ARGV[2]; }
if ($#ARGV >= 1) { $aURLPath = $ARGV[1]; }
if ($#ARGV >= 0) { $aVersion = $ARGV[0]; }
#// create dist structure (mozilla/installer/{stage,raw,stub,sea})
$SUBDIR = "$aMozAppName-installer";
#// create dist structure ($ROOT/{stage,raw,stub,sea})
if (-e $ROOT)
{
if (-w $ROOT)
{ system("rm -rf $ROOT"); }
else
{ die "--- deliver.pl: check perms on mozilla/installer: $!"; }
{ die "--- deliver.pl: check perms on $ROOT: $!"; }
}
mkdir($ROOT, 0777) || die "--- deliver.pl: couldn't mkdir root: $!";
@ -120,12 +126,12 @@ if ($aBuildWizard eq "buildwizard")
}
#// deliver wizard to staging area (mozilla/installer/stage)
copy("$WIZARD/mozilla-installer", $RAW);
copy("$WIZARD/mozilla-installer-bin", $RAW);
copy("$WIZARD/mozilla-installer", "$RAW/$aMozAppName-installer");
copy("$WIZARD/mozilla-installer-bin", "$RAW/$aMozAppName-installer-bin");
copy("$WIZARD/installer.ini", $RAW);
copy("$WIZARD/README", $RAW);
copy("$WIZARD/MPL-1.1.txt", $RAW);
chmod(0755, "$RAW/mozilla-installer"); #// ensure shell script is executable
chmod(0755, "$RAW/$aMozAppName-installer"); #// ensure shell script is executable
spew("Completed delivering wizard");
@ -144,7 +150,7 @@ spew("Completed xptlinking");
#// call makeall.pl tunneling args (delivers .xpis to mozilla/installer/stage)
chdir("$TREETOP/xpinstall/packager/unix");
system("perl makeall.pl $aVersion $aURLPath $STAGE $XPI");
system("perl makeall.pl $aVersion $aURLPath $STAGE $XPI $aMozAppName $aMozAppDisplayName");
system("mv $TREETOP/xpinstall/packager/unix/config.ini $RAW");
spew("Completed making .xpis");
@ -157,7 +163,7 @@ spew("Completed making .xpis");
spew("Creating stub installer tarball...");
chdir("$RAW/..");
system("mv $RAW $ROOT/$SUBDIR");
system("tar cvf $STUB/$aStubName.tar ./$SUBDIR/mozilla-installer ./$SUBDIR/mozilla-installer-bin ./$SUBDIR/installer.ini ./$SUBDIR/README ./$SUBDIR/config.ini ./$SUBDIR/MPL-1.1.txt");
system("tar cvf $STUB/$aStubName.tar ./$SUBDIR/$aMozAppName-installer ./$SUBDIR/$aMozAppName-installer-bin ./$SUBDIR/installer.ini ./$SUBDIR/README ./$SUBDIR/config.ini ./$SUBDIR/MPL-1.1.txt");
system("mv $ROOT/$SUBDIR $RAW");
system("gzip $STUB/$aStubName.tar");
spew("Completed creating stub installer tarball");
@ -173,7 +179,7 @@ spew("Completed creating blob (aka full or sea) installer tarball");
chdir($_orig);
spew("Completed packaging stub and sea");
spew("Installers built (see mozilla/installer/{stub,sea})");
spew("Installers built (see $ROOT/{stub,sea})");
#-------------------------------------------------------------------------

Просмотреть файл

@ -38,8 +38,8 @@
# ***** END LICENSE BLOCK *****
#==============================================================================
# usage: perl deliver.pl version URLPath stubName blobName buildWizard
# e.g. perl deliver.pl 5.0.0.1 ftp://foo/ mozilla-installer mozilla-installer
# usage: perl deliver.pl version URLPath stubName blobName buildWizard appName appDisplayName
# e.g. perl deliver.pl 5.0.0.1 ftp://foo/ mozilla-installer mozilla-installer mozilla Mozilla
#
# Delivers the stub and blob installers to mozilla/installer/stub
# and mozilla/installer/sea, respectively. Also, delivers the .xpis
@ -64,7 +64,6 @@ getopts('o:s:');
@libraryList = undef;
#// constants
$SUBDIR = "mozilla-installer";
$_DEPTH = "../../..";
# Determine topsrcdir
@ -101,22 +100,29 @@ $aURLPath = "ftp://ftp.mozilla.org/";
$aStubName = "mozilla-installer";
$aBlobName = "mozilla-installer";
$aBuildWizard = "NO";
$aMozAppName = "mozilla";
$aMozAppDisplayName = "Mozilla";
#// parse args
# all optional args: version, URLPath, stubName, blobName
if ($#ARGV >= 4) { $aBuildWizard = $ARGV[4]; }
if ($#ARGV >= 3) { $aBlobName = $ARGV[3]; }
if ($#ARGV >= 2) { $aStubName = $ARGV[2]; }
if ($#ARGV >= 1) { $aURLPath = $ARGV[1]; }
if ($#ARGV >= 0) { $aVersion = $ARGV[0]; }
# all optional args: version, URLPath, stubName, blobName, MozAppName,
# MozDisplayName
if ($#ARGV >= 6) { $aMozAppDisplayName = $ARGV[6]; }
if ($#ARGV >= 5) { $aMozAppName = $ARGV[5]; }
if ($#ARGV >= 4) { $aBuildWizard = $ARGV[4]; }
if ($#ARGV >= 3) { $aBlobName = $ARGV[3]; }
if ($#ARGV >= 2) { $aStubName = $ARGV[2]; }
if ($#ARGV >= 1) { $aURLPath = $ARGV[1]; }
if ($#ARGV >= 0) { $aVersion = $ARGV[0]; }
#// create dist structure (mozilla/installer/{stage,raw,stub,sea})
$SUBDIR = "$aMozAppName-installer";
#// create dist structure ($ROOT/{stage,raw,stub,sea})
if (-e $ROOT)
{
if (-w $ROOT)
{ system("rm -rf $ROOT"); }
else
{ die "--- deliver.pl: check perms on mozilla/installer: $!"; }
{ die "--- deliver.pl: check perms on $ROOT: $!"; }
}
mkdir($ROOT, 0777) || die "--- deliver.pl: couldn't mkdir root: $!";
@ -142,12 +148,12 @@ if ($aBuildWizard eq "buildwizard")
}
#// deliver wizard to staging area (mozilla/installer/stage)
copy("$WIZSRC/mozilla-installer", $RAW);
copy("$WIZARD/mozilla-installer-bin", $RAW);
copy("$WIZSRC/mozilla-installer", "$RAW/$aMozAppName-installer");
copy("$WIZARD/mozilla-installer-bin", "$RAW/$aMozAppName-installer-bin");
copy("$WIZSRC/installer.ini", $RAW);
copy("$WIZSRC/README", $RAW);
copy("$WIZSRC/MPL-1.1.txt", $RAW);
chmod(0755, "$RAW/mozilla-installer"); #// ensure shell script is executable
chmod(0755, "$RAW/$aMozAppName-installer"); #// ensure shell script is executable
spew("Completed delivering wizard");
@ -182,7 +188,7 @@ spew("Completed signing NSS libraries");
#// call makeall.pl tunneling args (delivers .xpis to $topobjdir/installer/stage)
chdir("$topsrcdir/xpinstall/packager/unix");
system("perl makeall.pl $aVersion $aURLPath $STAGE $XPI");
system("perl makeall.pl $aVersion $aURLPath $STAGE $XPI $aMozAppName $aMozAppDisplayName");
system("mv $topsrcdir/xpinstall/packager/unix/config.ini $RAW");
spew("Completed making .xpis");
@ -195,7 +201,7 @@ my $create_tar = 'tar -cv --owner=0 --group=0 --numeric-owner --mode="go-w" -f';
spew("Creating stub installer tarball...");
chdir("$RAW/..");
system("mv $RAW $ROOT/$SUBDIR");
system($create_tar . "$STUB/$aStubName.tar ./$SUBDIR/mozilla-installer ./$SUBDIR/mozilla-installer-bin ./$SUBDIR/installer.ini ./$SUBDIR/README ./$SUBDIR/config.ini ./$SUBDIR/MPL-1.1.txt");
system($create_tar . "$STUB/$aStubName.tar ./$SUBDIR/$aMozAppName-installer ./$SUBDIR/$aMozAppName-installer-bin ./$SUBDIR/installer.ini ./$SUBDIR/README ./$SUBDIR/config.ini ./$SUBDIR/MPL-1.1.txt");
system("mv $ROOT/$SUBDIR $RAW");
system("gzip $STUB/$aStubName.tar");
spew("Completed creating stub installer tarball");
@ -211,7 +217,7 @@ spew("Completed creating blob (aka full or sea) installer tarball");
chdir($_orig);
spew("Completed packaging stub and sea");
spew("Installers built (see mozilla/installer/{stub,sea})");
spew("Installers built (see $ROOT/{stub,sea})");
#-------------------------------------------------------------------------

Просмотреть файл

@ -1,33 +0,0 @@
var srDest = $SpaceRequired$;
var err = initInstall("Mozilla Editor", "Editor", "$Version$");
logComment("initInstall: " + err);
var communicatorFolder = getFolder("Program");
logComment("communicatorFolder: " + communicatorFolder);
if (verifyDiskSpace(communicatorFolder, srDest))
{
err = addDirectory("Program",
"$Version$",
"bin", // jar source folder
communicatorFolder, // target folder
"", // target subdir
true ); // force Flag
logComment("addDirectory() returned: " + err);
err = getLastError();
if (err==SUCCESS)
{
err = performInstall();
logComment("performInstall() returned: " + err);
}
else
{
cancelInstall(err);
logComment("cancelInstall() due to error: " + err);
}
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);

Просмотреть файл

@ -7,7 +7,7 @@ function upgradeCleanup()
var srDest = $SpaceRequired$;
var err = initInstall("Mozilla Mail", "Mail", "$Version$");
var err = initInstall("$AppDisplayName$ Mail", "Mail", "$Version$");
logComment("initInstall: " + err);
var communicatorFolder = getFolder("Program");

Просмотреть файл

@ -43,10 +43,10 @@
# This perl script builds the xpi, config.ini, and js files.
#
# Make sure there are at least four arguments
if($#ARGV < 3)
# Make sure there are at least six arguments
if(@ARGV < 6)
{
die "usage: $0 <default version> <URL path> <staging path> <dist install path>
die "usage: $0 <default version> <URL path> <staging path> <dist install path> <app name> <app display name>
default version : julian based date version
ie: 5.0.0.99257
@ -59,6 +59,10 @@ if($#ARGV < 3)
dist install path : full path to target dist area
app name : the base name for executables (e.g. mozilla)
app display name : the display name to use
\n";
}
@ -66,6 +70,8 @@ $inDefaultVersion = $ARGV[0];
$inURLPath = $ARGV[1];
$inStagePath = $ARGV[2];
$inDistPath = $ARGV[3];
$inAppName = $ARGV[4];
$inAppDisplayName = $ARGV[5];
# Check for existance of staging path
if(!(-e "$inStagePath"))
@ -104,7 +110,7 @@ exit(0);
sub MakeConfigFile
{
# Make config.ini file
if(system("perl makecfgini.pl config.it $inDefaultVersion $inStagePath $inDistPath $inURLPath") != 0)
if(system("perl makecfgini.pl config.it $inDefaultVersion $inStagePath $inDistPath $inURLPath $inAppName $inAppDisplayName") != 0)
{
exit(1);
}
@ -115,7 +121,7 @@ sub MakeXpiFile
my($componentName) = @_;
# Make .xpi file
if(system("perl makexpi.pl $componentName $inStagePath $inDistPath $inDefaultVersion") != 0)
if(system("perl makexpi.pl $componentName $inStagePath $inDistPath $inDefaultVersion $inAppDisplayName") != 0)
{
exit(1);
}

Просмотреть файл

@ -55,22 +55,29 @@
# URL path
# - path to where the .xpi files are staged. can be
# either ftp:// or http://
# App Name
# - the base name to use for executables (e.g. mozilla)
# App Display Name
# - the application display name to use.
#
# ie: perl makecfgini.pl config.it 5.0.0.1999120608 z:\exposed\windows\32bit\en\5.0 d:\builds\mozilla\dist\win32_0.obj\install\xpi ftp://sweetlou/products/client/seamonkey/windows/32bit/x86/1999-09-13-10-M10
#
# Make sure there are at least two arguments
if($#ARGV < 4)
# Make sure there are at least seven arguments
if(@ARGV < 7)
{
die "usage: $0 <.it file> <version> <staging path> <.xpi path> <URL path>
<app name> <app display name>
.it file : input ini template file
version : version to be shown in setup. Typically the same version
as show in mozilla.exe.
staging path : path to where the components are staged at
.xpi path : path to where the .xpi files have been built to
URL path : URL path to where the .xpi files will be staged at.
Either ftp:// or http:// can be used
.it file : input ini template file
version : version to be shown in setup. Typically the same
version as show in mozilla.exe.
staging path : path to where the components are staged at
.xpi path : path to where the .xpi files have been built to
URL path : URL path to where the .xpi files will be staged at.
Either ftp:// or http:// can be used
app name : the base name to use for executables.
app display name : the application display name to use.
\n";
}
@ -79,6 +86,8 @@ $inVersion = $ARGV[1];
$inStagePath = $ARGV[2];
$inXpiPath = $ARGV[3];
$inURLPath = $ARGV[4];
$inAppName = $ARGV[5];
$inAppDisplayName = $ARGV[6];
# Get the name of the file replacing the .it extension with a .ini extension
@inItFileSplit = split(/\./,$inItFile);
@ -135,6 +144,18 @@ while($line = <fpInIt>)
$line =~ s/\$Version\$/$inVersion/i;
print fpOutIni $line;
}
elsif($line =~ /\$AppDisplayName\$/i)
{
# For each line read, search and replace $AppName$ with the version passed in
$line =~ s/\$AppDisplayName\$/$inAppDisplayName/ig;
print fpOutIni $line;
}
elsif($line =~ /\$AppName\$/i)
{
# For each line read, search and replace $AppName$ with the version passed in
$line =~ s/\$AppName\$/$inAppName/i;
print fpOutIni $line;
}
else
{
# For each line read, search and replace $URLPath$ with the supplied URL

Просмотреть файл

@ -1,174 +0,0 @@
#!/usr/bin/perl -w
#
# ***** 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) 1998-1999
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Sean Su <ssu@netscape.com>
# Samir Gehani <sgehani@netscape.com>
#
# 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 *****
#
# This perl script parses the input file for special variables
# in the format of $Variable$ and replace it with the appropriate
# value(s).
#
# Input: .jst file - which is a .js template
# default version - a julian date in the form of:
# major.minor.release.yydoy
# ie: 5.0.0.99256
# staging path - path to where the components are staged at
#
# ie: perl makejs.pl core.jst 5.0.0.99256 ../../staging_area/core
#
##
# GetSpaceRequired
#
# Finds the space used by the contents of a dir by recursively
# traversing the subdir hierarchy and counting individual file
# sizes
#
# @param targetDir the directory whose space usage to find
# @return spaceUsed the number of bytes used by the dir contents
#
sub GetSpaceRequired
{
my($targetDir) = $_[0];
my($spaceUsed) = 0;
my(@dirEntries) = ();
my($item) = "";
@dirEntries = <$targetDir/*>;
# iterate over all dir entries
foreach $item ( @dirEntries )
{
# if dir entry is dir
if (-d $item)
{
# add GetSpaceRequired(<dirEntry>) to space used
$spaceUsed += GetSpaceRequired($item);
}
# else if dir entry is file
elsif (-e $item)
{
# add size of file to space used
$spaceUsed += (-s $item);
}
}
return $spaceUsed;
}
# Make sure there are at least three arguments
if($#ARGV < 2)
{
die "usage: $0 <.jst file> <default version> <staging path> [<.js file>]
.jst file : .js template input file
.js file : .js output file
default version : default julian base version number to use in the
form of: major.minor.release.yydoy
ie: 5.0.0.99256
component staging path : path to where this component is staged at
ie: ./../staging_area/core
\n";
}
$inJstFile = $ARGV[0];
$inVersion = $ARGV[1];
$inStagePath = $ARGV[2];
$fullProgName = $0;
$fullProgName =~ /(.*)makejs\.pl$/;
if ($1){
$pathName = $1;
} else {
$pathName = ".";
}
# Get the name of the file replacing the .jst extension with a .js extension
@inJstFileSplit = split(/\./,$inJstFile);
$outJsFile = $inJstFileSplit[0];
$outJsFile .= ".js";
if($#ARGV >= 3) {$outJsFile = $ARGV[3];};
@outJsFileSplit = split(/\./,$outJsFile);
$outTempFile = $outJsFileSplit[0];
$outTempFile .= ".template";
system("cp $pathName/../common/share.t $outTempFile");
system("cat $inJstFile >> $outTempFile");
# Open the input template file
open(fpInJst, "<$outTempFile") || die "\ncould not open $outTempFile: $!\n";
# Open the output .js file
open(fpOutJs, ">$outJsFile") || die "\nCould not open $outJsFile: $!\n";
# While loop to read each line from input file
while($line = <fpInJst>)
{
# For each line read, search and replace $Version$ with the version passed in
if($line =~ /\$Version\$/i)
{
$line =~ s/\$Version\$/$inVersion/i;
}
# For each line read, search and replace $SpaceRequired$ with the version passed in
if($line =~ /\$SpaceRequired\$/i)
{
$spaceRequired = 0;
# split read line by ":" delimiter
@colonSplit = split(/:/, $line);
if($#colonSplit > 0)
{
@semiColonSplit = split(/;/, $colonSplit[1]);
$subDir = $semiColonSplit[0];
$spaceRequired = GetSpaceRequired("$inStagePath/$subDir");
$spaceRequired = int($spaceRequired/1024) + 1;
$line =~ s/\$SpaceRequired\$:$subDir/$spaceRequired/i;
}
else
{
$spaceRequired = GetSpaceRequired("$inStagePath");
$spaceRequired = int($spaceRequired/1024) + 1;
$line =~ s/\$SpaceRequired\$/$spaceRequired/i;
}
}
print fpOutJs $line;
}
system("rm $outTempFile");

Просмотреть файл

@ -1,141 +0,0 @@
#!/usr/bin/perl -w
#
# ***** 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) 1998-1999
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Sean Su <ssu@netscape.com>
# Samir Gehani <sgehani@netscape.com>
# Chase Phillips <cmp@mozilla.org>
#
# 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 *****
#
# This perl script creates .xpi files given component input name
#
# Input: component name
# - name of the component directory located in the staging path
# staging path
# - path to where the built files are staged at
# dest path
# - path to where the .xpi files are are to be created at.
# ** MUST BE AN ABSOLUTE PATH, NOT A RELATIVE PATH **
#
# ie: perl makexpi.pl core z:\exposed\windows\32bit\en\5.0
# d:\build\mozilla\dist\win32_o.obj\install\working
#
use Cwd;
sub MakeJsFile
{
my($componentName) = @_;
# Make .js file
if(system("perl makejs.pl $componentName.jst $inDefaultVersion $inStagePath/$componentName install.js") != 0)
{
exit(1);
}
}
# Make sure there are at least three arguments
if($#ARGV < 2)
{
die "usage: $0 <component name> <staging path> <dest path>
component name : name of component directory within staging path
staging path : path to where the components are staged at
dest path : path to where the .xpi files are to be created at
\n";
}
$inComponentName = $ARGV[0];
$inStagePath = $ARGV[1];
$inDestPath = $ARGV[2];
$inDefaultVersion = $ARGV[3];
# check for existence of staging component path
if(!(-e "$inStagePath/$inComponentName"))
{
die "invalid path: $inStagePath/$inComponentName\n";
}
# delete component .xpi file
if(-e "$inDestPath/$inComponentName.xpi")
{
unlink("$inDestPath/$inComponentName.xpi");
}
if(-e "$inStagePath/$inComponentName/$inComponentName.xpi")
{
unlink("$inDestPath/$inComponentName.xpi");
}
# delete install.js
if(-e "install.js")
{
unlink("install.js");
}
# make sure inDestPath exists
if(!(-e "$inDestPath"))
{
system("mkdir $inDestPath");
}
print "\n Making $inComponentName.xpi...\n";
$saveCwdir = cwd();
# change directory to where the files are, else zip will store
# unwanted path information.
chdir("$inStagePath/$inComponentName");
system("zip -r -y $inDestPath/$inComponentName.xpi *");
chdir("$saveCwdir");
# Make .js file
MakeJsFile($inComponentName);
system("zip -g $inDestPath/$inComponentName.xpi install.js");
# delete install.js
if(-e "install.js")
{
unlink("install.js");
}
print " done!\n";
# end of script
exit(0);

Просмотреть файл

@ -1,25 +0,0 @@
var srDest = $SpaceRequired$;
var err = initInstall("Mozilla Myspell Spellchecker", "Spellchecker", "$Version$");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram)
if (verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
addDirectory("Spellchecker",
"$Version$",
"bin",
fProgram,
"");
if (err==SUCCESS)
performInstall();
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);

Просмотреть файл

@ -1,71 +0,0 @@
#!/bin/sh
#
# ***** 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) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Samir Gehani <sgehani@netscape.com>
#
# 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 *****
#=====================================================================
#
# Mozilla Installer
#
# Shell script to set up environment before running the
# mozilla-installer-bin GTK based binary installer.
#
# The mozilla-installer-bin binary is an install wizard that
# collects user preferences about modules to install and where to
# install them. The program then proceeds to install Mozilla.
#
#=====================================================================
LD_LIBRARY_PATH=.${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"}
LIBPATH=.${LIBPATH+":$LIBPATH"}
export LD_LIBRARY_PATH LIBPATH
unset MOZILLA_FIVE_HOME
PATH=.${PATH+":$PATH"}
export PATH
BASEDIR=`dirname "$0"`
if [ "$BASEDIR" = "" ]; then
echo "dirname is not in your PATH"
./mozilla-installer-bin ${1+"$@"}
else
cd "${BASEDIR:-.}"
./mozilla-installer-bin ${1+"$@"}
fi