mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-04 16:15:25 +00:00
49 lines
1.6 KiB
Plaintext
49 lines
1.6 KiB
Plaintext
function upgradeCleanup()
|
|
{
|
|
// Obsolete files from Netscape 6.0 and Netscape 6.01 that
|
|
// need to be cleaned up.
|
|
deleteThisFolder("Communicator", "psm");
|
|
}
|
|
|
|
var srDest = $SpaceRequired$;
|
|
var err;
|
|
|
|
err = initInstall("Netscape Personal Security Manager",
|
|
"Netscape Personal Security Manager", "$Version$");
|
|
logComment("initInstall: " + err);
|
|
|
|
var communicatorFolder = getFolder("Communicator");
|
|
logComment("communicatorFolder: " + communicatorFolder);
|
|
|
|
if(verifyDiskSpace(communicatorFolder, srDest))
|
|
{
|
|
// Call upgradeCleanup() before addDirectory() in case we accidentaly
|
|
// delete files that we happen to be also installing. This way, if we do,
|
|
// it will just get reinstalled. This is for safety measure.
|
|
upgradeCleanup();
|
|
err = addDirectory("Program", // reg entry
|
|
"$Version$", // version
|
|
"bin", // jar source
|
|
communicatorFolder, // target folder
|
|
"", // relative subdir
|
|
true ); // force flag
|
|
logComment("addDirectory() returned: " + err);
|
|
|
|
if(err==SUCCESS)
|
|
{
|
|
var pki = getFolder("Chrome","pippki.jar");
|
|
var nss = getFolder("Chrome","pipnss.jar");
|
|
registerChrome(CONTENT | DELAYED_CHROME, pki, "content/pippki/");
|
|
registerChrome(CONTENT | DELAYED_CHROME, nss, "content/pipnss/");
|
|
err = performInstall();
|
|
logComment("performInstall() returned: " + err);
|
|
}
|
|
else
|
|
{
|
|
cancelInstall();
|
|
logComment("cancelInstall() due to error: "+err);
|
|
}
|
|
}
|
|
else
|
|
cancelInstall(INSUFFICIENT_DISK_SPACE);
|