these files are part of bug #17109. It's to help with calculating

the correct disk space required during installation.  It doesn't fix this
bug, but it's part of getting it done.

All these files are not part of tinderbox build.  They are only Windows
platform too.

r=sgehani
This commit is contained in:
ssu%netscape.com 1999-11-11 01:54:58 +00:00
Родитель 713e4b0578
Коммит ea7081d1ad
3 изменённых файлов: 42 добавлений и 7 удалений

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

@ -194,6 +194,7 @@ Description Long=Browser software for the internet
Archive=core.xpi
$InstallSize$:core
$InstallSizeSystem$
$InstallSizeArchive$:core.xpi
; Attributes can be the following values:
; SELECTED - the component is selected to be installed by default.
; INVISIBLE - the component is not shown in the Select Components dialog.
@ -210,6 +211,7 @@ Description Long=Seamonkey Mail&News
Archive=mail.xpi
$InstallSize$:mail
$InstallSizeSystem$
$InstallSizeArchive$:mail.xpi
;Dependency0=Netscape Seamonkey
; Attributes can be the following values:
; SELECTED - the component is selected to be installed by default.
@ -225,6 +227,7 @@ url0=$URLPath$
[Core]
Source=[XPI PATH]\core.xpi
Destination=[TEMP]\core.ns
$InstallSize$:core
Cleanup=TRUE
Message=Preparing SmartUpdate, please wait...

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

@ -61,13 +61,14 @@ if(!(-e "$inDistPath"))
system("mkdir $inDestPath");
}
MakeConfigFile();
MakeJsFile();
# Make all xpi files
MakeXpiFile("core");
MakeXpiFile("mail");
MakeConfigFile();
if(-e "$inDistPath\\setup")
{
unlink <$inDistPath\\setup\\*>;
@ -95,7 +96,7 @@ exit(0);
sub MakeConfigFile
{
# Make config.ini file
if(system("perl makecfgini.pl config.it $inStagePath $inURLPath") != 0)
if(system("perl makecfgini.pl config.it $inStagePath $inDistPath\\xpi $inURLPath") != 0)
{
exit(1);
}

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

@ -39,12 +39,13 @@
#
# Make sure there are at least two arguments
if($#ARGV < 2)
if($#ARGV < 3)
{
die "usage: $0 <.it file> <staging path> <URL path>
die "usage: $0 <.it file> <staging path> <.xpi path> <URL path>
.it file : input ini template file
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
\n";
@ -52,7 +53,8 @@ if($#ARGV < 2)
$inItFile = $ARGV[0];
$inStagePath = $ARGV[1];
$inURLPath = $ARGV[2];
$inXpiPath = $ARGV[2];
$inURLPath = $ARGV[3];
# Get the name of the file replacing the .it extension with a .ini extension
@inItFileSplit = split(/\./,$inItFile);
@ -73,8 +75,8 @@ while($line = <fpInIt>)
# For each line read, search and replace $InstallSize$ with the calculated size
if($line =~ /\$InstallSize\$/i)
{
$installSize = 0;
$installSizeSystem = 0;
$installSize = 0;
$installSizeSystem = 0;
# split read line by ":" deliminator
@colonSplit = split(/:/, $line);
@ -107,6 +109,22 @@ while($line = <fpInIt>)
print fpOutIni "Install Size=$installSize\n";
print fpOutIni "Install Size System=$installSizeSystem\n";
}
elsif($line =~ /\$InstallSizeArchive\$/i)
{
$installSizeArchive = 0;
# split read line by ":" deliminator
@colonSplit = split(/:/, $line);
if($#colonSplit >= 0)
{
$componentName = $colonSplit[1];
chop($componentName);
$installSizeArchive = OutputInstallSizeArchive("$inXpiPath\\$componentName");
}
print fpOutIni "Install Size Archive=$installSizeArchive\n";
}
else
{
# For each line read, search and replace $InstallSizeSystem$ with the calulated size
@ -133,6 +151,19 @@ sub OutputInstallSize()
return($installSize);
}
sub OutputInstallSizeArchive()
{
my($inPath) = @_;
my($installSizeArchive);
my($dev, $ino, $mode, $nlink, $uid, $gui, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks);
print " calulating size for $inPath\n";
($dev, $ino, $mode, $nlink, $uid, $gui, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks) = stat $inPath;
$installSizeArchive = int($size / 1024);
$installSizeArchive += 1;
return($installSizeArchive);
}
sub OutputInstallSizeSystem()
{
my($inLine, $inPath) = @_;