mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-11-12 19:00:11 +01:00
47 lines
1.5 KiB
Plaintext
47 lines
1.5 KiB
Plaintext
|
function upgradeCleanup()
|
||
|
{
|
||
|
// Obsolete files that need to be cleaned up.
|
||
|
deleteThisFolder("Communicator", "psm");
|
||
|
}
|
||
|
|
||
|
var srDest = $SpaceRequired$;
|
||
|
var err;
|
||
|
|
||
|
err = initInstall("Personal Security Manager", "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);
|