Generalize make-msi.pl script to open the door for MSIs of other Mozilla

projects.  Work supporting bug 231062. (cmp)


git-svn-id: svn://10.0.0.236/trunk@167366 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cltbld
2005-01-06 23:02:38 +00:00
parent 7dd003f5e8
commit e80c6d1fca

View File

@@ -46,12 +46,23 @@ if ($inConfigFiles eq "") {
die "ERROR: Packager manifests and install script location must be specified with -config\n";
}
if ($inProject eq "") {
die "ERROR: Project must be specified with -project\n";
}
$DIST = "$inObjDir/dist";
$MSRC = "$inSrcDir/browser/installer/windows/msi";
$MMH = "$inSrcDir/toolkit/mozapps/installer/windows/msi";
$MDIST = "$DIST/msi";
$STAGE = "$DIST/install";
if ($inProject eq "firefox") {
$MSRC = "$inSrcDir/browser/installer/windows/msi";
} elsif ($inProject eq "thunderbird") {
$MSRC = "$inSrcDir/mail/installer/windows/msi";
} else {
die "ERROR: make-msi.pl currently only supports the firefox and thunderbird projects.\n";
}
$STAGE =~ s:/+:/:g;
$DIST =~ s:/+:/:g;
$MSRC =~ s:/+:/:g;
@@ -94,9 +105,9 @@ mkdir($MDIST, 0775);
#--------------------------------------------------------------------------
Print("Placing MSI files in $MDIST/...\n");
system("cp \"$MSRC/firefox.mm\" \"$MDIST/\"");
system("cp \"$MSRC/firefox.mmh\" \"$MDIST/\"");
system("cp \"$MSRC/firefox.ver\" \"$MDIST/\"");
system("cp \"$MSRC/$inProject.mm\" \"$MDIST/\"");
system("cp \"$MSRC/$inProject.mmh\" \"$MDIST/\"");
system("cp \"$MSRC/$inProject.ver\" \"$MDIST/\"");
system("cp \"$MMH/mozilla-dept.mmh\" \"$MDIST/\"");
system("cp \"$MMH/mozilla-company.mmh\" \"$MDIST/\"");
@@ -106,18 +117,18 @@ system("cp \"$MMH/mozilla-company.mmh\" \"$MDIST/\"");
Print("Generating MSI file...\n");
chdir($MDIST);
system("mm.cmd firefox P");
system("mm.cmd $inProject P");
if ( ! -e "out/firefox.mm/MSI/firefox.msi" ) {
die "ERROR: Failed to build MSI -- $MDIST/out/firefox.mm/MSI/firefox.msi missing!\n";
if ( ! -e "out/$inProject.mm/MSI/$inProject.msi" ) {
die "ERROR: Failed to build MSI -- $MDIST/out/$inProject.mm/MSI/$inProject.msi missing!\n";
}
#--------------------------------------------------------------------------
# Move MSI file to stage.
# Copy MSI file to stage.
#--------------------------------------------------------------------------
Print("Copying MSI file to staging area...\n");
my $cmd = "cp out/firefox.mm/MSI/firefox.msi \"$STAGE/$output_filename\"";
my $cmd = "cp out/$inProject.mm/MSI/$inProject.msi \"$STAGE/$output_filename\"";
Print("$cmd\n");
system($cmd);
@@ -161,6 +172,11 @@ sub ParseArgv {
$counter++;
$inConfigFiles = $argv[$counter];
}
} elsif ($argv[$counter] =~ /^[-,\/]project$/i) {
if ($#argv >= ($counter + 1)) {
$counter++;
$inProject = $argv[$counter];
}
}
}
}